Skip to content

build: declare @types/node only in devDependencies - #27

Merged
antobinary merged 2 commits into
node-24from
dedupe-types-node
Sep 29, 2026
Merged

antobinary merged 2 commits into
node-24from
dedupe-types-node

Conversation

@antobinary

Copy link
Copy Markdown
Member

What

Drops the duplicate @types/node entry from dependencies, keeping the one in
devDependencies.

Why

@types/node was declared in both sections, and the two had drifted apart
(^20.3.1 against ^20.4.4) before they were aligned in the Node 24 PR. It
supplies build-time typings only — nothing under src/ imports it at runtime
and it contributes nothing to the emitted bundle.

Neither CI nor debian/rules installs with --omit=dev or
NODE_ENV=production, so the typings remain present wherever the bundle is
built. npm already resolved it as a dev-only package, so installs are
unaffected; this just makes package.json say what npm was already doing.

Testing

Against Node 24.20.0:

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

Notes for review

One line out of package.json plus the matching lock line. Depends on the Node
24 PR and should merge after it.

@types/node was listed in both dependencies and devDependencies, and the
two had drifted apart before they were aligned on ^24.13.3. It supplies
build-time typings only, so keep the devDependencies entry and drop the
duplicate.

npm already resolved it as a dev-only package, so installs are unaffected;
this just makes package.json say what npm was already doing.
@antobinary
antobinary requested a review from GuiLeme September 11, 2026 01:04

@imdt-claudiop imdt-claudiop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Identical in shape to bigbluebutton/bbb-plugin-picture-in-picture#44, which is already merged: @types/node dropped from dependencies, kept in devDependencies, with the matching package-lock.json root entry removed. Nothing else changes.

Verified on Node 24.9.0 against this branch: npm install clean with no lockfile drift, npx tsc passes, npm run lint passes, and npm run build-bundle produces dist/BbbPluginSessionShare.js.

Type resolution is unaffected, since devDependencies still provides @types/node ^24.13.3 and that is what the compiler picks up.

Run npm audit fix, then take the two major upgrades it could not apply
on its own: copy-webpack-plugin 12 -> 14 and webpack-dev-server 4 -> 6.
Between them these clear the shell-quote and websocket-driver criticals
and the serialize-javascript, sockjs and uuid advisories.

Everything changed here is build tooling; none of it ships in the
bundle. webpack-dev-server 6 was verified beyond a successful build by
starting the dev server and confirming the custom devServer.app route
for /manifest.json still answers 200.
Pin watch back to ^0.13.0, the version the other repos already use. Its
1.x line pulls exec-sh and a prototype-pollution advisory in merge, and
npm's own resolution for those advisories is 0.13.0. It only backs the
lint:watch helper script.
@antobinary
antobinary merged commit c46574d into node-24 Sep 29, 2026
4 checks passed
@antobinary
antobinary deleted the dedupe-types-node branch September 29, 2026 17:50
antobinary added a commit that referenced this pull request Sep 29, 2026
* build: require Node >= 22 and build with Node 24

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). Raise the Debian Build-Depends floor
to nodejs (>= 22) and install Node 24 from NodeSource when building the
package.

* build: declare @types/node only in devDependencies (#27)

* build: declare @types/node only in devDependencies

@types/node was listed in both dependencies and devDependencies, and the
two had drifted apart before they were aligned on ^24.13.3. It supplies
build-time typings only, so keep the devDependencies entry and drop the
duplicate.

npm already resolved it as a dev-only package, so installs are unaffected;
this just makes package.json say what npm was already doing.

* build: resolve npm audit advisories (#28)

Run npm audit fix, then take the two major upgrades it could not apply
on its own: copy-webpack-plugin 12 -> 14 and webpack-dev-server 4 -> 6.
Between them these clear the shell-quote and websocket-driver criticals
and the serialize-javascript, sockjs and uuid advisories.

Everything changed here is build tooling; none of it ships in the
bundle. webpack-dev-server 6 was verified beyond a successful build by
starting the dev server and confirming the custom devServer.app route
for /manifest.json still answers 200.
Pin watch back to ^0.13.0, the version the other repos already use. Its
1.x line pulls exec-sh and a prototype-pollution advisory in merge, and
npm's own resolution for those advisories is 0.13.0. It only backs the
lint:watch helper script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants