From 07fdfdd33fdbcf666a8419a79878885adc8d3379 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Fri, 12 Jan 2024 09:10:03 +1100 Subject: [PATCH] fix: migrate to jsr and npm deps --- deps.ts | 42 +++++++++++++++++++++--------------------- test_deps.ts | 14 +++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/deps.ts b/deps.ts index 89cdd114..58697730 100644 --- a/deps.ts +++ b/deps.ts @@ -2,30 +2,30 @@ // This file contains the external dependencies that oak depends upon -// `std` dependencies +// jsr dependencies -export { concat } from "https://deno.land/std@0.214.0/bytes/concat.ts"; -export { copy as copyBytes } from "https://deno.land/std@0.214.0/bytes/copy.ts"; -export { timingSafeEqual } from "https://deno.land/std@0.214.0/crypto/timing_safe_equal.ts"; -export { KeyStack } from "https://deno.land/std@0.214.0/crypto/unstable_keystack.ts"; -export { encodeBase64 } from "https://deno.land/std@0.214.0/encoding/base64.ts"; +export { concat } from "jsr:@std/bytes@0.213/concat"; +export { copy as copyBytes } from "jsr:@std/bytes@0.213/copy"; +export { timingSafeEqual } from "jsr:@std/crypto@0.213/timing_safe_equal"; +export { KeyStack } from "jsr:@std/crypto@0.213/unstable_keystack"; +export { encodeBase64 } from "jsr:@std/encoding@0.213/base64"; export { calculate, type ETagOptions, type FileInfo, ifMatch, ifNoneMatch, -} from "https://deno.land/std@0.214.0/http/etag.ts"; +} from "jsr:@std/http@0.213/etag"; export { accepts, acceptsEncodings, acceptsLanguages, -} from "https://deno.land/std@0.214.0/http/negotiation.ts"; -export { UserAgent } from "https://deno.land/std@0.214.0/http/user_agent.ts"; -export { LimitedReader } from "https://deno.land/std@0.214.0/io/limited_reader.ts"; -export { readAll } from "https://deno.land/std@0.214.0/io/read_all.ts"; -export { contentType } from "https://deno.land/std@0.214.0/media_types/content_type.ts"; -export { typeByExtension } from "https://deno.land/std@0.214.0/media_types/type_by_extension.ts"; +} from "jsr:@std/http@0.213/negotiation"; +export { UserAgent } from "jsr:@std/http@0.213/user_agent"; +export { LimitedReader } from "jsr:@std/io@0.213/limited_reader"; +export { readAll } from "jsr:@std/io@0.213/read_all"; +export { contentType } from "jsr:@std/media_types@0.213/content_type"; +export { typeByExtension } from "jsr:@std/media_types@0.213/type_by_extension"; export { basename, extname, @@ -34,7 +34,7 @@ export { normalize, parse, SEP, -} from "https://deno.land/std@0.214.0/path/mod.ts"; +} from "jsr:@std/path@0.213/"; // 3rd party dependencies @@ -43,23 +43,23 @@ export { SecureCookieMap, type SecureCookieMapGetOptions, type SecureCookieMapSetDeleteOptions, -} from "https://deno.land/x/oak_commons@0.6.0/cookie_map.ts"; +} from "jsr:@oak/commons@0.6/cookie_map"; export { createHttpError, errors, HttpError, type HttpErrorOptions, isHttpError, -} from "https://deno.land/x/oak_commons@0.6.0/http_errors.ts"; -export { matches } from "https://deno.land/x/oak_commons@0.6.0/media_types.ts"; -export { type HttpMethod as HTTPMethods } from "https://deno.land/x/oak_commons@0.6.0/method.ts"; +} from "jsr:@oak/commons@0.6/http_errors"; +export { matches } from "jsr:@oak/commons@0.6/media_types"; +export { type HttpMethod as HTTPMethods } from "jsr:@oak/commons@0.6/method"; export { ServerSentEvent, type ServerSentEventInit, ServerSentEventStreamTarget, type ServerSentEventTarget, type ServerSentEventTargetOptions, -} from "https://deno.land/x/oak_commons@0.6.0/server_sent_event.ts"; +} from "jsr:@oak/commons@0.6/server_sent_event"; export { type ErrorStatus, isErrorStatus, @@ -67,7 +67,7 @@ export { type RedirectStatus, Status, STATUS_TEXT, -} from "https://deno.land/x/oak_commons@0.6.0/status.ts"; +} from "jsr:@oak/commons@0.6/status"; export { compile, @@ -77,4 +77,4 @@ export { type ParseOptions, pathToRegexp, type TokensToRegexpOptions, -} from "https://deno.land/x/path_to_regexp@v6.2.1/index.ts"; +} from "npm:path-to-regexp@6.2.1"; diff --git a/test_deps.ts b/test_deps.ts index 0b7693b8..e97d880b 100644 --- a/test_deps.ts +++ b/test_deps.ts @@ -1,9 +1,9 @@ // Copyright 2018-2024 the oak authors. All rights reserved. MIT license. -export { assert } from "https://deno.land/std@0.214.0/assert/assert.ts"; -export { assertEquals } from "https://deno.land/std@0.214.0/assert/assert_equals.ts"; -export { assertInstanceOf } from "https://deno.land/std@0.214.0/assert/assert_instance_of.ts"; -export { assertRejects } from "https://deno.land/std@0.214.0/assert/assert_rejects.ts"; -export { assertStrictEquals } from "https://deno.land/std@0.214.0/assert/assert_strict_equals.ts"; -export { assertThrows } from "https://deno.land/std@0.214.0/assert/assert_throws.ts"; -export { unreachable } from "https://deno.land/std@0.214.0/assert/unreachable.ts"; +export { assert } from "jsr:@std/assert@0.213/assert"; +export { assertEquals } from "jsr:@std/assert@0.213/assert_equals"; +export { assertInstanceOf } from "jsr:@std/assert@0.213/assert_instance_of"; +export { assertRejects } from "jsr:@std/assert@0.213/assert_rejects"; +export { assertStrictEquals } from "jsr:@std/assert@0.213/assert_strict_equals"; +export { assertThrows } from "jsr:@std/assert@0.213/assert_throws"; +export { unreachable } from "jsr:@std/assert@0.213/unreachable";