Skip to content

Commit 73eb294

Browse files
release: componentize-js v0.18.3-rc.1 (#234)
* release: componentize-js v0.18.3-rc.1 Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(ci): project variable usage * fix: use prepack for component build * fix(ci): enable full build during pack for release * fix(ci): remove cache for sm build * fix(examples): hello world guest build * fix: remove prepack * fix(ci): release process sm build * feat(ci): enable skipping build during prepack step Signed-off-by: Victor Adossi <vadossi@cosmonic.com> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Victor Adossi <vadossi@cosmonic.com> Co-authored-by: vados-cosmonic <123968127+vados-cosmonic@users.noreply.github.com> Co-authored-by: Victor Adossi <vadossi@cosmonic.com>
1 parent 8cbe298 commit 73eb294

File tree

7 files changed

+52
-8
lines changed

7 files changed

+52
-8
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,27 +105,46 @@ jobs:
105105
permissions:
106106
id-token: write
107107
attestations: write
108+
strategy:
109+
matrix:
110+
rust-version:
111+
- 1.80.0
108112
steps:
109113
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110114
with:
111115
fetch-depth: 0
116+
submodules: recursive
117+
118+
- name: Get StarlingMonkey Commit
119+
id: starlingmonkey-commit
120+
run: echo "STARLINGMONKEY_HASH=$(git submodule status | head -c9 | tail -c8)" >> "$GITHUB_OUTPUT"
121+
122+
- name: Install Rust Toolchain
123+
run: |
124+
rustup toolchain install ${{ matrix.rust-version }}
125+
rustup target add wasm32-wasip1 --toolchain ${{ matrix.rust-version }}
126+
rustup target add wasm32-wasip1
112127
113128
# NOTE: we must use a node version new-enough to have --experimental-wasm-jspi
114129
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
115130
with:
116131
node-version: ">=22"
117132

118133
- name: Cache npm install
119-
id: cache-node-modules
120134
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
121135
with:
122136
key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json') }}
123137
path: |
124138
node_modules
139+
125140
- name: Install NPM packages
126141
run: |
127142
npm install
128143
144+
- name: Perform release build
145+
run: |
146+
npm run build:release
147+
129148
- name: Create release package
130149
working-directory: ${{ needs.meta.outputs.project-dir }}
131150
run: |
@@ -138,7 +157,7 @@ jobs:
138157
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
139158
with:
140159
if-no-files-found: error
141-
name: ${{ needs.meta.outputs.project }}
160+
name: componentize-js
142161
path: |
143162
${{ needs.meta.outputs.artifacts-glob }}
144163
@@ -168,6 +187,8 @@ jobs:
168187
needs:
169188
- meta
170189
- test-npm-release
190+
env:
191+
PREPACK_SKIP_BUILD: "true"
171192
steps:
172193
# NOTE: we need to checkout to pull npmrc
173194
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [0.18.3-rc.1] - 2025-06-30
4+
5+
### 🐛 Bug Fixes
6+
7+
* *(ci)* remove packages prefix (#232) by @vados-cosmonic in #232
8+
9+
* *(ci)* remove if for JS projects (#231) by @vados-cosmonic in #231
10+
11+
12+
13+
314
## [0.18.3-rc.0] - 2025-06-27
415

516
### 🚀 Features

examples/hello-world/guest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@bytecodealliance/componentize-js": "*"
55
},
66
"scripts": {
7-
"build": "node componentize.js && cargo build --release",
7+
"build": "node componentize.js",
88
"all": "npm run build"
99
}
1010
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bytecodealliance/componentize-js",
3-
"version": "0.18.3-rc.0",
3+
"version": "0.18.3-rc.1",
44
"homepage": "https://github.com/bytecodealliance/componentize-js#readme",
55
"description": "ESM -> WebAssembly Component creator, via a SpiderMonkey JS engine embedding",
66
"type": "module",
@@ -35,7 +35,7 @@
3535
"test:release": "mocha -u tdd test/test.js --timeout 120000",
3636
"test:weval": "cross-env WEVAL_TEST=1 mocha -u tdd test/test.js --timeout 120000",
3737
"test:debug": "cross-env DEBUG_TEST=1 mocha -u tdd test/test.js --timeout 120000",
38-
"prepublishOnly": "npm run build"
38+
"prepack": "node scripts/prepack.mjs"
3939
},
4040
"files": [
4141
"lib/interfaces",

scripts/prepack.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { env } from 'node:process';
2+
import { spawn } from 'node:child_process';
3+
4+
async function main() {
5+
if (env.PREPACK_SKIP_BUILD) {
6+
console.error(`SKIP_BUILD set, skipping prepack build step`);
7+
return;
8+
}
9+
await spawn('npm', ['run', 'build'], { stdio: 'inherit' });
10+
}
11+
12+
await main();

src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function componentizeCmd (jsSource, opts) {
2222
}
2323

2424
program
25-
.version('0.18.3-rc.0')
25+
.version('0.18.3-rc.1')
2626
.description('Create a component from a JavaScript module')
2727
.usage('<js-source> --wit wit-world.wit -o <component-path>')
2828
.argument('<js-source>', 'JS source file to build')

0 commit comments

Comments
 (0)