bit
bit copied to clipboard
Renaming component that deprecates another component does not update the reference to the component that supersedes it in .bitmap
Describe the bug
If you rename a component that is already exported it deprecates it and puts a reference to the superseding component, like so:
"config": {
"teambit.component/deprecation": {
"deprecate": true,
"newId": {
"name": "ui/buttons/icon_buttons",
"scope": "org_name.scope_name"
}
}
}
But if you mistakenly renamed it with a typo, for example in this case icon_buttons
in plural instead of singular icon_button
, then when you attempt to bit rename
the superseding component, it does not update the above config entry in .bitmap
.
I have no idea what the impact is in the remote scope as I have yet to use deprecated components (I am mainly starting fresh, and moving components around)
Steps to Reproduce
- Create a component
- Tag it
- Export it
- Rename it with a typo
- Rename the superseding component to fix the typo
-
.bitmap
entry of the superseding component will update, butnewId
reference in the deprecated component won't
Expected Behavior
When renaming a component that supersedes another, the reference to it in .bitmap
should update as well.
Specifications
- Bit version:
0.0.800
- Workspace type:
harmony
- Node version:
16.13.0
- npm / yarn version:
8.1
- Platform:
macOS
for harmony workspace
- relevant env:
any
- relevant aspects:
any
The newId
will be used to suggest the new component upon import/install. It's not implemented currently.
In this case, it'll suggest the wrong component indeed, so yes, it's a bug that needs be addressed.
rename-after-rename was implemtned a few weeks ago and already available. missed that issue when item resolved. closing now.