Skip to content

Commit

Permalink
Merge pull request #506 from dcastil/other/upgrade-github-workflows-t…
Browse files Browse the repository at this point in the history
…o-node-22

Upgrade GitHub workflows to Node.js 22
  • Loading branch information
dcastil authored Dec 22, 2024
2 parents a7b7ad1 + 367c8c2 commit 34078ee
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20.11.1
node-version: 22.x
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
yarn-node-22-lock-
- run: yarn install --frozen-lockfile
- name: Run benchmark
uses: CodSpeedHQ/action@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20.11.1
node-version: 22.x
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
yarn-node-22-lock-
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/metrics-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20.11.1
node-version: 22.x
- name: Restore node_modules cache
uses: actions/cache/restore@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
yarn-node-22-lock-
- run: yarn --frozen-lockfile
- name: Save node_modules cache
uses: actions/cache/save@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
- name: Use node_modules cache for metrics-report-action
uses: actions/cache@v4
with:
path: .github/actions/metrics-report/node_modules
key: yarn-node-20-metrics-report-action-lock-${{ hashFiles('.github/actions/metrics-report/yarn.lock') }}
key: yarn-node-22-metrics-report-action-lock-${{ hashFiles('.github/actions/metrics-report/yarn.lock') }}
restore-keys: |
yarn-node-20-metrics-report-action-lock-
yarn-node-22-metrics-report-action-lock-
- run: yarn --cwd .github/actions/metrics-report install --frozen-lockfile
- uses: ./.github/actions/metrics-report
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20.11.1
node-version: 22.x
# More info: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
registry-url: 'https://registry.npmjs.org'
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
yarn-node-22-lock-
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: actions/upload-artifact@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20.11.1
node-version: 22.x
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
yarn-node-22-lock-
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20.11.1
node-version: 22.x
- name: Use node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }}
key: yarn-node-22-lock-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-node-20-lock-
yarn-node-22-lock-
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 22.12.0
2 changes: 1 addition & 1 deletion scripts/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { defineConfig } from 'rollup'
import del from 'rollup-plugin-delete'
import { dts } from 'rollup-plugin-dts'

import pkg from '../package.json' assert { type: 'json' }
import pkg from '../package.json' with { type: 'json' }

export default defineConfig([
// Default entry point
Expand Down

0 comments on commit 34078ee

Please sign in to comment.