Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 3d4cd0a

Browse files
committed
Fix testing for 1.14.1
1 parent 59f1f88 commit 3d4cd0a

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
version: latest
3535

3636
- name: Deno test
37-
run: deno test -A --unstable --import-map=import_map.json --location=https://deno.land/x/aleph
37+
run: deno test -A --unstable --location=http://localhost -c=deno.json --import-map=import_map.json
3838

3939
- name: Cargo test
4040
run: cd compiler && cargo test --all

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"deno.enable": true,
2525
"deno.unstable": true,
26+
"deno.config": "./deno.json",
2627
"deno.importMap": "./import_map.json",
2728
"deno.suggest.imports.hosts": {
2829
"https://deno.land": true,

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ALEPH_DEV=true deno run -A --unstable --location=http://localhost cli.ts start .
3131
ALEPH_DEV=true deno run -A --unstable --location=http://localhost cli.ts build ./examples/hello-world -L debug
3232

3333
# run all tests
34-
deno test -A --unstable --location=http://localhost --import-map=./import_map.json
34+
deno test -A --unstable --location=http://localhost -c=deno.json --import-map=import_map.json
3535
```
3636

3737
## Project Structure

bundler/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export class Bundler {
183183
for (const { test, transform } of this.#aleph.transformListeners) {
184184
if (test instanceof RegExp && test.test(mod.specifier)) {
185185
const { jsBuffer, ready, ...rest } = mod
186-
const ret = await transform({ module: { ...structuredClone(rest) }, code, bundleMode: true })
186+
const ret = await transform({ module: rest, code, bundleMode: true })
187187
if (util.isFilledString(ret?.code)) {
188188
code = ret!.code
189189
}

deno.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"dom.asynciterable",
8+
"deno.ns",
9+
"deno.unstable"
10+
],
11+
"jsxFactory": "react",
12+
"jsxFragmentFactory": "Fragment"
13+
}
14+
}

server/aleph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ export class Aleph implements IAleph {
962962
for (const { test, transform } of this.#transformListeners) {
963963
if (test === 'hmr') {
964964
const { jsBuffer, ready, ...rest } = module
965-
const ret = await transform({ module: structuredClone(rest), code })
965+
const ret = await transform({ module: rest, code })
966966
if (util.isFilledString(ret?.code)) {
967967
code = ret!.code
968968
}
@@ -1338,7 +1338,7 @@ export class Aleph implements IAleph {
13381338
for (const { test, transform } of this.#transformListeners) {
13391339
if (test instanceof RegExp && test.test(specifier)) {
13401340
const { jsBuffer, ready, ...rest } = module
1341-
const ret = await transform({ module: { ...structuredClone(rest) }, code: jsCode, map: sourceMap })
1341+
const ret = await transform({ module: rest, code: jsCode, map: sourceMap })
13421342
if (util.isFilledString(ret?.code)) {
13431343
jsCode = ret!.code
13441344
}

0 commit comments

Comments
 (0)