From 1b582346147c9d4f29a762394eb61f41c2c41324 Mon Sep 17 00:00:00 2001 From: Priyagupta108 Date: Fri, 3 Oct 2025 12:50:27 +0530 Subject: [PATCH] chore: update Node.js version in workflows --- .github/workflows/check-dist.yml | 2 +- .github/workflows/e2e-cache.yml | 56 +++++++++++++++++++++++++------- .github/workflows/proxy.yml | 12 +++---- .github/workflows/versions.yml | 10 +++--- 4 files changed, 57 insertions(+), 23 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 64d40471..aac4cd2f 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -16,4 +16,4 @@ jobs: name: Check dist/ uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main with: - node-version: '20.x' + node-version: '24.x' diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index f1c1868b..2be7b67b 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Clean global cache @@ -42,7 +42,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Install pnpm @@ -75,7 +75,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 24] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Yarn version @@ -107,7 +107,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Update yarn @@ -139,7 +139,7 @@ jobs: name: Test yarn subprojects strategy: matrix: - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] runs-on: ubuntu-latest steps: @@ -166,7 +166,7 @@ jobs: name: Test yarn subprojects all locally managed strategy: matrix: - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] runs-on: ubuntu-latest steps: @@ -193,7 +193,7 @@ jobs: name: Test yarn subprojects some locally managed strategy: matrix: - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] runs-on: ubuntu-latest steps: @@ -220,7 +220,7 @@ jobs: name: Test yarn subprojects managed by git strategy: matrix: - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] runs-on: ubuntu-latest steps: @@ -244,14 +244,14 @@ jobs: sub2/*.lock sub3/*.lock - node-npm-package-manager-cache: - name: Test enabling cache if package manager field is present (Node ${{ matrix.node-version }}, ${{ matrix.os }}) + node-npm-packageManager-auto-cache: + name: Test auto cache with top-level packageManager runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 22] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Create package.json with packageManager field @@ -268,3 +268,37 @@ jobs: - name: Verify node and npm run: __tests__/verify-node.sh "${{ matrix.node-version }}" shell: bash + + node-npm-devEngines-auto-cache: + name: Test auto cache with devEngines.packageManager + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest, macos-13] + node-version: [20, 22, 24] + steps: + - uses: actions/checkout@v5 + - name: Create package.json with devEngines field + run: | + echo '{ + "name": "test-project", + "version": "1.0.0", + "devEngines": { + "packageManager": { + "name": "npm", + "onFail": "error" + } + } + }' > package.json + - name: Clean global cache + run: npm cache clean --force + - name: Setup Node with caching enabled + uses: ./ + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Verify node and npm + run: __tests__/verify-node.sh "${{ matrix.node-version }}" + shell: bash diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index ab52b8fd..c5493b59 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -28,12 +28,12 @@ jobs: - uses: actions/checkout@v5 - name: Clear tool cache run: rm -rf $RUNNER_TOOL_CACHE/* - - name: Setup node 14 + - name: Setup node 24 uses: ./ with: - node-version: 14.x + node-version: 24.x - name: Verify node and npm - run: __tests__/verify-node.sh 14 + run: __tests__/verify-node.sh 24 test-bypass-proxy: runs-on: ubuntu-latest @@ -44,9 +44,9 @@ jobs: - uses: actions/checkout@v5 - name: Clear tool cache run: rm -rf $RUNNER_TOOL_CACHE/* - - name: Setup node 11 + - name: Setup node 24 uses: ./ with: - node-version: 11 + node-version: 24 - name: Verify node and npm - run: __tests__/verify-node.sh 11 + run: __tests__/verify-node.sh 24 diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index ba56f66f..ee42e38e 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Setup Node @@ -82,7 +82,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [20-nightly, 21-nightly, 18.0.0-nightly] + node-version: [20-nightly, 21-nightly, 24.0.0-nightly] steps: - uses: actions/checkout@v5 - name: Setup Node @@ -102,7 +102,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [20.0.0-rc.1, 18.0.0-rc.2, 19.0.0-rc.0] + node-version: [20.0.0-rc.1, 24.0.0-rc.4, 19.0.0-rc.0] steps: - uses: actions/checkout@v5 - name: Setup Node @@ -122,7 +122,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18.20.0, 20.10.0, 22.0.0] + node-version: [20.10.0, 22.0.0, 24.9.0] steps: - uses: actions/checkout@v5 - name: Setup Node @@ -139,7 +139,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - node-version: [18, 20, 22, 24] + node-version: [20, 22, 24] steps: - uses: actions/checkout@v5 - name: Setup Node and check latest