Skip to content

Update dependencies to React 19 and styled-components 6 - #40

Closed
andrerei-nqda wants to merge 3 commits into
masterfrom
enhancement/upgrade-dependencies
Closed

andrerei-nqda wants to merge 3 commits into
masterfrom
enhancement/upgrade-dependencies

Conversation

@andrerei-nqda

@andrerei-nqda andrerei-nqda commented Sep 21, 2026 •

Copy link
Copy Markdown

Makes the library usable from applications on React 19 and styled-components 6. Required by the BRP web application upgrade.

What changed

  • Peer ranges widened to react ^18 || ^19 and styled-components ^5.3 || ^6. Both majors stay supported, so existing consumers are unaffected.
  • Automatic JSX runtime.
  • ESLint flat config with the untile v3 configs, Vitest 5, Husky 9 and Node 24 in CI.
  • The exports map is now generated by the build rather than hand-maintained, and carries a types condition so TypeScript resolves the declarations under both bundler and node16 resolution.
  • Fixes the esm output path in the build script.

Release

The widened peers are a breaking change, so this should go out as 3.0.0. The version in package.json is still 2.0.0; the bump happens when the release is cut.

This is no longer a blocker for the BRP upgrade. Releasing a package that every other consumer installs put unrelated projects in the path of that upgrade, so the BRP web application now keeps a copy of this source in its own repository and no longer installs the package. The work here still stands on its own and is worth merging and releasing for the other consumers; there is just no deadline attached to it any more. Whoever picks it up should check the BRP copy for fixes made since.

Verified

26 tests pass, build and type declarations check out, and the library is consumed end to end by the BRP web application running React 19 and styled-components 6.

Bump React and styled-components peers to also accept React 19 and styled-components 6, move to ESLint flat config with the untile v3 configs, Vitest 5, Husky 9 and Node 24 in CI. Switch to the automatic JSX runtime and fix the esm output path in the build script.
The exports map was written by hand and listed only import and require, so
TypeScript resolved no declarations for consumers on bundler or node16
resolution. It is now generated by the build from the same entry list, with a
types condition first, which keeps it from drifting as entries are added.
Version 6 of the commitlint action refuses a configFile ending in .js and fails
the build before it lints anything. The config is CommonJS, so it is renamed to
.cjs, which is what js-configs already uses and what the action accepts.
@andrerei-nqda
andrerei-nqda force-pushed the enhancement/upgrade-dependencies branch from a30bc07 to 57ec0b4 Compare September 21, 2026 12:19
@andrerei-nqda

Copy link
Copy Markdown
Author

Closing: this is no longer part of the BRP upgrade. The web application now keeps its own copy of the source, so nothing is waiting on a release of this package.

The branch enhancement/upgrade-dependencies is left in place rather than deleted. The React 19 and styled-components 6 support still matters for the other consumers, and whoever picks it up should also check the copy in brp-webapp under packages/react-core for fixes made since, currently a prop filter on the Svg wrapper.

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