Skip to content

bit scope rename re-introduces MissingManuallyConfiguredPackages for forked envs (regression of #10200) #10328

@zkochan

Description

@zkochan

Summary

After PR #10201 fixed MissingManuallyConfiguredPackages when running bit new / bit fork on an env that uses "+" dependency markers, the same error re-surfaces after running bit scope rename --refactor on the default scope. The scenario originally surfaced with the Vue starter (my-vue-env extends bitdev.vue/vue-env which declares @mdx-js/mdx as a peer).

Related: #10200, #10201

Reproduction

Branch: fix/scope-rename-missing-deps

A new e2e test has been added in e2e/harmony/dependencies/forked-env-missing-deps.e2e.ts that covers two cases:

  1. Forking an env with "+" markers in its dep-resolver config, then running bit scope rename --refactor.
  2. Forking an env that extends a parent env declaring the peer (the actual Vue starter shape), then running bit scope rename --refactor.

In both cases, bit status incorrectly reports MissingManuallyConfiguredPackages for the forked env after the rename, even though the package is resolved (either in workspace node_modules or through the parent env's peer policy).

Progress

  • Create branch fix/scope-rename-missing-deps
  • Write e2e regression test (currently describe.only locally for iteration)
  • Investigate root cause — why bit scope rename --refactor reintroduces the false-positive that fix: Missing Packages After bit new with Forked Env #10201 resolved for bit new. Suspected: after the rename, the forked env's component config is rewritten and the resolution path that applyAutoDetectedPeersFromEnvOnEnvItSelf relies on is no longer hit, so getDependenciesToAddManually() falls back to the failing _manuallyAddPackage() path.
  • Implement fix
  • Remove describe.only and run lint + targeted e2e

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions