Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci-npm-javy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ jobs:
tar xvf /tmp/wasmtime.tar.xz --strip-components=1 -C /tmp/wasmtime
echo "/tmp/wasmtime" >> $GITHUB_PATH

- run: npm install
- uses: pnpm/action-setup@v4
with:
package_json_file: npm/javy/package.json

- run: pnpm install
working-directory: npm/javy

- run: npm test
- run: pnpm test
working-directory: npm/javy
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ jobs:
- name: Test
run: make test-native-targets-ci

- uses: pnpm/action-setup@v4
with:
package_json_file: wpt/package.json

- name: WPT
run: |
npm install --prefix wpt
npm test --prefix wpt
pnpm -C wpt install
pnpm -C wpt test
12 changes: 8 additions & 4 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,28 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
package_json_file: npm/javy/package.json

- uses: actions/setup-node@v6
with:
registry-url: "https://registry.npmjs.org"

- name: Install package dependencies
run: npm install
run: pnpm install
working-directory: npm/javy

- name: Build NPM package
run: npm run build
run: pnpm run build
working-directory: npm/javy

- name: Publish NPM package if new version
run: |
if [[ $(cat package.json | jq -r .version) == $(npm view javy version) ]]; then
if [[ $(cat package.json | jq -r .version) == $(pnpm view javy version) ]]; then
echo "Skipping publish because the version is already published"
else
npm publish
pnpm publish --no-git-checks
fi
working-directory: npm/javy
env:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ native-targets: lint-native-targets test-native-targets

# For usage in CI, in which we assume pre-existing assets.
test-wpt-ci:
npm install --prefix wpt
npm test --prefix wpt
pnpm -C wpt install
pnpm -C wpt test

test-wpt: cli test-wpt-ci

Expand Down
4 changes: 2 additions & 2 deletions npm/javy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ writeFileSync(STDIO.Stderr, textEncoder.encode(stderrContent));

## Tests

To run the tests, run `npm test`. It requires you to have a release build of `javy` and have `wasmtime` installed.
To run the tests, run `pnpm test`. It requires you to have a release build of `javy` and have `wasmtime` installed.

## Publishing

Run `npm run build` before running `npm publish`.
Run `pnpm run build` before running `pnpm publish`.
Loading
Loading