-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Package manager pnpm #4920
Package manager pnpm #4920
Conversation
|
79b6e07
to
0d3e2b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add some integration tests? You can take inspiration from how we did it for yarn 2
]); | ||
let hasYarn = await Yarn.exists(); | ||
|
||
// If Yarn isn't available, or there is a package-lock.json file, use npm. | ||
let configName = configFile && path.basename(configFile); | ||
if (!hasYarn || configName === 'package-lock.json') { | ||
return new Npm(); | ||
if (!hasYarn || configName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Yarn binary doesn't exist and no lockfile is present, NPM should be used by default. However, if there is no lockfile, this new logic will cause Yarn to be used even when the binary doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Yarn binary doesn't exist and no lockfile is present, NPM should be used by default. However, if there is no lockfile, this new logic will cause Yarn to be used even when the binary doesn't exist.
Yes, I made a mistake.
…lled manager in order pnpm, yarn, npm.
I couldn't find which part is the test for yarn2, do you mean |
@dishuostec yes that's the package with all our integration tests. For inspiration I meant https://github.com/parcel-bundler/parcel/blob/v2/packages/core/integration-tests/test/pnp.js which is part of our test suite |
(The PnP tests are only testing the resolver, not the autoinstall part) |
Pnpm use symlinked node_modules structure. If a package is dependent on by several package, then the package will be resolved as different position. It will be bundle multiple times. I created new pr #4939. |
Really looking forward to this. Having to manage many packages, the time and storage that pnpm saves me is a big advantage. However, the fact that Parcel does not work with pnpm is a bummer! |
↪️ Pull Request
Try to add pnpm suport
#3408