Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

build: require Node >= 22 and build with Node 24 - #19

Open
antobinary wants to merge 1 commit into
v0.1.xfrom
node-24
Open

antobinary wants to merge 1 commit into
v0.1.xfrom
node-24

Conversation

@antobinary

Copy link
Copy Markdown
Member

What

Moves this plugin onto Node 24 and declares a supported-Node floor.

  • package.json gains an engines field: "node": ">=22", mirrored into
    package-lock.json so the two agree.
  • @types/node bumped to ^24.13.3 so the typings match the runtime the plugin
    is actually built with. It was declared twice, at ^20.3.1 and ^20.4.4;
    both are aligned here.
  • CI moved from Node 20 to Node 24:
    • ts-code-compilation.ymlnode-version: 20.x -> 24.x
    • ts-code-validation.ymlnode-version: 20.x -> 24.x
    • publish-tag.ymlnode-version: '20' -> '24'
    • build-plugin-deb-package.yml — NodeSource setup_20.x -> setup_24.x, so
      the Debian package is built against Node 24

This repo has a Debian package workflow but no debian/ directory, so there is
no Build-Depends line to raise.

Also: TypeScript 5.1.3 -> 5.9.3

Required, not incidental. @types/node 24 uses Symbol.dispose and
Disposable, which TypeScript only defines from 5.2. This repo's lock pinned
5.1.3, and npx tsc failed with ~55 errors inside @types/node's own
declaration files:

error TS2339: Property 'dispose' does not exist on type 'SymbolConstructor'
error TS2304: Cannot find name 'Disposable'

package.json already allowed this — the spec was ^5.1.3, so only the lockfile
pin was holding it back. npm update typescript moved it to 5.9.3 within the
existing range; no declared version changed.

Worth knowing: this repo has no skipLibCheck in tsconfig.json, which is why
the errors surfaced here rather than being silently skipped. That is arguably the
better setting, but it does mean this repo feels typings bumps first.

Why >=22 and not >=24

The floor is the compatibility contract for anyone consuming or building the
plugin; 22 is still in maintenance and there is no reason to lock it out. The
preferred version is expressed where it takes effect — CI and the Debian build
both pin 24.

Testing

Against Node 24.20.0 / npm 11.19.0, running the same chain CI does:

  • npm ci — PASS
  • npx tsc — PASS
  • npm run lint — PASS
  • npm run build-bundle — PASS

Add an `engines` floor of Node >= 22 to package.json and mirror it into
package-lock.json, and bump @types/node to ^24.13.3 so the typings match
the runtime the plugin is built with.

Move CI onto Node 24 (was Node 20). Install Node 24 from NodeSource when building
the Debian package.

Also move the locked typescript to 5.9.3, within the existing ^5.1.3
range. @types/node 24 uses Symbol.dispose and Disposable, which
TypeScript only defines from 5.2, and this repo was pinned at 5.1.3.
@antobinary
antobinary requested a review from GuiLeme September 11, 2026 00:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant