diff --git a/.changeset/node-22-support.md b/.changeset/node-22-support.md new file mode 100644 index 0000000..a656836 --- /dev/null +++ b/.changeset/node-22-support.md @@ -0,0 +1,5 @@ +--- +'@seamless-auth/types': patch +--- + +Support Node 22 and newer. The `engines` field now requires `>=22` instead of `>=24 <25`, and CI runs on Node 22, 24, and the latest release (fells-code/seamless-auth-api#339). diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbf715f..c73f473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,18 @@ concurrency: jobs: ci: - name: Lint, typecheck, test, build + name: Lint, typecheck, test, build (Node ${{ matrix.node-version }}) runs-on: ubuntu-latest env: HUSKY: 0 + strategy: + fail-fast: false + matrix: + # The supported range is engines >=22: the oldest supported LTS, the + # development default from .nvmrc, and the newest release. + node-version: [22, 24, latest] + steps: - name: Checkout uses: actions/checkout@v7 @@ -31,7 +38,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v7 with: - node-version-file: '.nvmrc' + node-version: ${{ matrix.node-version }} cache: npm - name: Install dependencies @@ -59,3 +66,14 @@ jobs: - name: Verify package contents run: npm run check-npm-build + + # The ruleset on main requires a check with this exact name, which a matrix + # job no longer reports, so this job reports it once every leg is done. + ci-result: + name: Lint, typecheck, test, build + needs: ci + if: always() + runs-on: ubuntu-latest + steps: + - name: Require every Node version to pass + run: test "${{ needs.ci.result }}" = success diff --git a/AGENTS.md b/AGENTS.md index 1c90875..5e90e3b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -107,8 +107,8 @@ src/ | Add changeset | `npm run changeset` | | Pack preview | `npm run check-npm-build` | -- Node version is pinned by `.nvmrc` (Node 24); CI reads it via - `node-version-file`. Run `nvm use` locally to match. +- Supported Node is `>=22`. CI tests 22, 24, and the latest release; + `.nvmrc` pins Node 24 for development and releases. Run `nvm use` locally. - commitlint enforces Conventional Commits; husky runs lint-staged on commit. - Releases go through Changesets. See `RELEASES.md` for the flow and for how to pick the bump. diff --git a/README.md b/README.md index 994b259..787c8b7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ breaking by default. See [Versioning and stability](#versioning-and-stability). | | | | -------------------- | ------------------------- | -| Node | 24 (`>=24 <25`) | +| Node | 22 or newer (`>=22`) | | TypeScript | 5.x | | Runtime dependencies | `zod@^4` and nothing else | @@ -191,7 +191,7 @@ acknowledgement window, and the coordinated disclosure process. ## Development ```bash -nvm use # Node 24, pinned by .nvmrc +nvm use # Node 24 for development, pinned by .nvmrc npm ci npm run build # compile to dist/ diff --git a/package-lock.json b/package-lock.json index d11f214..2a536d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@seamless-auth/types", - "version": "0.22.0", + "version": "0.26.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@seamless-auth/types", - "version": "0.22.0", + "version": "0.26.0", "license": "Apache-2.0", "dependencies": { "zod": "^4.3.6" @@ -26,7 +26,7 @@ "vitest": "^4.1.1" }, "engines": { - "node": ">=24 <25" + "node": ">=22" } }, "node_modules/@babel/code-frame": { diff --git a/package.json b/package.json index d1bf0d7..ac0ce0c 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "vitest": "^4.1.1" }, "engines": { - "node": ">=24 <25" + "node": ">=22" }, "publishConfig": { "access": "public",