| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Bump the package to 4.0.0 (major) and modernize the full build stack: - Widen peerDependencies to React ^18.2.0 || ^19.0.0 so existing React 18 consumers keep working while React 19 is now supported; move devDependencies to current versions (react/react-dom ^19.2.8, @babel/* 8, jest 30, jest-environment-jsdom 30, prettier 3, TypeScript 7). - Replace the unmaintained babel-preset-airbnb with the maintained @babel/preset-env and @babel/preset-react on Babel 8. - Force modules: "commonjs" in .babelrc: Babel 8's CLI self-reports ESM support, so the default 'auto' mode would leave ESM in lib/ and break CommonJS consumers of main: lib/index.js. - Add engines: node >=18 and typecheck/check scripts that typecheck the shipped TypeScript typings with tsc. - Add @types/react and jest-environment-jsdom devDependencies for the typecheck and client-hydration test suite.
react-dom/client guarantees hydrateRoot in React 18+, so the guarded createRoot().render() fallback was dead code. Render each server-serialized instance with hydrateRoot directly; renderToString stays the server path, so behavior is otherwise unchanged.
Serialize a server-rendered Hypernova payload (via renderToString + serialize), render it into a jsdom document, then call renderReact's client branch and assert the component resumes on the server node with the server-provided props under React 19. Uses jest-environment-jsdom since the hypernova() client path runs only when a DOM is present.
- Replace the commented-out single server signature with real overloads for both the server and client branches of renderReact, plus the exported ServerRenderedComponent (props -> HTML string) mapping. - Add tsconfig.json (strict, React JSX, NodeNext module resolution) so the package's own declarations are verified by tsc --noEmit on TypeScript 7 via the npm run typecheck script.
- Bump checkout and setup-node to v4 in both CI and publish workflows. - Test across the current active Node LTS lines (20.x, 22.x, 24.x) instead of the old 16.x-20.x matrix, and publish on Node 24. - CI now runs an explicit build plus tsc typecheck before the jest suite so compile output, type checking, and tests are all verified.
Update the README tagline to reflect the widened peer dependency range.
| Back | FazBrowse Home | New Git URL |
Summary
Adds React 19 support to @lyst/hypernova-react and modernizes the toolchain. The package was last released in July 2023, pinned to React 18 with a Babel stack that no longer works against the maintained Babel 8. This brings everything up to date while keeping backward compatibility with existing React 18 consumers.
What changed
React 19 support
Toolchain modernization