diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2069a7a6..d1c86a98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,10 +105,25 @@ 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" + + - name: Install Rust Toolchain + 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,16 +131,20 @@ 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 + - name: Perform release build + run: | + npm run build:release + - name: Create release package working-directory: ${{ needs.meta.outputs.project-dir }} run: | @@ -138,7 +157,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 }} @@ -168,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/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/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" } } 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..3ca6edc4 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", @@ -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": "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(); 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')