Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(cli): fix lerna bootstrap to link monorepo packages #2944

Merged
merged 1 commit into from May 23, 2019

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented May 23, 2019

Lerna v3.10.3 changed the way how lerna bootstrap --scope works, breaking our CLI tests when changes are made in dependencies of newly scaffolded projects. (As I discovered while working on #2928).

This commit fixes the problem by adding --force-local option to restore previous behavior, see lerna/lerna@71174e4709. Unfortunately, --force-local is broken now, we need to wait until lerna/lerna#2104 is merged and released.

Also to make future troubleshooting easier, I am changing lerna log level used by the test from "silent" to "warn".

Checklist

馃憠 Read and sign the CLA (Contributor License Agreement) 馃憟

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

馃憠 Check out how to submit a PR 馃憟

Lerna v3.10.3 changed the way how `lerna bootstrap --scope` works,
breaking our CLI tests when changes are made in dependencies of newly
scaffolded projects.

This commit fixes the problem by adding `--force-local` option to
restore previous behavior.

Also to make future troubleshooting easier, I am changing lerna log
level used by the test from "silent" to "warn".

Signed-off-by: Miroslav Bajto拧 <mbajtoss@gmail.com>
@bajtos bajtos added the CLI label May 23, 2019
@bajtos bajtos requested a review from raymondfeng May 23, 2019 10:57
@bajtos bajtos self-assigned this May 23, 2019
@bajtos
Copy link
Member Author

bajtos commented May 23, 2019

At the moment, the following extra output is printed by our tests to stderr:

lerna WARN bootstrap Installing local packages that do not match filters from registry

It should go away once lerna/lerna#2104 is landed and released.

@raymondfeng
Copy link
Contributor

raymondfeng commented May 23, 2019

Good catch. I ran into this issue a few times. For example, for the api-extractor integration, lerna bootstrap --scope loopback.io-workflow-scripts does not link @loopback/docs. I had to work around it by including --scope @loopback/docs.

@raymondfeng raymondfeng merged commit 2d5a87b into master May 23, 2019
@raymondfeng raymondfeng deleted the fix/bootstrap-in-tests branch May 23, 2019 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants