Skip to content

feat(repair): add lerna repair command#3314

Merged
JamesHenry merged 2 commits intomainfrom
lerna-repair-2
Sep 29, 2022
Merged

feat(repair): add lerna repair command#3314
JamesHenry merged 2 commits intomainfrom
lerna-repair-2

Conversation

@JamesHenry
Copy link
Copy Markdown
Member

Description

Adds a new command: lerna repair. This command will run any available migrations which have been designed to bring a lerna workspace up to date with the latest and greatest.

This PR does not ship with a real implementation of such a migration, so instead a noop example migration is provided to concretely illustrate how a migration is both written and unit tested within the lerna package.

NOTE: the implementation for the repair command is intentionally inlined into the lerna package. Because of the way migrations are orchestrated, having repair be its own package would result in a cyclical dependency between it and the core package. Plus, in general, we are not looking to continue with the pattern of having an ever-increasing number of tiny published packages.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@JamesHenry JamesHenry marked this pull request as ready for review September 1, 2022 13:00
chain = chain.then(() => this.configureProperties());
chain = chain.then(() => this.configureLogging());
chain = chain.then(() => this.runValidations());
// For the special "repair" command we want to intitialize everything but don't want to run validations as that will end up becoming cyclical
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Type: "intitialize" -> "initialize"

@JamesHenry JamesHenry marked this pull request as draft September 1, 2022 15:11
@JamesHenry
Copy link
Copy Markdown
Member Author

JamesHenry commented Sep 1, 2022

Blocked: This is pending a change on the repair implementation

Resolved

@JamesHenry JamesHenry marked this pull request as ready for review September 29, 2022 17:20
@JamesHenry JamesHenry merged commit 7defab3 into main Sep 29, 2022
@JamesHenry JamesHenry deleted the lerna-repair-2 branch September 29, 2022 18: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.

2 participants