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: Use closest lockfile to determine package manager #20464

Merged
merged 2 commits into from
Jan 1, 2023

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Dec 31, 2022

Issue: #20463

What I did

Sometimes people have a yarn.lock file in their home directory accidentally, and if they do, Storybook CLI uses yarn, even if their package is using pnpm and has a pnpm lock file.

With this change, instead of looking for yarn.lock and pnpm-lock.yaml independently, we look for both at the same time, and find-up returns the closest one (falling back to yarn if there are multiple in the same directory).

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Nice one @IanVS -- appreciate the nice tests!!! 💯 Happy new year!

@shilman shilman merged commit 84c5dd1 into next Jan 1, 2023
@shilman shilman deleted the find-closest-lockfile branch January 1, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants