Repository navigation
Improve "import" edgecases + (i18n fixes + git tweaks) - #1059
Conversation
… from users Git configuration
…to run the test suite correctly.
…of empty commits by skipping them automatically.
|
Thanks @swernerx. I’m testing Lerna, importing a big legacy project, and your branch was a lifesaver. I hope this gets merged ASAP. |
| "integration": "jest --config test/config/integration.json", | ||
| "pretest": "npm run lint -- --cache", | ||
| "test": "jest", | ||
| "test": "cross-env LC_ALL=en-US jest", |
There was a problem hiding this comment.
Thanks for this! I was hoping to get away from the brittle localized snapshots eventually, but this is a good addition regardless.
| if (!err) { | ||
| this.logger.success("import", "finished"); | ||
| } else { | ||
| this.logger.error("import", err); |
There was a problem hiding this comment.
I can't believe we forgot to log the error 😅
| static commit(message, opts) { | ||
| log.silly("commit", message); | ||
| const args = ["commit"]; | ||
| const args = ["commit", "--no-gpg-sign"]; |
There was a problem hiding this comment.
I'm a little leery of adding this flag to all executions of git commit. I have no idea how common GPG signing of commits is, although I definitely appreciate your reasoning.
I'm okay with taking this now, but we'll have to note this very well in the changelog and be open to the possibility that we may need to revert it (or put it behind an option) in the future.
* master: Generate root changelog in fixed mode (lerna#1078) Republish prereleased packages during subsequent non-prerelease publish (lerna#1077) fix: fail when --hoist and --yarn are used together (lerna#1063) Improve "import" edgecases + (i18n fixes + git tweaks) (lerna#1059) Warn about two or more packages having the same npm package.json name (lerna#1081)
|
Thanks for doing this, it was super helpful to see the error I'm running into: I'm probably just going to rebase the originating repo on a branch and then importing from a version lerna can work with. |
|
Here's what I did to "fix" these commits: annnnd somehow I was able to import it after doing this |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Originally this just contains the fixes for handling issues detecting in #1058
gitdoes not seem to have a useful parameter for itsamcommand we have toskipthe command when detecting the empty commits error (my approach analyzes the error message fromgit).cross-envand added aLC_ALLsetting in front of thenpmscript to runjestto overcome this.Motivation and Context
This fixes to import my projects from Edge Platform into a single repository.
Without the change on skipping empty commits it just failed. Without the logging change, it failed without any useful user-facing error.
How Has This Been Tested?
The test suite and linting pass without any errors.
Types of changes
Checklist: