Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changes for publishing to jsr.io #35

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@denosaurs/plug",
"version": "1.0.3",
"exports": "./mod.ts",
"lock": false,
"importMap": "./import_map.json"
}
8 changes: 4 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
2 changes: 2 additions & 0 deletions download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const defaultExtensions: OsRecord<string> = {
aix: "so",
solaris: "so",
illumos: "so",
android: "so",
};

export const defaultPrefixes: OsRecord<string> = {
Expand All @@ -56,6 +57,7 @@ export const defaultPrefixes: OsRecord<string> = {
solaris: "lib",
illumos: "lib",
windows: "",
android: "lib",
};

function getCrossOption<T>(record?: NestedCrossRecord<T>): T | undefined {
Expand Down
4 changes: 2 additions & 2 deletions test_deps.ts
Original file line number Diff line number Diff line change
@@ -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";
8 changes: 3 additions & 5 deletions util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ export function stringToURL(url: string): URL {
}

export async function hash(value: string): Promise<string> {
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)),
),
);
}
Expand Down
Loading