Skip to content

Commit 1626cf5

Browse files
committed
feat: add back deno runtime testing without type checks
1 parent 4dfb0c6 commit 1626cf5

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

ecosystem-tests/cli.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,14 @@ const projectRunners = {
9595
await run('bun', ['test']);
9696
}
9797
},
98-
// Temporarily comment this out until we can test with JSR transformations end-to-end.
99-
// deno: async () => {
100-
// // we don't need to explicitly install the package here
101-
// // because our deno setup relies on `rootDir/deno` to exist
102-
// // which is an artifact produced from our build process
103-
// await run('deno', ['task', 'install']);
104-
// await run('deno', ['task', 'check']);
105-
106-
// if (state.live) await run('deno', ['task', 'test']);
107-
// },
98+
deno: async () => {
99+
// we don't need to explicitly install the package here
100+
// because our deno setup relies on `rootDir/dist-deno` to exist
101+
// which is an artifact produced from our build process
102+
await run('deno', ['task', 'install', '--unstable-sloppy-imports']);
103+
104+
if (state.live) await run('deno', ['task', 'test']);
105+
},
108106
};
109107

110108
let projectNames = Object.keys(projectRunners) as Array<keyof typeof projectRunners>;

ecosystem-tests/deno/deno.jsonc

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"tasks": {
33
"install": "deno install --node-modules-dir main_test.ts -f",
4-
"check": "deno lint && deno check main_test.ts",
5-
"test": "deno test --allow-env --allow-net --allow-read --node-modules-dir"
4+
"test": "deno test --allow-env --allow-net --allow-read --node-modules-dir --unstable-sloppy-imports --no-check"
65
},
76
"imports": {
8-
"openai": "../../deno/mod.ts",
9-
"openai/": "../../deno/"
7+
"openai": "../../dist-deno/index.ts",
8+
"openai/": "../../dist-deno/"
109
}
1110
}

scripts/build-deno

+13-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ cd "$(dirname "$0")/.."
77
rm -rf dist-deno; mkdir dist-deno
88
cp -rp src/* jsr.json dist-deno
99

10+
rm -rf dist-deno/shims
11+
12+
rm dist-deno/_shims/node*.{js,mjs,ts}
13+
rm dist-deno/_shims/manual*.{js,mjs,ts}
14+
rm dist-deno/_shims/index.{d.ts,js,mjs}
15+
for file in dist-deno/_shims/*-deno.ts; do
16+
mv -- "$file" "${file%-deno.ts}.ts"
17+
done
18+
1019
rm dist-deno/_shims/auto/*-node.ts
11-
for dir in dist-deno/_shims dist-deno/_shims/auto; do
12-
rm "${dir}"/*.{d.ts,js,mjs}
13-
for file in "${dir}"/*-deno.ts; do
14-
mv -- "$file" "${file%-deno.ts}.ts"
15-
done
20+
rm dist-deno/_shims/auto/*.{d.ts,js,mjs}
21+
for file in dist-deno/_shims/auto/*-deno.ts; do
22+
mv -- "$file" "${file%-deno.ts}.ts"
1623
done
24+
1725
for file in README.md LICENSE CHANGELOG.md; do
1826
if [ -e "${file}" ]; then cp "${file}" dist-deno; fi
1927
done

0 commit comments

Comments
 (0)