Skip to content

NodeJS v24 upgrade#763

Open
CopyDemon wants to merge 8 commits into
mainfrom
node-v24-upgrade
Open

NodeJS v24 upgrade#763
CopyDemon wants to merge 8 commits into
mainfrom
node-v24-upgrade

Conversation

@CopyDemon
Copy link
Copy Markdown
Collaborator

Summary

Upgrade Node.js from 18 to 24 and Storybook from 6.5 to 8, along with the related build-tooling updates (Parcel v2, jsdom) those upgrades required.

Major changes

  • Node 18 → 24 — pinned via a new .nvmrc (24) and a new engines field (node >=20); CI workflows and the Dockerfile updated to match. (Neither .nvmrc nor engines existed before.)
  • Storybook 6.5 → 8 — @storybook/react ^6.5.3 → ^8.6.18, plus the new unified storybook 8 package.
  • Parcel v1 → v2 — removed the deprecated parcel-bundler (^1.12.5) and switched the dev sandbox to parcel (^2.16.4).
  • jsdom ^16 → ^26.1.0 — keeps the Jest test environment current with Node 24.

Fixes

  • Fixed Jest tests that broke on d3's ESM-only imports (test suite back to passing).
  • Fixed npm start failing due to a Parcel target conflict.
  • Fixed deploy-storybook: the script still called storybook-to-ghpages, whose package (@storybook/storybook-deployer) was removed during the Storybook 8 upgrade. Replaced it with build-storybook + gh-pages so the command behaves the same (build, then publish storybook-static to GitHub Pages).

#Remaining TODOs (follow-up)

  • Fix typo in publish-npm.yml (line 27): npm install ci should be npm ci. It only works today because ci is treated as a package name. (Pre-existing, not introduced here. Not sure if that is a package or the npm ci (install command))
  • Address the outstanding npm audit vulnerabilities (separate task). They're almost all in the dev toolchain — published bundles mark these deps as external, so there's no runtime risk to consumers. Do not run npm audit fix: it bumps picomatch, which breaks rollup-plugin-typescript2 and the publish build. These need to be upgraded surgically, one direct dependency at a time, each verified on its own:
    • Breaking API changes: react-tooltip@4 (v5 reworks the whole API), react-graph-vis, uuid@8, axios@0.21
    • Lower-risk: qs, ws, yaml, katex

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@CopyDemon CopyDemon requested a review from minhsueh June 1, 2026 22:02
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