bit scope rename re-introduces MissingManuallyConfiguredPackages for forked envs (regression of #10200)
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:
- Forking an env with
"+"markers in its dep-resolver config, then runningbit scope rename --refactor. - 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.onlylocally for iteration) - Investigate root cause — why
bit scope rename --refactorreintroduces the false-positive that #10201 resolved forbit new. Suspected: after the rename, the forked env's component config is rewritten and the resolution path thatapplyAutoDetectedPeersFromEnvOnEnvItSelfrelies on is no longer hit, sogetDependenciesToAddManually()falls back to the failing_manuallyAddPackage()path. - Implement fix
- Remove
describe.onlyand run lint + targeted e2e
Notes
- The e2e test uses the same shape as the #10150 regression test already in that file.
- For the parent/child env case,
is-positiveis used as the peer (avoids pulling in real Vue packages).
Source: teambit/bit