chore: upgrade envs to react 19#10385
Merged
Merged
Conversation
GiladShoham
approved these changes
May 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Bit workspace’s env bindings to React-19-compatible env versions, aiming to prevent capsules from resolving both React 17 and React 19 (which can lead to duplicate peer-resolution trees and CI TS2345 private-property type incompatibilities).
Changes:
- Update many component entries in
.bitmapto pin newer env versions (e.g.core-aspect-env@0.1.5,node-babel-mocha@0.2.9,node-typescript-mocha@0.1.7,base-react-env@1.1.3). - Introduce/expand per-component
configblocks in.bitmapto apply those env versions broadly across the workspace.
Comments suppressed due to low confidence (4)
.bitmap:2342
- This component is still pinned to
teambit.react/v17/react-env@1.2.6, which likely pulls React 17 peers and undermines the PR’s goal of preventing React 17+19 duplication in capsules. Switch it to a React-19-compatible env (or drop the v17 pin to inherit the updated env).
"version": "0.0.258",
"mainFile": "index.ts",
"rootDir": "components/ui/component-compare/component-compare",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
.bitmap:2359
teambit.react/v17/react-env@1.2.6is still configured here; if it has React 17 peer requirements it will force React 17 into this component’s capsule and can cause the same duplicate-peer hash issues described in the PR. Consider migrating this component to a React-19-compatible env or removing the v17 env pin.
"version": "0.0.127",
"mainFile": "index.ts",
"rootDir": "components/ui/component-compare/models/component-compare-props",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
.bitmap:2603
- This component is still using
teambit.react/v17/react-env@1.2.6. To fully address the React 17→19 upgrade and avoid duplicate React installs in capsules, migrate it to the React 19-compatible env (or remove the v17 env pin).
"version": "0.0.522",
"mainFile": "index.ts",
"rootDir": "components/ui/react-router/slot-router",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
.bitmap:2620
teambit.react/v17/react-env@1.2.6is still pinned here, which likely keeps React 17 in the dependency tree for this component. This conflicts with the PR objective of aligning envs to React ^19 and can keep the duplicate peer-resolution hashes that trigger TS2345 errors. Update to a React-19-compatible env or remove the v17 pin.
"version": "0.0.933",
"mainFile": "index.ts",
"rootDir": "components/ui/side-bar",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (4)
.bitmap:2342
- This component is still explicitly configured to use
teambit.react/v17/react-env@1.2.6. That likely reintroduces React 17 into dependency trees and undermines the stated goal of the PR (avoiding duplicate React versions / peer-resolution hash splits). Please migrate it to the React 19-compatible env.
"ui/component-compare/component-compare": {
"name": "ui/component-compare/component-compare",
"scope": "teambit.component",
"version": "0.0.258",
"mainFile": "index.ts",
"rootDir": "components/ui/component-compare/component-compare",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
.bitmap:2359
- This component is still explicitly configured to use
teambit.react/v17/react-env@1.2.6. If the workspace is targeting React 19, keeping a v17 env here can pull React 17 peers into capsules and cause the duplicate-instance/type-identity issues described in the PR. Please update/remove this override.
"ui/component-compare/models/component-compare-props": {
"name": "ui/component-compare/models/component-compare-props",
"scope": "teambit.component",
"version": "0.0.127",
"mainFile": "index.ts",
"rootDir": "components/ui/component-compare/models/component-compare-props",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
.bitmap:2603
- This component is still pinned to
teambit.react/v17/react-env@1.2.6, which can keep React 17 in the capsule tree and defeat the env upgrade’s purpose. Please switch it to the React 19-compatible env (or remove the v17 override).
"ui/react-router/slot-router": {
"name": "ui/react-router/slot-router",
"scope": "teambit.ui-foundation",
"version": "0.0.522",
"mainFile": "index.ts",
"rootDir": "components/ui/react-router/slot-router",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
.bitmap:2620
- This component is still pinned to
teambit.react/v17/react-env@1.2.6. Given the PR’s intent to avoid React 17/19 duplication and peer-hash splits in capsules, this override should be updated to a React 19-compatible env or removed.
"ui/side-bar": {
"name": "ui/side-bar",
"scope": "teambit.ui-foundation",
"version": "0.0.933",
"mainFile": "index.ts",
"rootDir": "components/ui/side-bar",
"config": {
"teambit.react/v17/react-env@1.2.6": {}
}
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.
Bumps the envs used in this workspace to versions whose
reactpeer is set to^19, matching the React 17→19 upgrade from #10295.teambit.harmony/envs/core-aspect-env→0.1.5teambit.node/envs/node-babel-mocha→0.2.9teambit.node/envs/node-typescript-mocha→0.1.7teambit.react/internal/base-react-env→1.1.3Without this, capsules of components using these envs end up with both react@17 and react@19 in their tree, which causes pnpm to install duplicate
@teambit/logger/@teambit/componentinstances under different peer-resolution hashes and produces the recent TS2345 "Types have separate declarations of a private property" failures on CI.