Skip to content

[ci probe] do not merge — build the v2 stack on Linux - #132

Closed
roderickhsiao wants to merge 6 commits into
mainfrom
ci-probe-v2-stack
Closed

roderickhsiao wants to merge 6 commits into
mainfrom
ci-probe-v2-stack

Conversation

@roderickhsiao

Copy link
Copy Markdown
Owner

Temporary PR. Actions will not fire for PRs based on a non-default branch, so react-aspect-ratio#129 and react-aspect-ratio#131 have never been built. This runs the combined stack against main to confirm pnpm and the native iltorb build work on the Linux runner. Will be closed once it reports.

roderickhsiao and others added 6 commits September 4, 2026 00:01
BREAKING CHANGE: requires React 19 or later.

- Remove the legacy src/react-15.6 class component and its componentDidUpdate
  custom-property fallback for react/react#6411 (dead code since React 16).
- Flatten src/react-latest into src/index.tsx; the default and named exports are
  now the same component.
- Drop the forwardRef wrapper — React 19 passes ref as a regular prop.
- Narrow peerDependencies to react >=19.0.0 and bump @types/react to ^19.
- Exclude test files from the published build instead of a stale __tests__ glob.
- Add MIGRATION.md and a README migration section.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Requirements section read as though `forwardRef` itself needs React 19.
It does not — `forwardRef` has worked since React 16.3. What React 19 changes
is that `ref` is passed to function components as an ordinary prop, which is
what makes the wrapper unnecessary. Reworded to say that, and to name where
`ref` actually lands (`...restProps` on the underlying div).

MIGRATION.md already stated this correctly, so no change was needed there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The workflow filtered pull_request on branches: [main], so a PR stacked on
another feature branch got no build at all — it could merge into its parent
entirely untested. Widened to all pull requests; push stays on main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Replace yarn.lock with pnpm-lock.yaml; pin packageManager to pnpm@10.14.0
  and add engines.node >=20 to match .nvmrc and CI.
- yarn's `resolutions` has no meaning to pnpm — moved to `pnpm.overrides`.
- Declare @babel/preset-react. Every env block in .babelrc requires it but it
  was never a dependency; yarn's flat hoisting hid that. pnpm's strict linking
  surfaced it as a storybook build failure.
- Add @storybook/test@8.6.18 to satisfy the @storybook/react peer that its dist
  imports at build time.
- Allow the native builds bundlesize needs (iltorb) via pnpm.onlyBuiltDependencies;
  pnpm 10 blocks lifecycle scripts by default.
- Rename `prepublish` to `prepublishOnly`. npm's legacy `prepublish` also fired on
  install, which is how CI happened to have a dist/ for the bundlesize step; pnpm
  does not run it at all. CI now builds explicitly before measuring.
- CI: pnpm/action-setup, --frozen-lockfile, pnpm store caching, checkout/setup-node v4.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ule entry

Two long-standing packaging bugs, both predating v2.

tsc shares dist/ with babel and ran second, so `tsc --build tsconfig.publish.json`
overwrote dist/index.js — babel's ES5 CommonJS output — with its own ESNext emit.
The published `main` was never the babel build. tsconfig.publish.json now sets
emitDeclarationOnly, and the plain -p form replaces --build so no tsbuildinfo
lands in dist/ either.

The `es` babel env set targets.esmodules but not modules:false, so preset-env
still downlevelled import/export to CommonJS and the declared `module` entry
shipped require(). Fixed, and the es/ and next/ directories now get a
{"type":"module"} marker so Node reads them as ESM rather than reparsing.

dist/index.js grows 437B -> 694B gzipped: it is now the ES5 build it always
claimed to be, not the ESNext emit that was overwriting it. Still well under
the 2KB budget.

Verified by rendering both entry points through react-dom/server — identical
markup from main and module.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Declarations go to dist/, not dist/types — package.json points `types` at
dist/index.d.ts. Flagged in review on
[react-aspect-ratio#131](#131).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roderickhsiao

Copy link
Copy Markdown
Owner Author

Superseded — react-aspect-ratio#128 merged, so react-aspect-ratio#129 now targets main and gets real CI on its own.

@roderickhsiao
roderickhsiao deleted the ci-probe-v2-stack branch September 4, 2026 07:26
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