From d312e2ac2094e9eb85cd4951b4e84a07c97a88f0 Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sun, 22 Dec 2024 10:58:01 +0100 Subject: [PATCH 1/3] upgrade workflows --- .github/workflows/benchmark.yml | 8 ++++---- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/metrics-report.yml | 14 +++++++------- .github/workflows/npm-publish-dev.yml | 8 ++++---- .github/workflows/npm-publish.yml | 8 ++++---- .github/workflows/test.yml | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index bade1c25..cc79517c 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3236df21..905036b0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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: diff --git a/.github/workflows/metrics-report.yml b/.github/workflows/metrics-report.yml index 9066b77e..132b81f2 100644 --- a/.github/workflows/metrics-report.yml +++ b/.github/workflows/metrics-report.yml @@ -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 diff --git a/.github/workflows/npm-publish-dev.yml b/.github/workflows/npm-publish-dev.yml index 07a770b4..740b9287 100644 --- a/.github/workflows/npm-publish-dev.yml +++ b/.github/workflows/npm-publish-dev.yml @@ -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 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 81f9e07c..7d2ad174 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15d204d9..ef9ffd60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 From a8c9a4a93a4fc19fb9dc85c69ea5a865932dda0f Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sun, 22 Dec 2024 11:03:13 +0100 Subject: [PATCH 2/3] specify node version to use locally --- .tool-versions | 1 + 1 file changed, 1 insertion(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..42738c54 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 22.12.0 From 367c8c2bcb1dfe9ee081b4cf1ba9a395fe2564c8 Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sun, 22 Dec 2024 11:03:31 +0100 Subject: [PATCH 3/3] fix unsupported import assertion --- scripts/rollup.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rollup.config.mjs b/scripts/rollup.config.mjs index 7fba7d5c..88ec88b7 100644 --- a/scripts/rollup.config.mjs +++ b/scripts/rollup.config.mjs @@ -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