From 8d14d1a67e8fc45276fe235e4dc97b9fde67e6d9 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 6 Feb 2024 14:55:04 +0530 Subject: [PATCH 1/3] Changes for jsr --- .vim/coc-settings.json | 5 +++++ deno.json | 3 +++ deps.ts | 8 ++++---- download.ts | 2 ++ util.ts | 8 +++----- 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 .vim/coc-settings.json diff --git a/.vim/coc-settings.json b/.vim/coc-settings.json new file mode 100644 index 0000000..b61d627 --- /dev/null +++ b/.vim/coc-settings.json @@ -0,0 +1,5 @@ +{ + "deno.enable": true, + "deno.lint": false, + "deno.unstable": true +} diff --git a/deno.json b/deno.json index 470e3ca..77ee439 100644 --- a/deno.json +++ b/deno.json @@ -1,4 +1,7 @@ { + "name": "@denosaurs/plug", + "version": "1.0.3", + "exports": "./mod.ts", "lock": false, "importMap": "./import_map.json" } diff --git a/deps.ts b/deps.ts index 5febe28..9b8064c 100644 --- a/deps.ts +++ b/deps.ts @@ -7,7 +7,7 @@ export { normalize, resolve, toFileUrl, -} from "https://deno.land/std@0.203.0/path/mod.ts"; -export { ensureDir } from "https://deno.land/std@0.203.0/fs/mod.ts"; -export { encode as hex } from "https://deno.land/std@0.203.0/encoding/hex.ts"; -export { green } from "https://deno.land/std@0.203.0/fmt/colors.ts"; +} from "jsr:@std/path@0.213.1"; +export { ensureDir } from "jsr:@std/fs@0.213.1"; +export { encodeHex as hex } from "jsr:@std/encoding@0.213.1/hex"; +export { green } from "jsr:@std/fmt@0.213.1/colors"; diff --git a/download.ts b/download.ts index 8eb49be..4bb1338 100644 --- a/download.ts +++ b/download.ts @@ -45,6 +45,7 @@ export const defaultExtensions: OsRecord = { aix: "so", solaris: "so", illumos: "so", + android: "so", }; export const defaultPrefixes: OsRecord = { @@ -56,6 +57,7 @@ export const defaultPrefixes: OsRecord = { solaris: "lib", illumos: "lib", windows: "", + android: "lib", }; function getCrossOption(record?: NestedCrossRecord): T | undefined { diff --git a/util.ts b/util.ts index aa333ef..43a4ce5 100644 --- a/util.ts +++ b/util.ts @@ -46,11 +46,9 @@ export function stringToURL(url: string): URL { } export async function hash(value: string): Promise { - return decoder.decode( - hex( - new Uint8Array( - await crypto.subtle.digest("SHA-256", encoder.encode(value)), - ), + return hex( + new Uint8Array( + await crypto.subtle.digest("SHA-256", encoder.encode(value)), ), ); } From 6aad1cb81f248ce2db0a04b946629f58c5e02587 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 6 Feb 2024 14:55:11 +0530 Subject: [PATCH 2/3] Changes for jsr --- .vim/coc-settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vim/coc-settings.json diff --git a/.vim/coc-settings.json b/.vim/coc-settings.json deleted file mode 100644 index b61d627..0000000 --- a/.vim/coc-settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "deno.enable": true, - "deno.lint": false, - "deno.unstable": true -} From 826536a4350d46fd2c191d6bc90b39912a631bec Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 6 Feb 2024 14:57:37 +0530 Subject: [PATCH 3/3] Update deps --- test_deps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_deps.ts b/test_deps.ts index 4e6dc3e..2fa4a31 100644 --- a/test_deps.ts +++ b/test_deps.ts @@ -1,2 +1,2 @@ -export * from "https://deno.land/std@0.203.0/assert/mod.ts"; -export * from "https://deno.land/std@0.203.0/path/mod.ts"; +export * from "https://deno.land/std@0.214.0/assert/mod.ts"; +export * from "https://deno.land/std@0.214.0/path/mod.ts";