Skip to content

chore(deps): update dependencies - #1360

Merged
dangreen merged 78 commits into
masterfrom
chore/deps
Nov 30, 2026
Merged

dangreen merged 78 commits into
masterfrom
chore/deps

Conversation

@dangreen

@dangreen dangreen commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part 7 of the tooling stack. Based on master (#1354–#1359 are merged).

What

Every dependency moves to its latest version:

before after
TypeScript 5.7 7.0
Vite / @vitejs/plugin-react 7 / 5 8 / 6
Vitest / coverage 4 5
React (dev) / types 19.0 19.3
Chart.js (dev) 4.4 4.6
happy-dom / jest-dom / vitest-canvas-mock 20 / 6 / 0.3 21 / 8 / 1.2
commitlint 17 21
size-limit 11 14
clean-publish / del-cli / nano-staged 5 / 7 / 0.8 7 / 8 / 1.0
date-fns (stories) 2 4
@types/node 18 26
  • faker → @faker-js/faker in stories and the 13 sandboxes that use it; the 4 that never did (pie, doughnut, polar area, radar) drop the dependency (faker.number.int, faker.color.rgb, faker.helpers.arrayElement); faker 5 is unmaintained. This supersedes renovate's fix(deps): replace dependency faker with @faker-js/faker - autoclosed #1348.
  • Sandboxes get the same versions. They drop typescript: none of their scripts runs it (Vite builds TSX itself), and StackBlitz brings its own language service.
  • Vite 8 takes the library options under build.rolldownOptions (with topLevelVar: false, as in the references, and strict: true: rolldown adds "use strict" to CommonJS only when the sources have it, and the CommonJS build was always strict).
  • peerDependencies of the package are unchanged.
  • The Docusaurus website's dependencies are left alone: the next PR replaces the website.

Size limits

size-limit 14 bundles and minifies with another toolchain, so the same code measures more. To be sure the code did not grow, a Vite 7 build of the same sources was measured with size-limit 14: 979 B, against 973 B for the Vite 8 build. Limits are pinned again on the 50 B step: all publics 1 kB (973 B), Chart 600 B (582 B), Line 650 B (636 B), event helper 100 B (99 B).

Checked locally

  • pnpm test (oxlint with type checking on TS 7, 50 unit tests, Vitest typecheck, tsc --noEmit), pnpm build, pnpm test:size.
  • require('./dist/index.cjs') and import('./dist/index.js') in Node 26 export the same 12 names.
  • pnpm prepublishOnly: the cleaned package/package.json has the same main, module, exports and types as the current release.
  • pnpm storybook:build; all 21 stories render a painted chart in headless Chrome with no console errors.
  • pnpm sandboxes:build (17/17), pnpm peers check (no issues).

Merging

GitHub could not rebase this branch after #1359 was squash-merged, so master is merged into it instead (the trees were identical, so the merge changes nothing). Its commit list therefore also shows the commits of the merged PRs. When squash-merging, keep only this PR's own commits in the message: chore(deps): update dependencies and chore(deps): drop faker from sandboxes that do not use it.

Stack

  1. chore: agent skills and notes (chore: add agent skills lock and agent notes #1354)
  2. ci: Node.js 26, pnpm 12 and workflows (ci: update Node.js, pnpm and workflows #1355)
  3. build: Vite and Vitest (build: build and test with Vite #1356)
  4. chore: Storybook 10 (chore: update Storybook to 10 #1357)
  5. chore: sandboxes in the root workspace (chore: install the sandboxes from the root workspace #1358)
  6. chore: lint with oxlint (chore: lint with oxlint #1359)
  7. chore(deps): update dependencies ← this PR
  8. docs: move the website to Starlight
  9. build!: drop the CommonJS build (build!: drop the CommonJS build #1362)

🤖 Generated with Claude Code

Agent skills are installed from skills-lock.json, while the installed copies in .agents and .claude stay out of git, as in the other Trigen repositories. AGENTS.md describes what matters in this repository; CLAUDE.md points to it.
pnpm 12 reads build script approvals from allowBuilds instead of onlyBuiltDependencies.
Every job takes Node.js from .tool-versions and pnpm 12, actions are pinned to release commits, which renovate keeps current, and the token of a run only reads unless a job needs more. Tests run as separate types, lint and unit jobs; checks add package.json linting; commitlint runs from the repository; the release job is ready for npm trusted publishing.
The big-lib preset runs the bundle in headless Chrome, which no longer works; the small-lib preset measures what a consumer ships, for the whole package and for single components, with limits pinned on a 50 B step.
The description ends with a period and the homepage, now the documentation website, follows the license.
The react-chartjs-2 tag on Stack Overflow gets no new questions since 2025. The bug report now points to the StackBlitz sandbox.
Vite builds the same ESM and CommonJS entries that rollup with swc did, unminified and for modern targets, so the pure annotations reach the bundlers of consumers. Declarations are emitted from tsconfig.build.json, and the scripts follow the Trigen baseline.
Specs live beside the code they test, and tsd type tests become @ts-expect-error cases in them, checked by tsc and by Vitest typecheck.
Addons that moved into the core are dropped, the config is ESM TypeScript, and the scripts are named as in the other Trigen repositories: storybook and storybook:build. chartjs-plugin-zoom 3 ships ESM types that the stories need.
Stories are type-checked with the rest of the code now, so a change of the component types that breaks a usage shows up in test:types.
Claude Code reads AGENTS.md by itself.
The sandboxes were a separate pnpm workspace with their own lockfile, so they got another copy of Chart.js and ran on the package from npm. In the root workspace they share one install and run on the sources of the package; StackBlitz still installs each one with its own package.json from npm.
The sandboxes resolve the package to its sources through the workspace now.
ESLint with the standard config and Prettier are replaced by oxlint with @trigen/oxlint-config: base, module, React, type-checked TypeScript, test and Storybook configs, with type-aware rules and type checking on. oxlint --fix also formats, so Prettier is gone. Sample data in sandboxes and stories may use plain numbers and log to the console.
MutableRefObject is deprecated in React 19 types. RefObject<T | null> accepts the same refs: useRef(null) results with any @types/react version from the peer range.
The code follows the Trigen style now. Besides formatting: props of elements are ordered, helpers that capture nothing move to the module scope, and stories import types first.
Everything moves to its latest major: TypeScript 7, Vite 8 (lib options under rolldownOptions), Vitest 5, React 19.3, Chart.js 4.6, commitlint 21, size-limit 14 and others. faker 5 is unmaintained: stories and sandboxes use @faker-js/faker. Sandboxes drop TypeScript, which none of their scripts runs.

size-limit 14 measures with another bundler and minifier: the same build of the package weighs about 115 B more by it (a Vite 7 build measures 979 B, the Vite 8 one 973 B), so the limits are pinned again.
@codecov

codecov Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.97%. Comparing base (fe7d82c) to head (4fff5db).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1360   +/-   ##
=======================================
  Coverage   93.97%   93.97%           
=======================================
  Files           3        3           
  Lines          83       83           
  Branches       20       20           
=======================================
  Hits           78       78           
  Misses          3        3           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Stories import the sandboxes, which import react-chartjs-2 by name: without an install of the sandboxes, as in CI, tsc maps the name to the sources.
The sandboxes resolve the package to its sources through the workspace now.
Base automatically changed from chore/oxlint to master November 30, 2026 15:48
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.

1 participant