-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement(scope-rename), support renaming exported components (#8456)
Currently, `bit scope rename` supports only new components. For exported, it suggests users to run `bit rename` one by one, which can be an hassle. This PR combines the logic from "rename", "renameScope" and "renameOwner" to one place "renameMultiple" and allows renaming multiple components, some can be exported, some can be new. Previously, some of the actions during the rename were done only on "rename" or only on "renameScope", now all of them are aligned.
- Loading branch information
1 parent
e6b813f
commit 0465ce2
Showing
9 changed files
with
226 additions
and
287 deletions.
There are no files selected for viewing
This file contains 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
10 changes: 0 additions & 10 deletions
10
scopes/component/renaming/exceptions/old-scope-exported.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { BitError } from '@teambit/bit-error'; | ||
|
||
export class RenamingTagged extends BitError { | ||
constructor(idsStr: string[]) { | ||
super(`the following components are tagged/snapped but not exported:\n${idsStr.join(', ')} | ||
renaming them will result in deprecating the current ones and creating new components, which is unnecessary. | ||
please reset the components first (using "bit reset") and then re-run the rename command`); | ||
} | ||
} |
This file contains 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
Oops, something went wrong.