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

Implement pnpm adapter #787

Merged
merged 1 commit into from Nov 4, 2021
Merged

Implement pnpm adapter #787

merged 1 commit into from Nov 4, 2021

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Nov 4, 2021

As discussed via Discord I've created a new dependency manager adapter for pnpm, largely based on the existing npm adapter.

The main differences to the npm adapter are:

  • We do not backup the node_modules folder and instead run pnpm install once more in the cleanup phase
  • We do not use --no-lockfile so that we only have to resolve the dependencies that have actually changed, resulting in a much smaller amount of necessary dependency downloads

I've implemented a usePnpm option, similar to the existing useYarn option. I'm aware that this might not be ideal, but it works well enough for now and can still be refactored later.

Resolves #744

@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #787 (553b5ab) into master (cb5f901) will decrease coverage by 1.10%.
The diff coverage is 88.50%.

❗ Current head 553b5ab differs from pull request most recent head c2e80da. Consider uploading reports for the commit c2e80da to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #787      +/-   ##
==========================================
- Coverage   95.46%   94.36%   -1.11%     
==========================================
  Files          16       17       +1     
  Lines         463      550      +87     
==========================================
+ Hits          442      519      +77     
- Misses         21       31      +10     
Impacted Files Coverage Δ
lib/utils/dependency-manager-adapter-factory.js 87.50% <50.00%> (-7.50%) ⬇️
lib/dependency-manager-adapters/pnpm.js 90.36% <90.36%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb5f901...c2e80da. Read the comment docs.

@Turbo87
Copy link
Member Author

Turbo87 commented Nov 4, 2021

This can be seen in action at mainmatter/ember-test-selectors#754

@kategengler
Copy link
Member

@Turbo87 added a warning about experimental support for pnpm. When we feel comfortable truly supporting we will add documentation to the README and remove the warning.

@kategengler kategengler merged commit 832af22 into ember-cli:master Nov 4, 2021
@buschtoens
Copy link

Fantastic! Thanks a lot for shipping this. 😍

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.

pnpm or generic package manager support
3 participants