Skip to content

Commit 41a6961

Browse files
committed
Update deno stdlib in hopes of fixing parse err
1 parent c6371cd commit 41a6961

File tree

6 files changed

+16
-25
lines changed

6 files changed

+16
-25
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,6 @@ jobs:
5757
with:
5858
parallel-finished: true
5959

60-
verify-usage-as-deno-lib:
61-
# we’re checking no import-map type imports snuck in
62-
runs-on: ubuntu-latest
63-
steps:
64-
- uses: actions/checkout@v4
65-
with:
66-
path: src
67-
- uses: denoland/setup-deno@v1
68-
- run: deno run --no-config --unstable --allow-all src/mod.ts
69-
7060
lint:
7161
runs-on: ubuntu-latest
7262
steps:

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"imports": {
2727
"is-what": "https://deno.land/x/is_what@v4.1.15/src/index.ts",
28-
"deno/": "https://deno.land/std@0.196.0/",
28+
"deno/": "https://deno.land/std@0.224.0/",
2929
"outdent": "https://deno.land/x/outdent@v0.8.0/mod.ts"
3030
}
3131
}

src/deps.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import * as is_what from "https://deno.land/x/is_what@v4.1.15/src/index.ts"
1+
import * as is_what from "is-what"
22
export { is_what }
33

4-
import { type PlainObject } from "https://deno.land/x/is_what@v4.1.15/src/index.ts"
4+
import { type PlainObject } from "is-what"
55
export type { PlainObject }
66

7-
import * as outdent from "https://deno.land/x/outdent@v0.8.0/mod.ts"
7+
import * as outdent from "outdent"
88
export { outdent }
99

1010
// importing super specifically to reduce final npm bundle size
11-
import * as crypto from "https://deno.land/std@0.196.0/crypto/mod.ts"
12-
import { moveSync } from "https://deno.land/std@0.196.0/fs/move.ts"
13-
import { readLines } from "https://deno.land/std@0.196.0/io/read_lines.ts"
14-
import { writeAll } from "https://deno.land/std@0.196.0/streams/write_all.ts"
15-
import { parse as parseYaml } from "https://deno.land/std@0.196.0/yaml/parse.ts"
16-
import { SEP } from "https://deno.land/std@0.196.0/path/mod.ts"
17-
import { fromFileUrl } from "https://deno.land/std@0.196.0/path/mod.ts"
11+
import * as crypto from "deno/crypto/mod.ts"
12+
import { moveSync } from "deno/fs/move.ts"
13+
import { readLines } from "deno/io/read_lines.ts"
14+
import { writeAll } from "deno/io/write_all.ts"
15+
import { parse as parseYaml } from "deno/yaml/parse.ts"
16+
import { SEPARATOR as SEP } from "deno/path/mod.ts"
17+
import { fromFileUrl } from "deno/path/mod.ts"
1818

1919
const streams = { writeAll }
2020
const io = { readLines }

src/hooks/useDownload.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { deno } from "../deps.ts"
22
const { crypto: crypto_, streams: { writeAll } } = deno
3-
const { toHashString, crypto } = crypto_
3+
const { crypto } = crypto_
4+
import { encodeHex } from "deno/encoding/hex.ts"
45
import { PkgxError, panic } from "../utils/error.ts"
56
import useConfig from "./useConfig.ts"
67
import useFetch from "./useFetch.ts"
@@ -75,7 +76,7 @@ function cache({ for: url }: {for: URL}): Path {
7576
if (url.search) key += `?${url.search}`
7677
const blob = new TextEncoder().encode(key)
7778
const hash = crypto.subtle.digestSync("SHA-256", blob)
78-
return toHashString(hash)
79+
return encodeHex(hash)
7980
}
8081
}
8182

src/utils/Path.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assert, assertEquals, assertFalse, assertThrows } from "deno/assert/mod.ts"
2-
import { SEP } from "deno/path/mod.ts"
2+
import { SEPARATOR as SEP } from "deno/path/mod.ts"
33
import Path from "./Path.ts"
44

55
Deno.test("test Path", async test => {

src/utils/semver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//HEY YOU! DO NOT CHANGE THIS TO USE deps.ts since it breaks pkgx/gui
2-
import { isArray, isString } from "https://deno.land/x/is_what@v4.1.15/src/index.ts"
2+
import { isArray, isString } from "is-what"
33

44
/**
55
* we have our own implementation because open source is full of weird

0 commit comments

Comments
 (0)