From d1a1a5a283892f8ecf7819cd478798aac54e0ed0 Mon Sep 17 00:00:00 2001 From: vados-cosmonic <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:54:40 +0000 Subject: [PATCH 1/9] release: componentize-js v0.18.3-rc.1 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 4 ++-- package.json | 2 +- src/cli.js | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e55b78a1..37deff5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [0.18.3-rc.1] - 2025-06-30 + +### 🐛 Bug Fixes + +* *(ci)* remove packages prefix (#232) by @vados-cosmonic in #232 + +* *(ci)* remove if for JS projects (#231) by @vados-cosmonic in #231 + + + + ## [0.18.3-rc.0] - 2025-06-27 ### 🚀 Features diff --git a/package-lock.json b/package-lock.json index 79338e8a..43b07156 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bytecodealliance/componentize-js", - "version": "0.18.2", + "version": "0.18.3-rc.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@bytecodealliance/componentize-js", - "version": "0.18.2", + "version": "0.18.3-rc.0", "workspaces": [ "." ], diff --git a/package.json b/package.json index 9516db99..8b9b8037 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bytecodealliance/componentize-js", - "version": "0.18.3-rc.0", + "version": "0.18.3-rc.1", "homepage": "https://github.com/bytecodealliance/componentize-js#readme", "description": "ESM -> WebAssembly Component creator, via a SpiderMonkey JS engine embedding", "type": "module", diff --git a/src/cli.js b/src/cli.js index 0caf6594..7b9fe26d 100755 --- a/src/cli.js +++ b/src/cli.js @@ -22,7 +22,7 @@ export async function componentizeCmd (jsSource, opts) { } program - .version('0.18.3-rc.0') + .version('0.18.3-rc.1') .description('Create a component from a JavaScript module') .usage(' --wit wit-world.wit -o ') .argument('', 'JS source file to build') From 554969b920f18c2665f203378229a60c294bc9b8 Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 20:57:52 +0900 Subject: [PATCH 2/9] fix(ci): project variable usage --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2069a7a6..b93191ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,7 +138,7 @@ jobs: - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: if-no-files-found: error - name: ${{ needs.meta.outputs.project }} + name: componentize-js path: | ${{ needs.meta.outputs.artifacts-glob }} From e8caeaacf58686aa4d4ee46f92c8d45e40b28705 Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:04:51 +0900 Subject: [PATCH 3/9] fix: use prepack for component build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b9b8037..6bb18fa5 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "test:release": "mocha -u tdd test/test.js --timeout 120000", "test:weval": "cross-env WEVAL_TEST=1 mocha -u tdd test/test.js --timeout 120000", "test:debug": "cross-env DEBUG_TEST=1 mocha -u tdd test/test.js --timeout 120000", - "prepublishOnly": "npm run build" + "prepack": "npm run build" }, "files": [ "lib/interfaces", From 4134454d490279844eaaf715178128877d7728c6 Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:18:19 +0900 Subject: [PATCH 4/9] fix(ci): enable full build during pack for release --- .github/workflows/release.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b93191ed..df27042a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,10 +105,32 @@ jobs: permissions: id-token: write attestations: write + strategy: + matrix: + rust-version: + - 1.80.0 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 + submodules: recursive + + - name: Get StarlingMonkey Commit + id: starlingmonkey-commit + run: echo "STARLINGMONKEY_HASH=$(git submodule status | head -c9 | tail -c8)" >> "$GITHUB_OUTPUT" + + - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + id: starlingmonkey-build + with: + key: starlingmonkey-release-${{ steps.starlingmonkey-commit.outputs.STARLINGMONKEY_HASH }} + path: lib + + - name: Install Rust Toolchain + if: steps.starlingmonkey-build.outputs.cache-hit != 'true' + run: | + rustup toolchain install ${{ matrix.rust-version }} + rustup target add wasm32-wasip1 --toolchain ${{ matrix.rust-version }} + rustup target add wasm32-wasip1 # NOTE: we must use a node version new-enough to have --experimental-wasm-jspi - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 @@ -116,12 +138,12 @@ jobs: node-version: ">=22" - name: Cache npm install - id: cache-node-modules uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json') }} path: | node_modules + - name: Install NPM packages run: | npm install From fa335c663e1c454fa538b75cda2f8f59de19e4f9 Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:21:47 +0900 Subject: [PATCH 5/9] fix(ci): remove cache for sm build --- .github/workflows/release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df27042a..f2ef5f5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -119,14 +119,7 @@ jobs: id: starlingmonkey-commit run: echo "STARLINGMONKEY_HASH=$(git submodule status | head -c9 | tail -c8)" >> "$GITHUB_OUTPUT" - - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 - id: starlingmonkey-build - with: - key: starlingmonkey-release-${{ steps.starlingmonkey-commit.outputs.STARLINGMONKEY_HASH }} - path: lib - - name: Install Rust Toolchain - if: steps.starlingmonkey-build.outputs.cache-hit != 'true' run: | rustup toolchain install ${{ matrix.rust-version }} rustup target add wasm32-wasip1 --toolchain ${{ matrix.rust-version }} From d5b1fcc9024f98fad3bea16589b58785687305e0 Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:53:29 +0900 Subject: [PATCH 6/9] fix(examples): hello world guest build --- examples/hello-world/guest/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/hello-world/guest/package.json b/examples/hello-world/guest/package.json index baa85d49..f766077e 100644 --- a/examples/hello-world/guest/package.json +++ b/examples/hello-world/guest/package.json @@ -4,7 +4,7 @@ "@bytecodealliance/componentize-js": "*" }, "scripts": { - "build": "node componentize.js && cargo build --release", + "build": "node componentize.js", "all": "npm run build" } } From c89bc3cd87389c842ba696a0ca5e0251d630a3be Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 22:20:12 +0900 Subject: [PATCH 7/9] fix: remove prepack --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 6bb18fa5..1ee4675c 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "test": "mocha -u tdd test/test.js --timeout 120000", "test:release": "mocha -u tdd test/test.js --timeout 120000", "test:weval": "cross-env WEVAL_TEST=1 mocha -u tdd test/test.js --timeout 120000", - "test:debug": "cross-env DEBUG_TEST=1 mocha -u tdd test/test.js --timeout 120000", - "prepack": "npm run build" + "test:debug": "cross-env DEBUG_TEST=1 mocha -u tdd test/test.js --timeout 120000" }, "files": [ "lib/interfaces", From fd236d94764f3ec56a89d1339f901933bfae1c54 Mon Sep 17 00:00:00 2001 From: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com> Date: Mon, 30 Jun 2025 22:25:33 +0900 Subject: [PATCH 8/9] fix(ci): release process sm build --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f2ef5f5d..f9ef31ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -141,6 +141,10 @@ jobs: run: | npm install + - name: Perform release build + run: | + npm run build:release + - name: Create release package working-directory: ${{ needs.meta.outputs.project-dir }} run: | From ebb4e8395f495b78de903f9c1b5fbfd4b6aeb52d Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Tue, 1 Jul 2025 01:21:02 +0900 Subject: [PATCH 9/9] feat(ci): enable skipping build during prepack step Signed-off-by: Victor Adossi --- .github/workflows/release.yml | 2 ++ package.json | 3 ++- scripts/prepack.mjs | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 scripts/prepack.mjs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f9ef31ce..d1c86a98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -187,6 +187,8 @@ jobs: needs: - meta - test-npm-release + env: + PREPACK_SKIP_BUILD: "true" steps: # NOTE: we need to checkout to pull npmrc - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/package.json b/package.json index 1ee4675c..3ca6edc4 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "test": "mocha -u tdd test/test.js --timeout 120000", "test:release": "mocha -u tdd test/test.js --timeout 120000", "test:weval": "cross-env WEVAL_TEST=1 mocha -u tdd test/test.js --timeout 120000", - "test:debug": "cross-env DEBUG_TEST=1 mocha -u tdd test/test.js --timeout 120000" + "test:debug": "cross-env DEBUG_TEST=1 mocha -u tdd test/test.js --timeout 120000", + "prepack": "node scripts/prepack.mjs" }, "files": [ "lib/interfaces", diff --git a/scripts/prepack.mjs b/scripts/prepack.mjs new file mode 100644 index 00000000..017d03bf --- /dev/null +++ b/scripts/prepack.mjs @@ -0,0 +1,12 @@ +import { env } from 'node:process'; +import { spawn } from 'node:child_process'; + +async function main() { + if (env.PREPACK_SKIP_BUILD) { + console.error(`SKIP_BUILD set, skipping prepack build step`); + return; + } + await spawn('npm', ['run', 'build'], { stdio: 'inherit' }); +} + +await main();