Feature/v1 react 19 compat - #956
Draft
pdavies88 wants to merge 5 commits into
Draft
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Visual/config alignment with the new main site: - Title/url -> headstartwp.fueled.com; GA4 (production-only) replaces GTM - Navbar 'About HeadstartWP' CTA; hero lavender wash + lattice treatment - Footer: 3 nav columns + Fueled bottom band mirroring the main site - IBM Plex Sans / Plex Sans Condensed typography, new primary ramp Brand reference pass: - Org-standard Fueled CTA banner (per 10up/classifai) in root+package READMEs - Root README docs links -> headstartwp.fueled.com - philosophy.md says HeadstartWP (pre-rename prose); Fueled credited once - Pages-router quick-tutorial: 'At Fueled (formerly 10up), ...' - Unchanged by design: github.com/10up URLs, js1.10up.com demo backend, @10up/next-redis-cache-provider package name, __10up__HEADLESS_CONFIG Naming: guide section 'Documentation' -> 'Developer Guide' (navbar, footer, home grid); /learn route unchanged.
The companion release to v2. v2 is app-router only; this keeps v1 working for projects that are staying on the pages router, and makes it install and run cleanly on React 19. Branched from trunk, which is the released 1.x line (core 1.6.1) — the v2 branch sits on PR #951's base and is not an ancestor. The important fix is block matching. Every shipped block declares its `test` — and sometimes `exclude` — through a namespace-merged `defaultProps`, and React 19 stopped applying defaultProps to function components under the automatic JSX runtime. `<ParagraphBlock />` therefore reached BaseBlocksRenderer with props.test undefined and all 20 blocks silently stopped matching: no error, just unreplaced HTML. Anyone already running v1 on React 19 is affected today. Resolved centrally in getBlockProps(), which layers block.type.defaultProps underneath the element's props, so consumer blocks written to the same documented pattern are covered too. Dependency work needed for a clean React 19 install: - html-react-parser ^3 -> ^5. Both 3.x and 4.x cap their React peer at 18; 5.x is the earliest line that supports 19. Deliberately not ^6, which would pull in more of domhandler 6's type churn than a minor should. Requires the same narrowing v2 needed: a new exported getChildNodes() for ChildNode[] vs DOMNode[], the replace callback's index parameter, and string narrowing where attributesToProps now types values as `string | boolean` (Yoast). - react-inspector removed. It peered react <= 18 and both fixed releases are exports-only packages this tsconfig's moduleResolution cannot read. It powered only the debug-only DebugBlock, now served by a small internal component. - path-to-regexp ^6.3.0 and loader-utils ^3.2.1 — the D6 security floors, which permitted a fixed version but floored on a vulnerable one. The global JSX namespace is gone in React 19's types; affected files now use `import type { JSX } from 'react'`, which is valid under @types/react 18.3 and 19 alike, so React 18 consumers are not forced to move. Verified on React 19.2.7 by packing the built package and installing it into a clean project — no --legacy-peer-deps needed — then confirming through the real JSX runtime that the shipped blocks still match, non-matching nodes are left alone, and the parser still renders WP markup. Also green on React 18.3.1: core 46/46 suites / 242 tests, next 28/28 / 113 tests, lint clean across core, next and epio-search.
Three things the v1 line needs before it can ship. **The v1 release workflow.** `changeset publish` tags `latest` by default, even when publishing a lower version number — so once v2 is out, releasing v1 through the existing workflow would silently move `latest` backwards and every fresh `npm install @headstartwp/core` would resolve to v1. Adds release-v1.yml, triggered by pushes to the `v1` branch, publishing via a new `publish:v1` script that passes `--tag latest-v1`. Consumers pin the line with `@headstartwp/core@latest-v1`. It deliberately has no plugin-release job: the WordPress plugin is published from trunk and develop, and pushing it from here would race those branches for the same destination repository. **Node 24 baseline.** .nvmrc and the root `engines` move to 24, and every workflow moves to it — unit-tests was still running a [16.x, 18.x, 20.x] matrix, which is two EOL releases and one about to be. Note this is the monorepo root, which governs contributors and CI; it is not a published package, so it does not change what consumers must run. The v1 packages deliberately keep no `engines` field, because raising the floor in a minor would strand exactly the pages-router users this line exists to support. **Dependency refresh.** No minor has shipped in about four months, so `npm update` was four months stale: 33 in-range updates applied, now down to 2. Deliberately in-range only — the 37 major-version jumps behind (storybook 8 -> 10, commitlint 13 -> 21, the @wordpress/* line, jest 29 -> 30) are a separate modernisation effort and would put the "still supports the pages router" guarantee at risk in a release whose whole point is stability. One blocker had to be cleared first: `npm update` failed with ERESOLVE because block-primitives pinned @testing-library/react ^14 while core and next were on ^16. Aligned to ^16.3.0, which is the same split PR #951 fixed on the v2 line. Verified: core 46/46 suites / 247 tests, next 28/28 / 113 tests, block-primitives 2/2, core and next build and lint clean.
🦋 Changeset detectedLatest commit: 7d1eb64 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Closes #
How to test the Change
Changelog Entry
Credits
Props @username, ...
Checklist: