Skip to content

Commit

Permalink
fix: migrate to jsr and npm deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Jan 12, 2024
1 parent f1fbd68 commit 8a1beef
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 33 deletions.
44 changes: 20 additions & 24 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,42 @@

// This file contains the external dependencies that oak depends upon

// `std` dependencies
// jsr dependencies

export {
concat,
copy as copyBytes,
equals,
} from "https://deno.land/std@0.211.0/bytes/mod.ts";
export { timingSafeEqual } from "https://deno.land/std@0.211.0/crypto/timing_safe_equal.ts";
export { KeyStack } from "https://deno.land/std@0.211.0/crypto/unstable_keystack.ts";
export { encodeBase64 } from "https://deno.land/std@0.211.0/encoding/base64.ts";
export { concat, copy as copyBytes, equals } from "jsr:@std/bytes@0.210";
export { timingSafeEqual } from "jsr:@std/crypto@0.210/timing_safe_equal";
export { KeyStack } from "jsr:@std/crypto@0.210/unstable_keystack";
export { encodeBase64 } from "jsr:@std/encoding@0.210/base64";
export {
mergeHeaders,
SecureCookieMap,
type SecureCookieMapGetOptions,
type SecureCookieMapSetDeleteOptions,
} from "https://deno.land/std@0.211.0/http/unstable_cookie_map.ts";
} from "jsr:@std/http@0.210/unstable_cookie_map";
export {
calculate,
type ETagOptions,
type FileInfo,
ifMatch,
ifNoneMatch,
} from "https://deno.land/std@0.211.0/http/etag.ts";
} from "jsr:@std/http@0.210/etag";
export {
accepts,
acceptsEncodings,
acceptsLanguages,
} from "https://deno.land/std@0.211.0/http/negotiation.ts";
export { UserAgent } from "https://deno.land/std@0.211.0/http/user_agent.ts";
export { LimitedReader } from "https://deno.land/std@0.211.0/io/mod.ts";
} from "jsr:@std/http@0.210/negotiation";
export { UserAgent } from "jsr:@std/http@0.210/user_agent";
export { LimitedReader } from "jsr:@std/io@0.210";
export {
contentType,
extension,
typeByExtension,
} from "https://deno.land/std@0.211.0/media_types/mod.ts";
} from "jsr:@std/media_types@0.210";
export {
readAll,
readerFromStreamReader,
writeAll,
} from "https://deno.land/std@0.211.0/streams/mod.ts";
} from "jsr:@std/streams@0.210";
export {
basename,
extname,
Expand All @@ -50,33 +46,33 @@ export {
normalize,
parse,
SEP,
} from "https://deno.land/std@0.211.0/path/mod.ts";

// 3rd party dependencies
} from "jsr:@std/path@0.210";

export {
createHttpError,
errors,
HttpError,
type HttpErrorOptions,
isHttpError,
} from "https://deno.land/x/oak_commons@0.4.0/http_errors.ts";
export { type HttpMethod as HTTPMethods } from "https://deno.land/x/oak_commons@0.4.0/method.ts";
} from "jsr:@oak/commons@0.4/http_errors";
export { type HttpMethod as HTTPMethods } from "jsr:@oak/commons@0.4/method";
export {
ServerSentEvent,
type ServerSentEventInit,
ServerSentEventStreamTarget,
type ServerSentEventTarget,
type ServerSentEventTargetOptions,
} from "https://deno.land/x/oak_commons@0.4.0/server_sent_event.ts";
} from "jsr:@oak/commons@0.4/server_sent_event";
export {
type ErrorStatus,
isErrorStatus,
isRedirectStatus,
type RedirectStatus,
Status,
STATUS_TEXT,
} from "https://deno.land/x/oak_commons@0.4.0/status.ts";
} from "jsr:@oak/commons@0.4/status";

// npm dependencies

export {
compile,
Expand All @@ -86,4 +82,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";
18 changes: 9 additions & 9 deletions test_deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export {
BufWriter,
StringReader,
StringWriter,
} from "https://deno.land/std@0.211.0/io/mod.ts";
export { writeAllSync } from "https://deno.land/std@0.211.0/streams/mod.ts";
export { assert } from "https://deno.land/std@0.211.0/assert/assert.ts";
export { assertEquals } from "https://deno.land/std@0.211.0/assert/assert_equals.ts";
export { assertInstanceOf } from "https://deno.land/std@0.211.0/assert/assert_instance_of.ts";
export { assertRejects } from "https://deno.land/std@0.211.0/assert/assert_rejects.ts";
export { assertStrictEquals } from "https://deno.land/std@0.211.0/assert/assert_strict_equals.ts";
export { assertThrows } from "https://deno.land/std@0.211.0/assert/assert_throws.ts";
export { unreachable } from "https://deno.land/std@0.211.0/assert/unreachable.ts";
} from "jsr:@std/io@0.210";
export { writeAllSync } from "jsr:@std/streams@0.210";
export { assert } from "jsr:@std/assert@0.210/assert";
export { assertEquals } from "jsr:@std/assert@0.210/assert_equals";
export { assertInstanceOf } from "jsr:@std/assert@0.210/assert_instance_of";
export { assertRejects } from "jsr:@std/assert@0.210/assert_rejects";
export { assertStrictEquals } from "jsr:@std/assert@0.210/assert_strict_equals";
export { assertThrows } from "jsr:@std/assert@0.210/assert_throws";
export { unreachable } from "jsr:@std/assert@0.210/unreachable";

0 comments on commit 8a1beef

Please sign in to comment.