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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Add --legacy-peer-deps for NPM7 install #14106

Merged
merged 2 commits into from
Mar 3, 2021
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Mar 3, 2021

Issue: #12983

What I did

Add --legacy-peer-deps for NPM7 installs

How to test

See attached unit tests

I also tested it end-to-end in a sample app:

  580  npm init @vitejs/app
  581  cd vite-project/
  582  ~/projects/baseline/storybook/lib/cli/bin/index.js init

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch yarn / npm Yarn / npm acting weird labels Mar 3, 2021
@@ -15,8 +18,18 @@ export class NPMProxy extends JsPackageManager {
return `npm run ${command}`;
}

getInstallArgs(): string[] {
if (!this.installArgs) {
const version = this.executeCommand('npm', ['--version']);
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if you need some .trim() here?

Copy link
Member Author

Choose a reason for hiding this comment

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

tested by hand -- doesn't seem to matter to semver, but good thought

@shilman shilman changed the title Add --legacy-peer-deps for NPM7 install CLI: Add --legacy-peer-deps for NPM7 install Mar 3, 2021
@shilman shilman merged commit d05fd3d into next Mar 3, 2021
@shilman shilman deleted the 12983-npm-legacy-peer-deps branch March 3, 2021 10:30
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 3, 2021
shilman added a commit that referenced this pull request Mar 3, 2021
CLI: Add `--legacy-peer-deps` for NPM7 install
This was referenced Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch yarn / npm Yarn / npm acting weird
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants