Skip to content

Commit

Permalink
Merge pull request #699 from napi-rs/upgrade-deps
Browse files Browse the repository at this point in the history
chore: upgrade dependencies
  • Loading branch information
Brooooooklyn authored Jul 19, 2023
2 parents 088be12 + 213e455 commit aa23f51
Show file tree
Hide file tree
Showing 16 changed files with 1,154 additions and 1,824 deletions.
87 changes: 47 additions & 40 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ name: CI
env:
DEBUG: 'napi:*'
MACOSX_DEPLOYMENT_TARGET: '10.13'
NODE_OPTIONS: '--max-old-space-size=3072'
CARGO_UNSTABLE_TARGET_APPLIES_TO_HOST: true
CARGO_TARGET_APPLIES_TO_HOST: false

permissions:
contents: write
id-token: write

on:
push:
branches:
Expand All @@ -32,7 +35,7 @@ jobs:
target: 'x86_64-pc-windows-msvc'
- host: windows-latest
build: |
yarn lerna exec "yarn build --target i686-pc-windows-msvc" --concurrency 1 --stream --no-prefix
yarn build --target i686-pc-windows-msvc
yarn test -s
target: 'i686-pc-windows-msvc'
- host: ubuntu-latest
Expand All @@ -41,7 +44,7 @@ jobs:
build: >-
set -e &&
rustup target add x86_64-unknown-linux-gnu &&
yarn lerna exec "yarn build --target x86_64-unknown-linux-gnu" --concurrency 1 --stream --no-prefix &&
yarn build --target x86_64-unknown-linux-gnu &&
strip packages/*/*.node
- host: ubuntu-latest
target: 'x86_64-unknown-linux-musl'
Expand All @@ -55,31 +58,31 @@ jobs:
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
yarn lerna exec "yarn build --target aarch64-apple-darwin" --concurrency 1 --stream --no-prefix
yarn build --target aarch64-apple-darwin
strip -x packages/*/*.node
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: >-
rustup target add aarch64-unknown-linux-gnu &&
yarn lerna exec "yarn build --target aarch64-unknown-linux-gnu" --concurrency 1 --stream --no-prefix &&
yarn build --target aarch64-unknown-linux-gnu &&
llvm-strip packages/*/*.node
- host: ubuntu-latest
target: 'armv7-unknown-linux-gnueabihf'
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
build: yarn lerna exec "yarn build --target armv7-unknown-linux-gnueabihf" --concurrency 1 --stream --no-prefix
build: yarn build --target armv7-unknown-linux-gnueabihf
- host: ubuntu-latest
target: aarch64-linux-android
build: |
yarn lerna exec "yarn build --target aarch64-linux-android" --concurrency 1 --stream --no-prefix
yarn build --target aarch64-linux-android
${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node
- host: ubuntu-latest
architecture: x64
target: armv7-linux-androideabi
build: |
yarn lerna exec "yarn build --target armv7-linux-androideabi" --concurrency 1 --stream --no-prefix
yarn build --target armv7-linux-androideabi
${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/*/*.node
- host: ubuntu-latest
target: 'aarch64-unknown-linux-musl'
Expand All @@ -88,10 +91,12 @@ jobs:
build: >-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
yarn lerna exec "yarn build --target aarch64-unknown-linux-musl" --concurrency 1 --stream --no-prefix
yarn build --target aarch64-unknown-linux-musl
- host: windows-latest
target: 'aarch64-pc-windows-msvc'
build: yarn lerna exec "yarn build --target aarch64-pc-windows-msvc" --ignore @node-rs/jsonwebtoken --concurrency 1 --stream --no-prefix
build: |
npm i -g @napi-rs/cli
yarn workspaces foreach --no-private -j 1 --exclude @node-rs/jsonwebtoken run build --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
Expand All @@ -104,14 +109,13 @@ jobs:
if: ${{ !matrix.settings.docker }}
with:
node-version: 18
check-latest: true
cache: yarn

- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: nightly-2023-04-23
toolchain: nightly-2023-07-19
targets: ${{ matrix.settings.target }}

- name: Cache cargo registry
Expand Down Expand Up @@ -158,7 +162,6 @@ jobs:
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
check-latest: true
cache: yarn
architecture: x86

Expand Down Expand Up @@ -192,9 +195,7 @@ jobs:
usesh: true
mem: 3000
prepare: |
pkg install -y -f curl node libnghttp2
curl -qL https://www.npmjs.com/install.sh | sh
npm install --location=global --ignore-scripts yarn
pkg install -y -f curl node libnghttp2 npm yarn
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
export PATH="/usr/local/cargo/bin:$PATH"
Expand Down Expand Up @@ -239,7 +240,7 @@ jobs:
target: 'x86_64-apple-darwin'
- host: windows-latest
target: 'x86_64-pc-windows-msvc'
node: ['14', '16', '18']
node: ['16', '18']
runs-on: ${{ matrix.settings.host }}

steps:
Expand All @@ -251,7 +252,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn

- name: Install dependencies
Expand Down Expand Up @@ -286,7 +286,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18']
node: ['16', '18']
runs-on: ubuntu-latest

steps:
Expand All @@ -296,7 +296,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn

- name: Install dependencies
Expand Down Expand Up @@ -325,7 +324,6 @@ jobs:
image: node:${{ matrix.node }}-slim
options: -v ${{ github.workspace }}:/build -w /build
run: |
yarn lerna link
yarn test
test-linux-x64-centos-7:
Expand Down Expand Up @@ -364,7 +362,6 @@ jobs:

- name: Test bindings
run: |
yarn lerna link
yarn test -s
test-linux-x64-musl-binding:
Expand All @@ -374,7 +371,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18']
node: ['16', '18']
runs-on: ubuntu-latest

steps:
Expand All @@ -384,7 +381,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn

- name: Install dependencies
Expand Down Expand Up @@ -415,7 +411,6 @@ jobs:
image: node:${{ matrix.node }}-alpine
options: -v ${{ github.workspace }}:/build -w /build
run: |
yarn lerna link
yarn test
test-linux-aarch64-gnu-binding:
Expand All @@ -425,12 +420,10 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18']
node: ['16', '18']
runs-on: ubuntu-latest

steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset

- uses: actions/checkout@v3

- name: Download artifacts
Expand All @@ -453,11 +446,17 @@ jobs:
run: ls -R packages
shell: bash

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/napi-rs/napi-rs/nodejs:aarch64-${{ matrix.node }}
options: -v ${{ github.workspace }}:/build -w /build
image: node:${{ matrix.node }}-slim
options: --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build
run: |
set -e
yarn build:ts
Expand All @@ -472,8 +471,6 @@ jobs:
runs-on: ubuntu-latest

steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset

- uses: actions/checkout@v3

- name: Install dependencies
Expand All @@ -496,14 +493,19 @@ jobs:
run: ls -R packages
shell: bash

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: multiarch/alpine:aarch64-latest-stable
options: -v ${{ github.workspace }}:/build -w /build
image: node:lts-alpine
options: --platform linux/arm64 -v ${{ github.workspace }}:/build -w /build
run: |
set -e
apk add nodejs npm yarn
yarn build:ts
yarn test
Expand All @@ -514,12 +516,10 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ['14', '16', '18']
node: ['16', '18']
runs-on: ubuntu-latest

steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset

- uses: actions/checkout@v3

- name: Install dependencies
Expand All @@ -541,11 +541,17 @@ jobs:
run: ls -R ./packages
shell: bash

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/napi-rs/napi-rs/nodejs:armhf-${{ matrix.node }}
options: -v ${{ github.workspace }}:/build -w /build
image: node:${{ matrix.node }}-bullseye-slim
options: --platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build
run: |
set -e
yarn build:ts
Expand Down Expand Up @@ -598,6 +604,7 @@ jobs:
- name: Lerna publish
if: "startsWith(github.event.head_commit.message, 'chore(release): publish')"
run: |
npm config set provenance true
find ./packages/ -type d -maxdepth 1 -exec cp LICENSE {} \;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
yarn lerna publish from-package --no-verify-access --yes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-04-23
toolchain: nightly-2023-07-19
components: rustfmt, clippy

- name: 'Install dependencies'
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"./packages/jsonwebtoken",
"./packages/xxhash",
]
resolver = "2"

[profile.release]
codegen-units = 1
Expand Down
2 changes: 0 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent",
"command": {
"version": {
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@
},
"devDependencies": {
"@napi-rs/cli": "2.16.2",
"@swc-node/core": "^1.10.3",
"@swc-node/register": "^1.6.4",
"@swc/core": "^1.3.53",
"@swc-node/core": "^1.10.4",
"@swc-node/register": "^1.6.6",
"@swc/core": "^1.3.70",
"@taplo/cli": "^0.5.2",
"@types/node": "^18.16.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"ava": "^5.2.0",
"@types/node": "^20.4.2",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"ava": "^5.3.1",
"benchmark": "^2.1.4",
"codecov": "^3.8.3",
"cross-env": "^7.0.3",
"eslint": "^8.39.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"lerna": "^6.6.1",
"lint-staged": "^13.2.1",
"lerna": "^7.1.4",
"lint-staged": "^13.2.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
"typescript": "^5.0.4"
"tslib": "^2.6.0",
"typescript": "^5.1.6"
},
"lint-staged": {
"*.@(js|ts|tsx)": [
Expand Down
1 change: 1 addition & 0 deletions packages/argon2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"version": "napi version"
},
"devDependencies": {
"@napi-rs/cli": "2.16.2",
"argon2": "^0.30.3",
"cross-env": "^7.0.3"
}
Expand Down
1 change: 1 addition & 0 deletions packages/bcrypt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"url": "https://github.com/napi-rs/node-rs/issues"
},
"devDependencies": {
"@napi-rs/cli": "2.16.2",
"@types/bcrypt": "^5.0.0",
"bcrypt": "^5.1.0",
"bcryptjs": "^2.4.3",
Expand Down
1 change: 1 addition & 0 deletions packages/crc32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"url": "https://github.com/napi-rs/node-rs/issues"
},
"devDependencies": {
"@napi-rs/cli": "2.16.2",
"@types/crc": "^3.8.0",
"buffer": "^6.0.3",
"crc": "^4.3.2",
Expand Down
Loading

0 comments on commit aa23f51

Please sign in to comment.