Skip to content

Commit

Permalink
ci: hash lock the swc native dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
bitgopatmcl committed Aug 22, 2023
1 parent 5e07d2f commit 340c14b
Show file tree
Hide file tree
Showing 4 changed files with 10,994 additions and 4,841 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ jobs:
- name: Install dependencies
run: |
npm ci
# `@swc/core` has a postinstall hook that in GHA pulls in the wasm version of swc. This pulls in the native
# binary version instead, which is faster and more reliable. Also, the wasm version seems to fail with a
# strange serde error in CI. ("Error: invalid type: unit value, expected struct Options")
# See: https://github.com/swc-project/swc/blob/main/postinstall.js#L197-L200
core_version="$(jq --raw-output '.packages."node_modules/@swc/core".optionalDependencies."@swc/core-linux-x64-gnu"' < ./package-lock.json)"
npm install -no-save --loglevel=error --prefer-offline --no-audit --progress=false "@swc/core-linux-x64-gnu@${core_version}"
- name: Restore Turbo Cache
uses: actions/cache@v3
Expand Down
Loading

0 comments on commit 340c14b

Please sign in to comment.