Repository navigation
chore: 3.0 foundation (yarn 4, r3f v10 stack, rollup build, CI, alpha prerelease) - #787
Open
DennisSmolek wants to merge 7 commits into
Open
DennisSmolek wants to merge 7 commits into
DennisSmolek wants to merge 7 commits into
Conversation
- packageManager yarn@4.18.1, nodeLinker node-modules (.yarnrc.yml) - move root tooling from dependencies to devDependencies - drop @manypkg/cli (only used by the `ci` script) - demo/addons depend on workspace packages via workspace:* - engines.node >=22, ignore .yarn state but keep releases/plugins/patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- @react-three/fiber + test-renderer 10.0.0-canary.a056612 (scheduler 0.3, fixed step), three/@types/three 0.186, react/react-dom 19.2.8, drei 11.0.0-alpha.7 (demo) - peerDependencies: fiber >=10.0.0-0, react >=19.0 <19.3, three >=0.185.0; rapier-addons peers on @react-three/rapier ^3.0.0-0 - three-stdlib ^2.36.1 (2.35 imports LuminanceFormat, removed from three) - vitest 5 + jsdom 30, typescript 5.9; vitest.config.mts replaces vite.config.mts and resolves workspace packages from src (no build needed); root tsconfig uses moduleResolution Bundler with matching `paths` - utils.ts: type-only narrowing for fiber v10's readonly-tuple math types - tests: await `create()` instead of racing it against mount callbacks (overlapping act scopes), expect the extra zero-delta priming frame from advanceFrames, re-baseline the physics snapshot (float noise from scheduler ms timing, see PR) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors react-three-jolt's build: `tsc -p tsconfig.build.json` emits per-file declarations,
rollup bundles each entry to dist/<name>.{mjs,cjs} with esbuild and rolls declarations up
into dist/<name>.{d.ts,d.mts,d.cts}.
- shared config in scripts/rollup-library.mjs; entry points are derived from each
package's `exports` map, so a subpath entry (e.g. `./soft-bodies` -> src/soft-bodies/index.ts)
only needs an `exports` + `files` entry. Relative imports of another entry are rewritten to
the published specifier so core is never inlined twice.
- package.json: `exports` map (import/require with types), `type`, `sideEffects: false`,
`engines`, narrowed `files`, repository/bugs/homepage/license metadata
- deps, peers and their subpaths are external
- `check:package` (publint --strict + attw --pack) per package, `yarn check:packages` at root
- drop babel config and the preconstruct dev postinstall
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minimal fixes only; the demo migration proper (WebGPU, routing, perf overlay) is separate work.
- resolve @react-three/rapier(-addons) from workspace sources via vite aliases + tsconfig
paths (keeps the old `preconstruct dev` behaviour: no build needed, HMR on library code)
- moduleResolution Bundler (exports maps of fiber v10 / drei 11 / three)
- `state.clock` is gone in v10: use `state.elapsed`
- `<Canvas shadows>` -> `gl={{ shadows: true }}` (keeps the default WebGL renderer)
- drei 11: `Text` comes from `@react-three/drei/legacy`; drop unused `useCamera`
- OrbitControls type from three/addons instead of three-stdlib
- SpringExample: stop deep-importing library internals (blocked by the exports map)
- replace r3f-perf (pins drei 9 / an old three-stdlib that breaks on three 0.186) with drei
<Stats>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- eslint.config.mjs mirrors react-three-jolt (js + typescript-eslint recommended, react, react-hooks rules-of-hooks/exhaustive-deps, jsx-a11y, eslint-config-prettier last); automatic JSX runtime everywhere - prettier 3 with the repo's existing style options moved to .prettierrc, so the deferred reformat stays small (6 files differ today) - `lint`, `format`, `format:check` scripts. The codebase is NOT reformatted or lint-fixed here (baseline: 29 errors / 126 warnings); that lands at the end of the 3.0 integration. - pre-commit hook runs `yarn typecheck` instead of the full CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ci.yml (replaces test.yml): typecheck, test, build + publint/attw, demo build, and a non-blocking lint/format job; runs on PRs and pushes to main and next, with concurrency cancellation and read-only permissions - shared .github/actions/setup composite: corepack (yarn 4) + setup-node with yarn cache + `yarn install --immutable` - current action majors: checkout v7, setup-node v7, configure-pages v6, upload-pages-artifact v5, deploy-pages v5 (supersedes #733) - release.yml mirrors react-three-jolt: runs on main and next, owner guard, permissions (contents/pull-requests write, id-token for provenance), yarn 4 publish env; `changeset:version` / `changeset:publish` scripts (publish builds and tests first) - @changesets/cli 3; `yarn changeset pre enter alpha` (.changeset/pre.json), so `next` releases 3.0.0-alpha.n under the `alpha` dist-tag; `prerelease:enter`/`prerelease:exit` scripts replace the canary ones - changeset for the r3f v10 stack / package format (core + addons, major) - dependabot: root workspace + github-actions ecosystem, ignore majors of the r3f stack - .nvmrc v22.22.2 (jsdom 30 needs >=22.22.2), demo `typecheck` script Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: a4a0c34 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
This was referenced Oct 10, 2026
This branch has not been deployed
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.
Foundation workstream for 3.0. It moves the tooling and dependency stack, so the other 3.0 branches (bug fixes, docs, character controller, soft bodies, core stepping) can build on it. Library
srcchanges are kept to what the new stack needs to compile and test.What changed
Package manager
packageManager), withnodeLinker: node-modules.dependenciestodevDependencies.@manypkg/cli, preconstruct and babel are removed.workspace:*.engines.node >=22..nvmrcis v22.22.2 because jsdom 30 needs at least 22.22.2.Stack
@react-three/fiberand@react-three/test-renderer10.0.0-canary.a056612 (scheduler 0.3, fixed step)>=10.0.0-0, react>=19.0 <19.3, three>=0.185.0. The addons package peers on@react-three/rapier ^3.0.0-0.three-stdlibis bumped to ^2.36.1, because 2.35 importsLuminanceFormat, which three has removed. It is removed entirely in the bug-fix workstream.Build
dist/index.{mjs,cjs},.d.{ts,mts,cts}). Each package gets anexportsmap,sideEffects: false,engines, a narrowedfileslist and repository metadata.scripts/rollup-library.mjs, and entry points are derived from theexportsmap. Adding@react-three/rapier/soft-bodiestherefore only needssrc/soft-bodies/index.tsplus anexports,filesandtypesVersionsentry.yarn check:packagesrunspublint --strictandattw --packon each package.tscand the demo resolve the workspace packages fromsrc(aliases and tsconfigpaths), so none of them needs a build first.Minimal source and test changes
utils.ts: type-only narrowing for v10's readonly-tuple math types.create()instead of racing it against mount callbacks. On v10, the overlappingact()scopes left updates unflushed.advanceFrames.Demo (minimal)
state.clockbecamestate.elapsed.<Canvas shadows>becamegl={{ shadows: true }}, which keeps the WebGL renderer.Textnow comes from@react-three/drei/legacy.OrbitControlstypes come fromthree/addons.r3f-perfwas replaced by drei<Stats>. r3f-perf pins drei 9 and an old three-stdlib, which breaks the build on three 0.186.Lint and format
.prettierrckeeps the repo's existing style options), withlint,formatandformat:checkscripts.yarn typecheckinstead of the full CI.CI and release
ci.ymlreplacestest.ymland runs typecheck, test, build with publint/attw, and the demo build. Lint/format is a non-blocking job for now.mainandnext, with concurrency andpermissionsblocks..github/actions/setupaction enables Corepack, sets up the yarn cache and installs.mainandnext.@changesets/cli3, andchangeset pre enter alphahas been run (.changeset/pre.json).DEVELOPMENT.md.Decided differently from the plan
@v1, as in jolt. v2 drops theNPM_TOKEN/.npmrc handling, which would change the npm auth setup.Risks
advanceFramesnow drives the scheduler with millisecond timestamps, so per-frame deltas are not exactly 1/60. The accumulator therefore carries a tiny residual, and the interpolated positions differ in the last digits.advanceFrames(n)now runs n+1 frames because of a primingstep(0)frame.useFramecallbacks see n+1 calls, while physics still steps n times.gl,<Stats>, drei 11).next: it can only be verified once this merges.Verification (fresh
yarn install --immutable)yarn build✅yarn typecheck✅yarn workspace demo typecheck✅yarn test: 38/38 ✅yarn check:packages(publint + attw, all resolution modes green) ✅yarn demo:build✅yarn changeset versiondry run gives@react-three/rapier3.0.0-alpha.0 (reverted)yarn lintandyarn format:checkfail on the existing baseline, as expected🤖 Generated with Claude Code