Skip to content

Commit

Permalink
Update to Deno 1.5.2/std 0.77.0/media_types 2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Nov 9, 2020
1 parent 7f1d17b commit 403c48d
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/oak-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
- name: download deno
uses: denolib/setup-deno@v2
with:
deno-version: v1.4.4
deno-version: v1.5.2
- name: check format
if: matrix.os == 'ubuntu-latest'
run: deno fmt --check
- name: check linting
if: matrix.os == 'ubuntu-latest'
run: deno lint --unstable
- name: run tests
run: deno test --config tsconfig.json --allow-read --allow-write
run: deno test --allow-read --allow-write
- name: run tests unstable
run: deno test --config tsconfig.json --allow-read --allow-write --unstable
run: deno test --allow-read --allow-write --unstable
1 change: 1 addition & 0 deletions content_disposition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function rfc2231getParam(header: string): string {
if (!(n in matches)) {
break;
}
// deno-lint-ignore prefer-const
let [quote, part] = matches[n];
part = unquote(part);
if (quote) {
Expand Down
22 changes: 11 additions & 11 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

// `std` dependencies

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

// 3rd party dependencies

export {
contentType,
extension,
lookup,
} from "https://deno.land/x/media_types@v2.5.1/mod.ts";
} from "https://deno.land/x/media_types@v2.5.2/mod.ts";
export {
compile,
parse as pathParse,
Expand Down
2 changes: 1 addition & 1 deletion examples/closeServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
cyan,
green,
yellow,
} from "https://deno.land/std@0.73.0/fmt/colors.ts";
} from "https://deno.land/std@0.77.0/fmt/colors.ts";

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

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

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

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

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions examples/readerServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

// Importing some console colors
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 { bold, yellow } from "https://deno.land/std@0.77.0/fmt/colors.ts";
import { StringReader } from "https://deno.land/std@0.77.0/io/readers.ts";

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

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

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

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

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

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

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

Expand Down
1 change: 1 addition & 0 deletions mediaTyper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export function parse(str: string): MediaType {
throw new TypeError("Invalid media type.");
}

// deno-lint-ignore prefer-const
let [, type, subtype] = match;
let suffix: string | undefined;

Expand Down
2 changes: 1 addition & 1 deletion multipart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async function* parts(
if (!readResult) {
throw new httpErrors.BadRequest("Unexpected EOF reached");
}
let { bytes } = readResult;
const { bytes } = readResult;
const strippedBytes = stripEol(bytes);
if (isEqual(strippedBytes, part) || isEqual(strippedBytes, final)) {
if (file) {
Expand Down
2 changes: 1 addition & 1 deletion router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function toUrl(url: string, params: RouteParams = {}, options?: UrlOptions) {
}

const toPath = compile(url, options);
let replaced = toPath(replace);
const replaced = toPath(replace);

if (options && options.query) {
const url = new URL(replaced, "http://oak");
Expand Down
2 changes: 1 addition & 1 deletion server_sent_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class ServerSentEventTarget extends EventTarget {
dispatchEvent(event: ServerSentEvent): boolean;
dispatchEvent(event: CloseEvent | ErrorEvent): boolean;
dispatchEvent(event: ServerSentEvent | CloseEvent | ErrorEvent): boolean {
let dispatched = super.dispatchEvent(event);
const dispatched = super.dispatchEvent(event);
if (dispatched && event instanceof ServerSentEvent) {
this.#prev = this.#send(String(event), this.#prev);
}
Expand Down
8 changes: 4 additions & 4 deletions test_deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

export const { test } = Deno;

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 { BufReader, BufWriter } from "https://deno.land/std@0.77.0/io/bufio.ts";
export { StringReader } from "https://deno.land/std@0.77.0/io/readers.ts";
export { StringWriter } from "https://deno.land/std@0.77.0/io/writers.ts";
export {
assert,
assertEquals,
assertStrictEquals,
assertThrows,
assertThrowsAsync,
} from "https://deno.land/std@0.73.0/testing/asserts.ts";
} from "https://deno.land/std@0.77.0/testing/asserts.ts";
5 changes: 0 additions & 5 deletions tsconfig.json

This file was deleted.

0 comments on commit 403c48d

Please sign in to comment.