Skip to content

Commit

Permalink
ci: check if bundling for the browser is supported yet (#7387)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Nov 11, 2024
1 parent 4e2830a commit 6da805c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ jobs:
# I'd love to use yalc or something for this, but it doesn't use yarn pack to pack the tarballs
# so we need to fake the install
- name: Import main entry points for each package
id: monopack
run: |
TMP_DIR=$(mktemp -d)
echo TMP_DIR=$TMP_DIR >> $GITHUB_OUTPUT
echo "Re-creating a production environment..."
yarn monopack --target "$TMP_DIR/.tarballs" --no-version
Expand Down Expand Up @@ -138,6 +140,17 @@ jobs:
node -e 'assert.equal(require("zwave-js").libVersion, require("zwave-js/package.json").version)'
node -e 'assert.equal(require("zwave-js").libName, require("zwave-js/package.json").name)'
# Test if bundling for the browser is supported yet
- name: Are we browser yet?
continue-on-error: true
env:
TMP_DIR: ${{ steps.monopack.outputs.TMP_DIR }}
run: |
cd $TMP_DIR
npm i -D esbuild
echo "import 'zwave-js'" > test.mjs
npx esbuild test.mjs --bundle --format=esm --outdir=build --sourcemap --target=es2022 --platform=browser --analyze=verbose --external:node:crypto
# ===================

lint:
Expand Down

0 comments on commit 6da805c

Please sign in to comment.