Skip to content

Commit

Permalink
Update to Deno 1.4.4, std 0.73.0, media_types 2.5.1 (oakserver#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato authored and kaleidawave committed Oct 27, 2020
1 parent 4c94f19 commit 7674beb
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/oak-ci.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: download deno
uses: denolib/setup-deno@v2
with:
deno-version: v1.4.2
deno-version: v1.4.4
- name: check format
if: matrix.os == 'ubuntu-latest'
run: deno fmt --check
Expand Down
3 changes: 1 addition & 2 deletions application.ts
Expand Up @@ -16,8 +16,7 @@ import type {
ServerResponse,
ServeTls,
} from "./types.d.ts";
import { reset } from "https://deno.land/std@0.71.0/fmt/colors.ts";
import { resolve } from "https://deno.land/std@0.71.0/path/win32.ts";

export interface ListenOptionsBase {
hostname?: string;
port: number;
Expand Down
26 changes: 13 additions & 13 deletions deps.ts
Expand Up @@ -4,15 +4,15 @@

// `std` dependencies

export { copyBytes, equal } from "https://deno.land/std@0.71.0/bytes/mod.ts";
export { Sha1 } from "https://deno.land/std@0.71.0/hash/sha1.ts";
export { HmacSha256 } from "https://deno.land/std@0.71.0/hash/sha256.ts";
export { serve, serveTLS } from "https://deno.land/std@0.71.0/http/server.ts";
export { copyBytes, equal } from "https://deno.land/std@0.73.0/bytes/mod.ts";
export { Sha1 } from "https://deno.land/std@0.73.0/hash/sha1.ts";
export { HmacSha256 } from "https://deno.land/std@0.73.0/hash/sha256.ts";
export { serve, serveTLS } from "https://deno.land/std@0.73.0/http/server.ts";
export {
Status,
STATUS_TEXT,
} from "https://deno.land/std@0.71.0/http/http_status.ts";
export { BufReader, BufWriter } from "https://deno.land/std@0.71.0/io/bufio.ts";
} from "https://deno.land/std@0.73.0/http/http_status.ts";
export { BufReader, BufWriter } from "https://deno.land/std@0.73.0/io/bufio.ts";
export {
basename,
extname,
Expand All @@ -21,28 +21,28 @@ export {
normalize,
parse,
sep,
} from "https://deno.land/std@0.71.0/path/mod.ts";
export { assert } from "https://deno.land/std@0.71.0/testing/asserts.ts";
} from "https://deno.land/std@0.73.0/path/mod.ts";
export { assert } from "https://deno.land/std@0.73.0/testing/asserts.ts";
export {
acceptable,
acceptWebSocket,
} from "https://deno.land/std@0.71.0/ws/mod.ts";
export type { WebSocket } from "https://deno.land/std@0.71.0/ws/mod.ts";
} from "https://deno.land/std@0.73.0/ws/mod.ts";
export type { WebSocket } from "https://deno.land/std@0.73.0/ws/mod.ts";

// 3rd party dependencies

export {
contentType,
extension,
lookup,
} from "https://deno.land/x/media_types@v2.5.0/mod.ts";
} from "https://deno.land/x/media_types@v2.5.1/mod.ts";
export {
compile,
parse as pathParse,
pathToRegexp,
} from "https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts";
} from "https://deno.land/x/path_to_regexp@v6.2.0/index.ts";
export type {
Key,
ParseOptions,
TokensToRegexpOptions,
} from "https://raw.githubusercontent.com/pillarjs/path-to-regexp/v6.1.0/src/index.ts";
} from "https://deno.land/x/path_to_regexp@v6.2.0/index.ts";
2 changes: 1 addition & 1 deletion examples/closeServer.ts
Expand Up @@ -8,7 +8,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import { Application, Context, Router, Status } from "../mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/cookieServer.ts
Expand Up @@ -8,7 +8,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import { Application } from "../mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/echoServer.ts
Expand Up @@ -8,7 +8,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import { Application } from "../mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/httpsServer.ts
Expand Up @@ -9,7 +9,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import { Application } from "../mod.ts";

Expand Down
4 changes: 2 additions & 2 deletions examples/readerServer.ts
Expand Up @@ -4,8 +4,8 @@
*/

// Importing some console colors
import { bold, yellow } from "https://deno.land/std@0.71.0/fmt/colors.ts";
import { StringReader } from "https://deno.land/std@0.71.0/io/readers.ts";
import { bold, yellow } from "https://deno.land/std@0.73.0/fmt/colors.ts";
import { StringReader } from "https://deno.land/std@0.73.0/io/readers.ts";

import { Application } from "../mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/routingServer.ts
Expand Up @@ -8,7 +8,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import {
Application,
Expand Down
2 changes: 1 addition & 1 deletion examples/server.ts
Expand Up @@ -9,7 +9,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import { Application } from "../mod.ts";

Expand Down
2 changes: 1 addition & 1 deletion examples/sseServer.ts
Expand Up @@ -8,7 +8,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import {
Application,
Expand Down
2 changes: 1 addition & 1 deletion examples/staticServer.ts
Expand Up @@ -9,7 +9,7 @@ import {
green,
red,
yellow,
} from "https://deno.land/std@0.71.0/fmt/colors.ts";
} from "https://deno.land/std@0.73.0/fmt/colors.ts";

import { Application, HttpError, Status } from "../mod.ts";

Expand Down
9 changes: 7 additions & 2 deletions request_test.ts
Expand Up @@ -2,10 +2,15 @@

// deno-lint-ignore-file

import { assert, assertEquals, assertStrictEquals, test } from "./test_deps.ts";
import {
assert,
assertEquals,
assertStrictEquals,
assertThrowsAsync,
test,
} from "./test_deps.ts";
import { Request } from "./request.ts";
import type { ServerRequest } from "./types.d.ts";
import { assertThrowsAsync } from "https://deno.land/std@0.71.0/testing/asserts.ts";
const encoder = new TextEncoder();

function createMockBodyReader(body: string): Deno.Reader {
Expand Down
8 changes: 4 additions & 4 deletions test_deps.ts
Expand Up @@ -2,13 +2,13 @@

export const { test } = Deno;

export { BufReader, BufWriter } from "https://deno.land/std@0.71.0/io/bufio.ts";
export { StringReader } from "https://deno.land/std@0.71.0/io/readers.ts";
export { StringWriter } from "https://deno.land/std@0.71.0/io/writers.ts";
export { BufReader, BufWriter } from "https://deno.land/std@0.73.0/io/bufio.ts";
export { StringReader } from "https://deno.land/std@0.73.0/io/readers.ts";
export { StringWriter } from "https://deno.land/std@0.73.0/io/writers.ts";
export {
assert,
assertEquals,
assertStrictEquals,
assertThrows,
assertThrowsAsync,
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
} from "https://deno.land/std@0.73.0/testing/asserts.ts";

0 comments on commit 7674beb

Please sign in to comment.