From d864c712281c5af6efd5c3d3a07205cba6dac0c4 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 30 Jul 2021 12:54:59 +0800 Subject: [PATCH 1/3] chore: rust 1.54.0 clippy suggestions --- bench/src/get_set_property.rs | 8 ++++---- build/src/windows.rs | 2 +- napi/src/js_values/ser.rs | 2 +- test_module/src/class.rs | 8 ++++---- test_module/src/object.rs | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bench/src/get_set_property.rs b/bench/src/get_set_property.rs index 1e5d3d01..9962cb78 100644 --- a/bench/src/get_set_property.rs +++ b/bench/src/get_set_property.rs @@ -44,16 +44,16 @@ pub fn register_js(exports: &mut JsObject, env: &Env) -> Result<()> { "TestClass", test_class_constructor, &[ - Property::new(&env, "miterNative")? + Property::new(env, "miterNative")? .with_getter(get_miter_native) .with_setter(set_miter_native), - Property::new(&env, "miter")? + Property::new(env, "miter")? .with_getter(get_miter) .with_setter(set_miter), - Property::new(&env, "lineJoinNative")? + Property::new(env, "lineJoinNative")? .with_getter(get_line_join_native) .with_setter(set_line_join_native), - Property::new(&env, "lineJoin")? + Property::new(env, "lineJoin")? .with_getter(get_line_join) .with_setter(set_line_join), ], diff --git a/build/src/windows.rs b/build/src/windows.rs index 362ccc53..39bc815f 100644 --- a/build/src/windows.rs +++ b/build/src/windows.rs @@ -44,7 +44,7 @@ pub fn setup() { // If file does not exist, download it. if metadata(&node_lib_file_path).is_err() { - let node_lib = copy_node_lib(&arch); + let node_lib = copy_node_lib(arch); write(&node_lib_file_path, &node_lib).expect(&format!( "Could not save file to {}", diff --git a/napi/src/js_values/ser.rs b/napi/src/js_values/ser.rs index 762d3be9..3bc30316 100644 --- a/napi/src/js_values/ser.rs +++ b/napi/src/js_values/ser.rs @@ -11,7 +11,7 @@ pub(crate) struct Ser<'env>(pub(crate) &'env Env); impl<'env> Ser<'env> { fn new(env: &'env Env) -> Self { - Self(&env) + Self(env) } } diff --git a/test_module/src/class.rs b/test_module/src/class.rs index 615d0123..78832129 100644 --- a/test_module/src/class.rs +++ b/test_module/src/class.rs @@ -8,8 +8,8 @@ struct NativeClass { #[js_function(1)] fn create_test_class(ctx: CallContext) -> Result { - let add_count_method = Property::new(&ctx.env, "addCount")?.with_method(add_count); - let add_native_count = Property::new(&ctx.env, "addNativeCount")?.with_method(add_native_count); + let add_count_method = Property::new(ctx.env, "addCount")?.with_method(add_count); + let add_native_count = Property::new(ctx.env, "addNativeCount")?.with_method(add_native_count); let properties = vec![add_count_method, add_native_count]; ctx .env @@ -47,8 +47,8 @@ fn add_native_count(ctx: CallContext) -> Result { #[js_function(1)] fn new_test_class(ctx: CallContext) -> Result { - let add_count_method = Property::new(&ctx.env, "addCount")?.with_method(add_count); - let add_native_count = Property::new(&ctx.env, "addNativeCount")?.with_method(add_native_count); + let add_count_method = Property::new(ctx.env, "addCount")?.with_method(add_count); + let add_native_count = Property::new(ctx.env, "addNativeCount")?.with_method(add_native_count); let properties = vec![add_count_method, add_native_count]; let test_class = ctx diff --git a/test_module/src/object.rs b/test_module/src/object.rs index a3a9f2c0..4728f072 100644 --- a/test_module/src/object.rs +++ b/test_module/src/object.rs @@ -135,8 +135,8 @@ fn test_delete_element(ctx: CallContext) -> Result { #[js_function(1)] fn test_define_properties(ctx: CallContext) -> Result { let mut obj = ctx.get::(0)?; - let add_method = Property::new(&ctx.env, "add")?.with_method(add); - let readonly_property = Property::new(&ctx.env, "ro")?.with_getter(readonly_getter); + let add_method = Property::new(ctx.env, "add")?.with_method(add); + let readonly_property = Property::new(ctx.env, "ro")?.with_getter(readonly_getter); let properties = vec![add_method, readonly_property]; obj.define_properties(&properties)?; obj.set_named_property("count", ctx.env.create_int32(0)?)?; From 438e3507bfdcc4cb0e10c1f75e5f235e4142631c Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 30 Jul 2021 12:59:38 +0800 Subject: [PATCH 2/3] docs: add next.js into README --- README.md | 12 +++++++++--- images/nextjs.svg | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 images/nextjs.svg diff --git a/README.md b/README.md index d964fc6d..618758e4 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,23 @@ A minimal library for building compiled `Node.js` add-ons in `Rust`.

- Prisma + Prisma     - swc + swc     - Parcel + Parcel + +   + + next.js +   + nextjs.svg

diff --git a/images/nextjs.svg b/images/nextjs.svg new file mode 100644 index 00000000..b40d2190 --- /dev/null +++ b/images/nextjs.svg @@ -0,0 +1,4 @@ + + + + From e99aba0a579c2dc5cdeb19b395e933c397504cbd Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 30 Jul 2021 13:20:40 +0800 Subject: [PATCH 3/3] ci: upgrade to actions/cache@v2 --- .github/workflows/android.yml | 6 ++-- .github/workflows/bench.yaml | 6 ++-- .github/workflows/lint.yaml | 6 ++-- .github/workflows/linux-aarch64-musl.yaml | 6 ++-- .github/workflows/linux-aarch64.yaml | 6 ++-- .github/workflows/linux-armv7.yaml | 6 ++-- .github/workflows/linux-musl.yaml | 4 +-- .github/workflows/memory-test.yml | 8 ++--- .github/workflows/napi3.yaml | 8 ++--- .github/workflows/test.yaml | 6 ++-- .github/workflows/windows-arm.yml | 6 ++-- .github/workflows/windows-i686.yml | 6 ++-- cli/src/new/ci-yml.ts | 44 +++++++++++------------ 13 files changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 58a740c1..35cc9474 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -40,19 +40,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-macos-android-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-macos-android-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-macos-android-node@14-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 8f344d24..b738f3eb 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -37,19 +37,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: bench-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: bench-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: bench-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index ab268aef..cb368c0b 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -34,19 +34,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: lint-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: lint-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: lint-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/linux-aarch64-musl.yaml b/.github/workflows/linux-aarch64-musl.yaml index c361e9f7..f799c896 100644 --- a/.github/workflows/linux-aarch64-musl.yaml +++ b/.github/workflows/linux-aarch64-musl.yaml @@ -42,19 +42,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-linux-aarch64-gnu-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-linux-aarch64-gnu-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-linux-aarch64-gnu-node@14-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/linux-aarch64.yaml b/.github/workflows/linux-aarch64.yaml index 94af14dc..57953426 100644 --- a/.github/workflows/linux-aarch64.yaml +++ b/.github/workflows/linux-aarch64.yaml @@ -42,19 +42,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-linux-aarch64-gnu-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-linux-aarch64-gnu-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-linux-aarch64-gnu-node@14-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/linux-armv7.yaml b/.github/workflows/linux-armv7.yaml index 3f5098d9..06eb10ad 100644 --- a/.github/workflows/linux-armv7.yaml +++ b/.github/workflows/linux-armv7.yaml @@ -42,19 +42,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-linux-armv7-gnu-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-linux-armv7-gnu-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-linux-armv7-gnu-node@14-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/linux-musl.yaml b/.github/workflows/linux-musl.yaml index 7d566644..0ada20e7 100644 --- a/.github/workflows/linux-musl.yaml +++ b/.github/workflows/linux-musl.yaml @@ -18,13 +18,13 @@ jobs: - uses: actions/checkout@v2 - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-alpine-node-alpine-@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-alpine-node-alpine-@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} diff --git a/.github/workflows/memory-test.yml b/.github/workflows/memory-test.yml index 192ea021..5a7130e4 100644 --- a/.github/workflows/memory-test.yml +++ b/.github/workflows/memory-test.yml @@ -36,25 +36,25 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-memory-leak-detect-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-memory-leak-detect-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: target key: stable-memory-leak-detect-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: memory-leak-detect-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/napi3.yaml b/.github/workflows/napi3.yaml index 62ff478b..7c0a6ad2 100644 --- a/.github/workflows/napi3.yaml +++ b/.github/workflows/napi3.yaml @@ -35,23 +35,23 @@ jobs: with: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-napi3-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-napi3-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: target key: stable-napi3-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: napi3-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index df309f39..43346444 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,19 +42,19 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-${{ matrix.os }}-node@${{ matrix.node }}-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-${{ matrix.os }}gnu-node@${{ matrix.node }}-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-${{ matrix.os }}-node@${{ matrix.node }}-${{ hashFiles('yarn.lock') }} diff --git a/.github/workflows/windows-arm.yml b/.github/workflows/windows-arm.yml index 4788e255..8d439b20 100644 --- a/.github/workflows/windows-arm.yml +++ b/.github/workflows/windows-arm.yml @@ -23,7 +23,7 @@ jobs: node-version: 14 - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-windows-arm64-node@lts-${{ hashFiles('yarn.lock') }} @@ -50,13 +50,13 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-windows-arm64-node@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-windows-arm64-node@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} diff --git a/.github/workflows/windows-i686.yml b/.github/workflows/windows-i686.yml index edae86ce..f383269b 100644 --- a/.github/workflows/windows-i686.yml +++ b/.github/workflows/windows-i686.yml @@ -26,7 +26,7 @@ jobs: shell: bash - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-windows-i686-node@lts-${{ hashFiles('yarn.lock') }} @@ -53,13 +53,13 @@ jobs: command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-windows-i686-node@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-windows-i686-node@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} diff --git a/cli/src/new/ci-yml.ts b/cli/src/new/ci-yml.ts index aeffe3be..5d18eaf9 100644 --- a/cli/src/new/ci-yml.ts +++ b/cli/src/new/ci-yml.ts @@ -94,19 +94,19 @@ export const createGithubActionsCIYml = ( command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-\${{ matrix.os }}-node@${LATEST_LTS_NODE}-cargo-registry-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-\${{ matrix.os }}-node@${LATEST_LTS_NODE}-cargo-index-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-\${{ matrix.os }}-node@${LATEST_LTS_NODE}-\${{ hashFiles('yarn.lock') }} @@ -159,19 +159,19 @@ export const createGithubActionsCIYml = ( command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-node-alpine-@${OLDEST_LTS_NODE}-cargo-registry-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-node-alpine-@${OLDEST_LTS_NODE}-cargo-index-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-alpine-node@${OLDEST_LTS_NODE}-\${{ hashFiles('yarn.lock') }} @@ -218,19 +218,19 @@ export const createGithubActionsCIYml = ( command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-linux-arm7-gnu-node@${LATEST_LTS_NODE}-cargo-registry-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-linux-arm7-gnu-node@${LATEST_LTS_NODE}-cargo-index-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-linux-arm7-gnu-node@${LATEST_LTS_NODE}-\${{ hashFiles('yarn.lock') }} @@ -288,19 +288,19 @@ export const createGithubActionsCIYml = ( command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: stable-linux-aarch64-gnu-node@${LATEST_LTS_NODE}-cargo-registry-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: stable-linux-aarch64-gnu-node@${LATEST_LTS_NODE}-cargo-index-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-linux-aarch64-gnu-node@${LATEST_LTS_NODE}-\${{ hashFiles('yarn.lock') }} @@ -353,19 +353,19 @@ export const createGithubActionsCIYml = ( command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: nightly-apple-aarch64-node@${LATEST_LTS_NODE}-cargo-registry-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: nightly-apple-aarch64-node@${LATEST_LTS_NODE}-cargo-index-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-apple-aarch64-node@${LATEST_LTS_NODE}-\${{ hashFiles('yarn.lock') }} @@ -404,19 +404,19 @@ export const createGithubActionsCIYml = ( command: generate-lockfile - name: Cache cargo registry - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/registry key: nightly-apple-aarch64-node@${LATEST_LTS_NODE}-cargo-registry-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cargo/git key: nightly-apple-aarch64-node@${LATEST_LTS_NODE}-cargo-index-trimmed-\${{ hashFiles('**/Cargo.lock') }} - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-apple-aarch64-node@${LATEST_LTS_NODE}-\${{ hashFiles('yarn.lock') }} @@ -459,7 +459,7 @@ export const createGithubActionsCIYml = ( check-latest: true - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-test-\${{ matrix.os }}-node@\${{ matrix.node }}-\${{ hashFiles('yarn.lock') }} @@ -496,7 +496,7 @@ export const createGithubActionsCIYml = ( - uses: actions/checkout@v2 - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-alpine-node@\${{ matrix.node }}-\${{ hashFiles('yarn.lock') }} @@ -542,7 +542,7 @@ export const createGithubActionsCIYml = ( check-latest: true - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-test-linux-aarch64-gnu-node@\${{ matrix.node }}-\${{ hashFiles('yarn.lock') }} @@ -627,7 +627,7 @@ ${requiredSteps.map((s) => ` - ${s}`).join('\n')} check-latest: true - name: Cache NPM dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: node_modules key: npm-cache-publish-ubuntu-latest-\${{ hashFiles('yarn.lock') }}