Skip to content

chore: upgrade envs to react 19#10385

Merged
davidfirst merged 5 commits into
masterfrom
upgrade-envs-to-react-19
May 20, 2026
Merged

chore: upgrade envs to react 19#10385
davidfirst merged 5 commits into
masterfrom
upgrade-envs-to-react-19

Conversation

@davidfirst
Copy link
Copy Markdown
Member

Bumps the envs used in this workspace to versions whose react peer is set to ^19, matching the React 17→19 upgrade from #10295.

  • teambit.harmony/envs/core-aspect-env0.1.5
  • teambit.node/envs/node-babel-mocha0.2.9
  • teambit.node/envs/node-typescript-mocha0.1.7
  • teambit.react/internal/base-react-env1.1.3

Without 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/component instances under different peer-resolution hashes and produces the recent TS2345 "Types have separate declarations of a private property" failures on CI.

Copilot AI review requested due to automatic review settings May 19, 2026 21:22
@davidfirst davidfirst enabled auto-merge (squash) May 19, 2026 21:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .bitmap to 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 config blocks in .bitmap to 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.6 is 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.6 is 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": {}
        }

Comment thread .bitmap
Comment thread .bitmap
Copilot AI review requested due to automatic review settings May 20, 2026 00:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Copilot AI review requested due to automatic review settings May 20, 2026 14:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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": {}
        }

Comment thread scopes/mcp/cli-mcp-server/cli-mcp-server.spec.ts
Comment thread scopes/mcp/cli-mcp-server/cli-mcp-server.spec.ts
Comment thread .bitmap
Comment thread .bitmap
@davidfirst davidfirst merged commit 3331206 into master May 20, 2026
16 checks passed
@davidfirst davidfirst deleted the upgrade-envs-to-react-19 branch May 20, 2026 17:22
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.

4 participants