Skip to content

Commit 4199925

Browse files
committed
[autorelease] [skip py] Update @yowasp/runtime.
This commit also ships a single unified (Node+browser) bundle, and consequently requires extension version 0.2.4 or later.
1 parent eaa89c0 commit 4199925

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

npmjs/package-in.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,25 @@
1515
"type": "module",
1616
"files": [
1717
"lib/api.d.ts",
18-
"gen/bundle-*.js",
18+
"gen/bundle.js",
1919
"gen/resources-*.js",
2020
"gen/*.wasm",
21-
"gen/share"
21+
"gen/share/"
2222
],
2323
"exports": {
24-
"node": "./gen/bundle-node.js",
25-
"browser": "./gen/bundle-browser.js",
24+
"default": "./gen/bundle.js",
2625
"types": "./lib/api.d.ts"
2726
},
2827
"types": "./lib/api.d.ts",
2928
"devDependencies": {
3029
"@bytecodealliance/jco": "0.14.2",
31-
"@yowasp/runtime": "6.0.30",
30+
"@yowasp/runtime": "6.0.34",
3231
"esbuild": "^0.19.8"
3332
},
3433
"scripts": {
35-
"pack": "yowasp-pack-resources gen/resources-yosys.js gen ../yosys-build/share",
3634
"transpile": "jco new ../yosys-build/yosys.wasm --wasi-command --output yosys.wasm && jco transpile yosys.wasm --instantiation async --no-typescript --no-namespaced-exports --map 'wasi:io/*=runtime#io' --map 'wasi:cli/*=runtime#cli' --map 'wasi:clocks/*=runtime#*' --map 'wasi:filesystem/*=runtime#fs' --map 'wasi:random/*=runtime#random' --out-dir gen/",
37-
"build:node": "esbuild --bundle lib/api.js --outfile=gen/bundle-node.js --format=esm --platform=node",
38-
"build:browser": "esbuild --bundle lib/api.js --outfile=gen/bundle-browser.js --format=esm --platform=browser"
35+
"pack": "yowasp-pack-resources gen/resources-yosys.js gen ../yosys-build/share",
36+
"build": "esbuild --bundle lib/api.js --outfile=gen/bundle.js --format=esm --platform=node",
37+
"all": "npm run transpile && npm run pack && npm run build"
3938
}
4039
}

package-npmjs.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ cd $(dirname $0)/npmjs
66

77
${PYTHON} prepare.py
88
npm install
9-
npm run transpile
10-
npm run pack
11-
npm run build:node
12-
npm run build:browser
9+
npm run all
1310

1411
mkdir -p dist
1512
npm pack --pack-destination dist

0 commit comments

Comments
 (0)