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

pnpm autoinstall support #5951

Merged
merged 11 commits into from
Mar 4, 2021
Merged

pnpm autoinstall support #5951

merged 11 commits into from
Mar 4, 2021

Conversation

mischnic
Copy link
Member

@mischnic mischnic commented Mar 2, 2021

Based on #4920 (cc @aminya @dishuostec)

Closes #3408

$ pnpx parcel build index.html
Installing @parcel/transformer-posthtml...
@parcel/package-manager: Added 11 packages via pnpm
Installing @parcel/transformer-html...
@parcel/package-manager: Added 1 packages via pnpm
Installing @parcel/packager-html...
@parcel/package-manager: Added 1 packages via pnpm
Installing @parcel/optimizer-htmlnano...
@parcel/package-manager: Added 212 packages via pnpm
✨ Built in 10.52s

dist/index.bba55d6c.js               62 B     32ms
├── Code from unknown sourcefiles    43 B      0ms
└── index.js                         19 B    522ms

dist/index.html                      42 B    5.30s
└── index.html                       57 B    3.67s

The big question: how should the package manager be selected? I've made it so that

  • if a lockfile was found, always try to use that package manager (because not running the one used by the project sounds like a bad idea)
  • if no lockfile was found, Yarn if installed or npm. Not sure if we should prefer pnpm here (before npm) if installed. This is really more of a personal preference

@height
Copy link

height bot commented Mar 2, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@parcel-benchmark
Copy link

parcel-benchmark commented Mar 3, 2021

Benchmark Results

Kitchen Sink 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

React HackerNews 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

AtlasKit Editor 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Three.js 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Click here to view a detailed benchmark overview.

@mischnic mischnic force-pushed the package-manager-pnpm branch from 1cec51c to e5e50c8 Compare March 4, 2021 09:45
@mischnic mischnic force-pushed the package-manager-pnpm branch from e5e50c8 to 93adfa6 Compare March 4, 2021 10:27
@mischnic mischnic merged commit eabbbec into v2 Mar 4, 2021
@mischnic mischnic deleted the package-manager-pnpm branch March 4, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for pnpm
4 participants