fix(node): Fix tls allocation issue (#4514)

This commit is contained in:
LongYinan 2022-05-04 18:04:48 +08:00 committed by GitHub
parent 66f457ce28
commit 3d5c0fa966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 130 additions and 129 deletions

View File

@ -14,7 +14,7 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Cache - name: Cache
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
@ -40,7 +40,7 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Cache - name: Cache
uses: actions/cache@v1 uses: actions/cache@v1
@ -60,7 +60,7 @@ jobs:
# toolchain: nightly-2021-09-30 # toolchain: nightly-2021-09-30
override: true override: true
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
cache: "yarn" cache: "yarn"

View File

@ -8,9 +8,9 @@ jobs:
name: Ensure bump comment name: Ensure bump comment
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"

View File

@ -17,12 +17,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency: swc-bot-auto-rebase concurrency: swc-bot-auto-rebase
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
repository: "swc-project/swc" repository: "swc-project/swc"
ref: "main" ref: "main"
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
@ -44,13 +44,13 @@ jobs:
concurrency: swc-bot-cargo-bump concurrency: swc-bot-cargo-bump
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
repository: "swc-project/swc" repository: "swc-project/swc"
ref: "main" ref: "main"
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"

View File

@ -12,7 +12,7 @@ jobs:
env: env:
RUST_LOG: "0" RUST_LOG: "0"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
# We explicitly do this to cache properly. # We explicitly do this to cache properly.
- name: Install Rust - name: Install Rust
@ -30,7 +30,7 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@ -38,7 +38,7 @@ jobs:
profile: minimal profile: minimal
components: clippy components: clippy
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
cache: "yarn" cache: "yarn"

View File

@ -24,7 +24,7 @@ jobs:
name: Check license name: Check license
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@ -52,7 +52,7 @@ jobs:
- macos-10.15 - macos-10.15
- windows-latest - windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@ -62,7 +62,7 @@ jobs:
with: with:
profile: minimal profile: minimal
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
cache: "yarn" cache: "yarn"
@ -318,12 +318,12 @@ jobs:
git config --system core.autocrlf false git config --system core.autocrlf false
git config --system core.eol lf git config --system core.eol lf
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
# Source map format # Source map format
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
cache: "yarn" cache: "yarn"

View File

@ -7,7 +7,7 @@ jobs:
name: Check dependencies name: Check dependencies
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1

View File

@ -14,7 +14,7 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1

View File

@ -12,7 +12,7 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
# We explicitly do this to cache properly. # We explicitly do this to cache properly.
- name: Install Rust - name: Install Rust
@ -20,13 +20,13 @@ jobs:
with: with:
profile: minimal profile: minimal
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 16
cache: "yarn" cache: "yarn"
- name: Cache - name: Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.cargo/ ~/.cargo/
@ -52,15 +52,15 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 14
cache: "yarn" cache: "yarn"
- name: Cache - name: Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.cargo/ ~/.cargo/

View File

@ -46,18 +46,19 @@ jobs:
target: i686-pc-windows-msvc target: i686-pc-windows-msvc
- host: ubuntu-latest - host: ubuntu-latest
target: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine-zig docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: >- build: >-
rustup target add x86_64-unknown-linux-gnu && set -e &&
RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin && RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin &&
rm -rf target/release/.cargo-lock && rm -rf target/x86_64-unknown-linux-gnu/release/.cargo-lock &&
cp target/release/swc . && chmod +x ./swc && cp target/x86_64-unknown-linux-gnu/release/swc . && chmod +x ./swc &&
yarn build --target x86_64-unknown-linux-gnu --zig --zig-abi-suffix 2.12 && yarn build --target x86_64-unknown-linux-gnu &&
llvm-strip -x swc.linux-x64-gnu.node strip swc.linux-x64-gnu.node
- host: ubuntu-latest - host: ubuntu-latest
target: x86_64-unknown-linux-musl target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: >- build: >-
set -e &&
RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin && RUSTFLAGS='-C target-feature=+sse2 -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin &&
rm -rf target/release/.cargo-lock && rm -rf target/release/.cargo-lock &&
cp target/release/swc . && chmod +x ./swc && cp target/release/swc . && chmod +x ./swc &&
@ -78,13 +79,13 @@ jobs:
strip -x *.node strip -x *.node
- host: ubuntu-latest - host: ubuntu-latest
target: aarch64-unknown-linux-gnu target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine-zig docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: >- build: >-
set -e && set -e &&
rustup target add aarch64-unknown-linux-gnu aarch64-unknown-linux-musl && rustup target add aarch64-unknown-linux-gnu &&
RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc -Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin --target aarch64-unknown-linux-musl && RUSTFLAGS='-Z new-llvm-pass-manager=no' cargo build -p swc_cli --release --features plugin --target aarch64-unknown-linux-gnu &&
cp ./target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc && cp ./target/aarch64-unknown-linux-gnu/release/swc . && chmod +x ./swc &&
yarn build --target aarch64-unknown-linux-gnu --zig --zig-abi-suffix 2.17 && yarn build --target aarch64-unknown-linux-gnu &&
llvm-strip -x swc.linux-arm64-gnu.node llvm-strip -x swc.linux-arm64-gnu.node
- host: ubuntu-18.04 - host: ubuntu-18.04
target: armv7-unknown-linux-gnueabihf target: armv7-unknown-linux-gnueabihf
@ -142,12 +143,12 @@ jobs:
cargo build -p swc_cli --release --target aarch64-pc-windows-msvc cargo build -p swc_cli --release --target aarch64-pc-windows-msvc
cp target/aarch64-pc-windows-msvc/release/swc.exe . cp target/aarch64-pc-windows-msvc/release/swc.exe .
yarn build --target aarch64-pc-windows-msvc --cargo-flags='--no-default-features --features swc_v1' yarn build --target aarch64-pc-windows-msvc --cargo-flags='--no-default-features --features swc_v1'
name: stable - ${{ matrix.settings.target }} - node@14 name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }} runs-on: ${{ matrix.settings.host }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node x64 - name: Setup node x64
uses: actions/setup-node@v2 uses: actions/setup-node@v3
if: matrix.settings.target != 'i686-pc-windows-msvc' if: matrix.settings.target != 'i686-pc-windows-msvc'
with: with:
node-version: 16 node-version: 16
@ -155,7 +156,7 @@ jobs:
cache: yarn cache: yarn
architecture: x64 architecture: x64
- name: Setup node x86 - name: Setup node x86
uses: actions/setup-node@v2 uses: actions/setup-node@v3
if: matrix.settings.target == 'i686-pc-windows-msvc' if: matrix.settings.target == 'i686-pc-windows-msvc'
with: with:
node-version: 16 node-version: 16
@ -174,20 +175,20 @@ jobs:
run: | run: |
yarn yarn
- name: Cache cargo registry - name: Cache cargo registry
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ matrix.settings.target }}-node@14-cargo-registry-trimmed key: ${{ matrix.settings.target }}-node@16-cargo-registry-trimmed
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ matrix.settings.target }}-node@14-cargo-index-trimmed key: ${{ matrix.settings.target }}-node@16-cargo-index-trimmed
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-${{ matrix.settings.target }}-node@16-${{ hashFiles('yarn.lock') }} key: npm-cache-${{ matrix.settings.target }}-node@16
if: ${{ matrix.settings.docker }} if: ${{ matrix.settings.docker }}
- name: Setup toolchain - name: Setup toolchain
@ -208,21 +209,21 @@ jobs:
run: ${{ matrix.settings.build }} run: ${{ matrix.settings.build }}
shell: bash shell: bash
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: bindings-${{ matrix.settings.target }} name: bindings-${{ matrix.settings.target }}
path: | path: |
swc* swc*
if-no-files-found: error if-no-files-found: error
build-freebsd: build-freebsd:
if: ${{ startsWith(github.ref, 'refs/tags/v') }} if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/ci' }}
runs-on: macos-10.15 runs-on: macos-10.15
name: Build FreeBSD name: Build FreeBSD
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
cache: "yarn" cache: "yarn"
@ -271,7 +272,7 @@ jobs:
CARGO_HOME: /usr/local/cargo CARGO_HOME: /usr/local/cargo
RUSTUP_IO_THREADS: 1 RUSTUP_IO_THREADS: 1
CARGO_PROFILE_RELEASE_LTO: false CARGO_PROFILE_RELEASE_LTO: false
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 16 CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 8
with: with:
envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO CARGO_PROFILE_RELEASE_CODEGEN_UNITS envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO CARGO_PROFILE_RELEASE_CODEGEN_UNITS
usesh: true usesh: true
@ -304,7 +305,7 @@ jobs:
rm -rf node_modules rm -rf node_modules
rm -rf target rm -rf target
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: bindings-freebsd name: bindings-freebsd
path: | path: |
@ -322,26 +323,26 @@ jobs:
- host: windows-latest - host: windows-latest
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
node: node:
- "12"
- "14" - "14"
- "16" - "16"
- "18"
runs-on: ${{ matrix.settings.host }} runs-on: ${{ matrix.settings.host }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
check-latest: true check-latest: true
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-test-${{ matrix.settings.target }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} key: npm-cache-test-${{ matrix.settings.target }}-${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: bindings-${{ matrix.settings.target }} name: bindings-${{ matrix.settings.target }}
path: . path: .
@ -361,26 +362,26 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: node:
- "12"
- "14" - "14"
- "16" - "16"
- "18"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
check-latest: true check-latest: true
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-test-linux-x64-gnu-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} key: npm-cache-test-linux-x64-gnu-${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: bindings-x86_64-unknown-linux-gnu name: bindings-x86_64-unknown-linux-gnu
path: . path: .
@ -400,26 +401,26 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: node:
- "12"
- "14" - "14"
- "16" - "16"
- "18"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
check-latest: true check-latest: true
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-test-x86_64-unknown-linux-musl-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} key: npm-cache-test-x86_64-unknown-linux-musl-${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: bindings-x86_64-unknown-linux-musl name: bindings-x86_64-unknown-linux-musl
path: . path: .
@ -439,15 +440,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: node:
- "12"
- "14" - "14"
- "16" - "16"
- "18"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: bindings-aarch64-unknown-linux-gnu name: bindings-aarch64-unknown-linux-gnu
path: . path: .
@ -455,10 +456,10 @@ jobs:
run: ls -R . run: ls -R .
shell: bash shell: bash
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-test-linux-aarch64-gnu-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} key: npm-cache-test-linux-aarch64-gnu-${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
- name: Build TypeScript - name: Build TypeScript
@ -480,9 +481,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: bindings-aarch64-unknown-linux-musl name: bindings-aarch64-unknown-linux-musl
path: . path: .
@ -490,10 +491,10 @@ jobs:
run: ls -R . run: ls -R .
shell: bash shell: bash
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-test-linux-aarch64-musl-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} key: npm-cache-test-linux-aarch64-musl-${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
- name: Build TypeScript - name: Build TypeScript
@ -516,15 +517,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: node:
- "12"
- "14" - "14"
- "16" - "16"
- "18"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: bindings-armv7-unknown-linux-gnueabihf name: bindings-armv7-unknown-linux-gnueabihf
path: . path: .
@ -532,10 +533,10 @@ jobs:
run: ls -R . run: ls -R .
shell: bash shell: bash
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-test-linux-arm-gnueabihf-${{ matrix.node }}-${{ hashFiles('yarn.lock') }} key: npm-cache-test-linux-arm-gnueabihf-${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --ignore-platform --registry https://registry.npmjs.org --network-timeout 300000
- name: Build TypeScript - name: Build TypeScript
@ -563,27 +564,27 @@ jobs:
- test-linux-aarch64-musl-binding - test-linux-aarch64-musl-binding
- build-freebsd - build-freebsd
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 16
- name: Set release name - name: Set release name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Cache NPM dependencies - name: Cache NPM dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: npm-cache-publish-${{ hashFiles('yarn.lock') }} key: npm-cache-publish
- name: Install dependencies - name: Install dependencies
run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000 run: yarn install --ignore-scripts --registry https://registry.npmjs.org --network-timeout 300000
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
path: artifacts path: artifacts

View File

@ -17,15 +17,15 @@ jobs:
name: Build - wasm for node.js name: Build - wasm for node.js
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 16
- name: Cache - name: Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.cargo/ ~/.cargo/
@ -58,15 +58,15 @@ jobs:
name: Build - wasm for web name: Build - wasm for web
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: 14 node-version: 16
- name: Cache - name: Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.cargo/ ~/.cargo/

View File

@ -23,7 +23,7 @@ jobs:
${{ !contains(github.event.head_commit.message, 'chore: ') }} ${{ !contains(github.event.head_commit.message, 'chore: ') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
# We explicitly do this to cache properly. # We explicitly do this to cache properly.
- name: Install Rust - name: Install Rust
@ -34,7 +34,7 @@ jobs:
- name: Install wasm-pack - name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: "16" node-version: "16"
cache: "yarn" cache: "yarn"

46
Cargo.lock generated
View File

@ -1607,9 +1607,9 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389"
[[package]] [[package]]
name = "napi" name = "napi"
version = "2.2.0" version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f88bea662fb056d2115af6a362f89ba8147b26665f3860cc458d25e555d6e60b" checksum = "4c7806930f3d742fade085524e131dd4407c5bd68dff77086cf6b8ef300e0b12"
dependencies = [ dependencies = [
"ctor", "ctor",
"lazy_static", "lazy_static",
@ -1627,9 +1627,9 @@ checksum = "ebd4419172727423cf30351406c54f6cc1b354a2cfb4f1dba3e6cd07f6d5522b"
[[package]] [[package]]
name = "napi-derive" name = "napi-derive"
version = "2.2.0" version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4f3a8ed8cdbf81628c394ef5ad22bf9e6af312552bca0b8918b0a3c06ab750d" checksum = "35d20a0de501d6ca0b007d008fefbdc875bc8947b7ee85964cff4a975c83fafb"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"napi-derive-backend", "napi-derive-backend",
@ -1640,9 +1640,9 @@ dependencies = [
[[package]] [[package]]
name = "napi-derive-backend" name = "napi-derive-backend"
version = "1.0.26" version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b12b293d2214c58765fbed84d9359d22384cb6f4d9610ed4d807040ed7f47ee" checksum = "11a711157fd22437c2997896210abd4c5707f5e2d9f48de91cb6bb02b4a6cb6c"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"once_cell", "once_cell",
@ -4932,15 +4932,15 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "windows" name = "windows"
version = "0.33.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0128fa8e65e0616e45033d68dc0b7fbd521080b7844e5cad3a4a4d201c4b2bd2" checksum = "e53b97a83176b369b0eb2fd8158d4ae215357d02df9d40c1e1bf1879c5482c80"
dependencies = [ dependencies = [
"windows_aarch64_msvc 0.33.0", "windows_aarch64_msvc 0.36.1",
"windows_i686_gnu 0.33.0", "windows_i686_gnu 0.36.1",
"windows_i686_msvc 0.33.0", "windows_i686_msvc 0.36.1",
"windows_x86_64_gnu 0.33.0", "windows_x86_64_gnu 0.36.1",
"windows_x86_64_msvc 0.33.0", "windows_x86_64_msvc 0.36.1",
] ]
[[package]] [[package]]
@ -4964,9 +4964,9 @@ checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
version = "0.33.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
@ -4976,9 +4976,9 @@ checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.33.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
@ -4988,9 +4988,9 @@ checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.33.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
@ -5000,9 +5000,9 @@ checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.33.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
@ -5012,9 +5012,9 @@ checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.33.0" version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
[[package]] [[package]]
name = "winreg" name = "winreg"

View File

@ -82,7 +82,7 @@
"@babel/preset-react": "^7.13.13", "@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.13.0", "@babel/preset-typescript": "^7.13.0",
"@babel/types": "^7.14.0", "@babel/types": "^7.14.0",
"@napi-rs/cli": "^2.4.5", "@napi-rs/cli": "^2.7.0",
"@swc/helpers": "^0.3.8", "@swc/helpers": "^0.3.8",
"@taplo/cli": "^0.3.2", "@taplo/cli": "^0.3.2",
"@types/jest": "^26.0.23", "@types/jest": "^26.0.23",

View File

@ -1432,10 +1432,10 @@
"@types/yargs" "^16.0.0" "@types/yargs" "^16.0.0"
chalk "^4.0.0" chalk "^4.0.0"
"@napi-rs/cli@^2.4.5": "@napi-rs/cli@^2.7.0":
version "2.4.5" version "2.7.0"
resolved "https://registry.yarnpkg.com/@napi-rs/cli/-/cli-2.4.5.tgz#0f33e54e08c2e875c729697eb81f1c36342f0205" resolved "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.7.0.tgz#afcfc6f8476f1c2c259c626270841bd24fc52588"
integrity sha512-CLa3PSHh4Y760OXkHidzfHavVtfbQyfMhj3sWpta3SZjbWMk0tbdPhRez9y8KVApVVWjBxz5agEeFMfxxr+KTg== integrity sha512-bQb+r9/xW8LFRbpEN7A/4fX8LnEWbI0JzyOzXGDpO+cI8dXRxX7OPySOpzT2nBgP1brA2Ydkw/t9lyxLN9TlxQ==
"@nodelib/fs.scandir@2.1.5": "@nodelib/fs.scandir@2.1.5":
version "2.1.5" version "2.1.5"