Skip to content

Dependency sweep before V2 (#258) - #409

Merged
CarlosNZ merged 10 commits into
mainfrom
258-dependency-sweep
Sep 16, 2026
Merged

CarlosNZ merged 10 commits into
mainfrom
258-dependency-sweep

Conversation

@CarlosNZ

Copy link
Copy Markdown
Owner

Closes #258. Remaining to-dos are tracked in #408.

Eight commits, one per logical batch, in dependency order. Every batch was verified with pnpm test, pnpm compile, pnpm -r build (lint + tree-shake guards) and, where relevant, pnpm pack-all plus the demo in all four resolution modes and a Chrome check.

Workspace (core + themes + components + utils)

Commit What
In-range refresh Every patch/minor inside existing ranges: rollup 4.63, typescript-eslint 8.70, react 19.3, ts-jest, rollup-plugin-dts, @uiw codemirror set, react-colorful, colord 2.10 (closes its ReDoS advisory). Drops unused root devDeps fs-extra and ts-node. Components' runtime dependencies ranges keep their original floors — only the lockfile resolutions move.
@types/react 19.3.0 + csstype 3.2.3 Both pnpm.overrides moved in lockstep with the demo's yarn resolution (the demo's tsconfig maps into workspace src/, so mismatched copies produce type-identity errors). Demo lockfile deduped to a single csstype.
Rollup plugin majors @rollup/plugin-terser 1.0, @rollup/plugin-typescript 12.3, esbuild 0.28. Bundle output byte-identical.
Replace rollup-plugin-styles The plugin (Jan 2022, rollup 2 peer, stale postcss/cssnano tree carrying the last audit finding) was only used to read a .css file and emit a minified string. scripts/rollup-inline-css.mjs does that with esbuild's CSS minifier, which was already a devDep. Shared by core and components; per-config stripCssQuery helpers removed. Core's inlined CSS is 5368 bytes before and after. Removes 137 packages from the lockfile.
Jest 30 jest, jest-environment-jsdom (jsdom 20 → 26), @types/jest. All 750 tests pass unchanged.
ESLint 10 eslint 10, @eslint/js 10, globals 17, eslint-plugin-react-hooks 7. Hooks rules listed explicitly rather than via the v7 preset (which also enables the React Compiler rules). settings.react.version pinned to 19.3.0 because eslint-plugin-react 7.37.5's auto-detection calls the removed getFilename(); a peerDependencyRules entry silences the peer warning. Both are commented and tracked in #408. One new no-useless-assignment finding fixed in assign.ts.

Workspace audit: 31 findings → 0.

Demo

Commit What
In-range refresh yarn upgrade — lockfile only. ajv 8.20, vite 6.4.3, eslint 9.39.5, wouter, shiki, etc.
Majors firebase 10 → 12 (drops undici, the last advisory source), vite 7 + @vitejs/plugin-react 5, eslint 10 stack mirroring core, typescript ^5.9, cross-env removed (unreferenced). react-refresh 0.5 exempted for src/main.tsx (entry module, no exports).

Demo audit: 168 findings (5 critical) → 0.

Docs

CLAUDE.md (root + components), dev-docs/package-management-guide.md and the relevant source comments describe the new CSS wiring and the updated pins.

Not included

Chakra 3, framer-motion 13, react-datepicker 9, Vite 8, TypeScript 6/7, jest-dom 7 (needs Node 22), pnpm 11/12, Node 22 — see #408 for the reasoning on each.

Also carries 049fe09 (utils version bump to 0.9.0-beta.3), which was already on this branch.

🤖 Generated with Claude Code

CarlosNZ and others added 9 commits September 16, 2026 23:33
Take every patch and minor available inside the existing semver ranges
across root and the three sub-packages: rollup 4.63, typescript-eslint
8.70, react 19.3, ts-jest, rollup-plugin-dts, the @uiw codemirror set,
react-colorful, use-debounce, colord 2.10 (closes its ReDoS advisory).
Bump prettier's exact pin to 3.9.7.

Drop `fs-extra` and `ts-node` from root devDependencies — nothing at the
root references either (the demo keeps its own fs-extra).

Runtime `dependencies` ranges in @json-edit-react/components are left at
their original floors; only the lockfile resolutions move. devDependency
ranges are rewritten to the resolved versions by pnpm.

Workspace audit: 31 findings → 3 (the rest sit under @rollup/plugin-terser
and rollup-plugin-styles, handled separately).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The root `pnpm.overrides` pin both so the workspace resolves exactly what
the demo's yarn install does (its tsconfig maps `@json-edit-react/*` into
the workspace `src/` trees, so two copies produce type-identity errors).
@types/react 19.3.0 requires csstype ^3.2.2, hence both move together.

Demo: react, react-dom and both @types packages resolve to 19.3.0 within
their existing ranges (lockfile only). The leftover csstype 3.1.3 entry
is merged into the single 3.2.3 entry so the demo has one copy too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…258)

All three are peer-compatible with rollup 4 and node 20. Bundle output is
byte-identical across every package, the dts step still finds core's
declarations, and the esbuild-based tree-shake guards pass unchanged.

@rollup/plugin-terser 1.0 pulls serialize-javascript v7, closing the two
advisories that sat under it. Workspace audit: 3 findings → 1 (the last one
is decode-uri-component under rollup-plugin-styles).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…#258)

rollup-plugin-styles 4.0.0 (last published Jan 2022) declares a rollup 2
peer, pins an old postcss/cssnano/svgo tree that carried the last audit
finding, and was only ever used here to read one `.css` file, minify it,
and emit it as a string — with `mode: ['inject', () => '']` to suppress
its injector.

`scripts/rollup-inline-css.mjs` does exactly that in ~15 lines: resolves
the `./style.css?inline` specifier (keeping the marker on the module id so
its `load` hook handles only those imports), minifies with esbuild's CSS
loader — already a devDependency wherever there is CSS — and returns
`export default '<css>'`. Shared by core and components; the per-config
`stripCssQuery` helpers go away.

Output is equivalent: core's inlined stylesheet is 5368 bytes before and
after (esbuild keeps a space after the colon in custom-property values,
which is the only textual difference). Bundle gzip sizes move by ≤10 B.
Verified in Chrome against the packed tarballs: core's `<style>` and the
per-component `<style>` elements inject and apply as before.

Removes 137 packages from the lockfile. Workspace audit: 0 findings.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
jest, jest-environment-jsdom and @types/jest move to 30; ts-jest stays on
its current 29.4 line, which supports Jest 30 as a peer. Brings jsdom from
20 to 26. All 750 tests pass unchanged, and the bench config still loads.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
eslint 10.10, @eslint/js 10, globals 17, eslint-plugin-react-hooks 7.
ESLint 9 is end-of-life (npm marks it deprecated). Flat config was already
in use, so the eslintrc removal costs nothing.

- The two hooks rules are listed explicitly instead of spreading the
  plugin's `recommended` preset, which in v7 also enables the React
  Compiler rule set. Lint behaviour is unchanged; adopting the compiler
  rules is a separate decision.
- `settings.react.version` is pinned to 19.3.0 rather than 'detect'.
  eslint-plugin-react 7.37.5 has no ESLint 10 release: its version
  detection calls `context.getFilename()`, removed in ESLint 10, and
  aborted the run. With an explicit version every rule in its recommended
  set runs cleanly. A `peerDependencyRules` entry silences the peer
  warning; the config comment points at the upstream fix (PR 4022) so
  both can be reverted once it ships.
- `no-useless-assignment`, new in eslint:recommended, flagged an
  initializer in assign.ts that every branch overwrote.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`yarn upgrade` inside the existing ranges — lockfile only. Picks up ajv
8.20 and vite 6.4.3 (both closing advisories), eslint 9.39.5,
typescript-eslint 8.70, wouter 3.11, shiki 4.4, and the same codemirror /
colord / react-colorful bumps the workspace took.

Demo audit: 168 findings (5 critical) → 30, all of them undici under
@firebase/auth, which the firebase 12 bump removes.

Typecheck, lint, and production builds in all four resolution modes pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
firebase 10 → 12 (drops undici, clearing the last demo advisories; the
modular API the demo uses is unchanged), vite 6 → 7 with
@vitejs/plugin-react 5, eslint 10 / @eslint/js 10 / globals 17 /
eslint-plugin-react-hooks 7 / eslint-plugin-react-refresh 0.5, typescript
^5.9. cross-env removed — nothing referenced it.

eslint.config.js lists the two hooks rules explicitly rather than
spreading the v7 preset (which also enables the React Compiler rules),
and exempts src/main.tsx from react-refresh/only-export-components: the
entry module defines its lazy route components inline and exports
nothing, so there is nothing for Fast Refresh to preserve.

Demo audit: 0 findings. Typecheck, lint, and production builds in all
four resolution modes pass; verified in Chrome in local mode.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Bundle size impact

json-edit-react

Format Base raw PR raw Δ raw Base gzip PR gzip Δ gzip
esm 58.79 KB 58.79 KB 🟢 -4 B (-0.01%) 20.82 KB 20.82 KB 🔺 +1 B (+0.00%)
cjs 60.23 KB 60.23 KB 🟢 -4 B (-0.01%) 20.83 KB 20.83 KB 🔺 +3 B (+0.01%)

@json-edit-react/themes

Format Base raw PR raw Δ raw Base gzip PR gzip Δ gzip
esm 35.38 KB 35.38 KB ⚪ no change 10.88 KB 10.88 KB ⚪ no change
cjs 34.52 KB 34.52 KB ⚪ no change 10.83 KB 10.83 KB ⚪ no change

@json-edit-react/components

Format Base raw PR raw Δ raw Base gzip PR gzip Δ gzip
esm 15.77 KB 15.76 KB 🟢 -12 B (-0.07%) 5.33 KB 5.32 KB 🟢 -10 B (-0.18%)
cjs 16.40 KB 16.39 KB 🟢 -12 B (-0.07%) 5.17 KB 5.17 KB 🟢 -9 B (-0.17%)

@json-edit-react/utils

Format Base raw PR raw Δ raw Base gzip PR gzip Δ gzip
esm 5.03 KB 5.03 KB ⚪ no change 2.23 KB 2.23 KB ⚪ no change
cjs 5.13 KB 5.13 KB ⚪ no change 2.22 KB 2.22 KB ⚪ no change

Measured from build/index.{cjs,esm}.js. Gzip at level 9.

The script bumped the demo to the published core, themes and components
versions but skipped utils. Includes the resulting demo sync to
@json-edit-react/utils 0.9.0-beta.3.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@CarlosNZ
CarlosNZ merged commit 9a85925 into main Sep 16, 2026
2 checks passed
@CarlosNZ
CarlosNZ deleted the 258-dependency-sweep branch September 16, 2026 12:39
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.

Dependency sweep before V2 release

1 participant