diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f21366a4f..c78260436 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: matrix: # Available OS's: https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners os: [ubuntu-latest, windows-latest, macos-latest] - node-version: ["20.x", "18.x"] + node-version: ["22.x", "20.x", "18.x"] experimental: [false] steps: - uses: actions/checkout@v4 @@ -30,7 +30,7 @@ jobs: - run: npm run test # Upload coverage for sonarcube (only matching OS and one node version required) - uses: actions/upload-artifact@v4 - if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' }} + if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' }} with: name: code-coverage-${{matrix.os}}-${{matrix.node-version}} path: coverage/ @@ -47,7 +47,7 @@ jobs: fetch-depth: 0 - uses: actions/download-artifact@v4 with: - name: code-coverage-ubuntu-latest-20.x + name: code-coverage-ubuntu-latest-22.x path: coverage/ - uses: SonarSource/sonarcloud-github-action@v2 env: diff --git a/.github/workflows/e2e-browser.yml b/.github/workflows/e2e-browser.yml index e2de9bae7..5abd1780e 100644 --- a/.github/workflows/e2e-browser.yml +++ b/.github/workflows/e2e-browser.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 22.x cache: npm - run: npm ci - run: npm run build diff --git a/.github/workflows/e2e-node.yml b/.github/workflows/e2e-node.yml index 3124b5fd0..2f50a7a98 100644 --- a/.github/workflows/e2e-node.yml +++ b/.github/workflows/e2e-node.yml @@ -18,13 +18,13 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - node-version: ["18.x", "20.x"] + node-version: ["18.x", "20.x", "22.x"] environment-name: ["ESS PodSpaces", "ESS Dev-2-2"] experimental: [false] include: - environment-name: "ESS Dev-2-3" experimental: true - node-version: 20.x + node-version: 22.x os: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.nvmrc b/.nvmrc index 209e3ef4b..2bd5a0a98 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +22 diff --git a/CHANGELOG.md b/CHANGELOG.md index c45a7ef1b..ed2c0efc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The following changes are pending, and will be applied on the next major release ## Unreleased +### New Features + +- Node 22 is now supported + ## [3.0.5](https://github.com/inrupt/solid-client-access-grants-js/releases/tag/v3.0.5) - 2024-07-31 ### Bugfixes diff --git a/README.md b/README.md index a118a2bb3..cc2000086 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ and `String.prototype.endsWith`. ## Node.js Support -Our JavaScript Client Libraries track Node.js [LTS -releases](https://nodejs.org/en/about/releases/), and support 18.x and 20.x. +See [Inrupt Solid Javascript Client +Libraries](https://docs.inrupt.com/developer-tools/javascript/client-libraries/#node-js-support). # Installation diff --git a/docs/api/source/index.rst b/docs/api/source/index.rst index d76c648e3..ec22a070f 100644 --- a/docs/api/source/index.rst +++ b/docs/api/source/index.rst @@ -60,8 +60,8 @@ e.g. ``Map``, ``Set``, ``Promise``, ``Headers``, ``Array.prototype.includes``, Node.js Support ^^^^^^^^^^^^^^^ -Our JavaScript Client Libraries track Node.js `LTS releases -`__, and support 18.x and 20.x. +See `Inrupt Solid Javascript Client Libraries +`__. .. _issues--help: diff --git a/e2e/browser/test-app/.nvmrc b/e2e/browser/test-app/.nvmrc index 209e3ef4b..2bd5a0a98 100644 --- a/e2e/browser/test-app/.nvmrc +++ b/e2e/browser/test-app/.nvmrc @@ -1 +1 @@ -20 +22 diff --git a/package-lock.json b/package-lock.json index 99f986f25..49bf32847 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "typescript": "^5.3.3" }, "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "optionalDependencies": { "fsevents": "^2.3.2" diff --git a/package.json b/package.json index e6c968177..354f69414 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "rdf-namespaces": "^1.9.2" }, "engines": { - "node": "^18.0.0 || ^20.0.0" + "node": "^18.0.0 || ^20.0.0 || ^22.0.0" }, "publishConfig": { "access": "public" diff --git a/rollup.config.mjs b/rollup.config.mjs index b10ad34f4..a3a06960b 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -1,11 +1,4 @@ -// The following is only possible from Node 18 onwards -// import pkg from "./package.json" assert { type: "json" }; - -// Until we only support Node 18+, this should be used instead -// (see https://rollupjs.org/guide/en/#importing-packagejson) -import { createRequire } from 'node:module'; -const require = createRequire(import.meta.url); -const pkg = require('./package.json'); +import pkg from "./package.json" with { type: "json" }; import typescript from "rollup-plugin-typescript2"; @@ -16,8 +9,6 @@ const external = [ const plugins = [ typescript({ - // Use our own version of TypeScript, rather than the one bundled with the plugin: - typescript: require("typescript"), tsconfigOverride: { compilerOptions: { module: "esnext",