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

[rush] Add support for PNPM Version 3 #1145

Closed
wbern opened this issue Mar 13, 2019 · 7 comments
Closed

[rush] Add support for PNPM Version 3 #1145

wbern opened this issue Mar 13, 2019 · 7 comments
Labels
effort: medium Needs a somewhat experienced developer enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start!

Comments

@wbern
Copy link
Contributor

wbern commented Mar 13, 2019

As title says, there are a few breaking changes for this release.

https://github.com/pnpm/pnpm/releases

@octogonz
Copy link
Collaborator

octogonz commented Mar 14, 2019

Damn... the config file names have changed:

shrinkwrap.yaml -> lockfile.yaml

Rush uses the term "shrinkwrap" generically for all package managers. I guess we'll need to update that, too.

@iclanton FYI

@octogonz octogonz added the enhancement The issue is asking for a new feature or design change label Mar 14, 2019
@octogonz octogonz changed the title [rush] pnpm version 3 released [rush] Add support for PNPM Version 3 Mar 30, 2019
@octogonz
Copy link
Collaborator

The PNPM filename is in RushConstants.ts.

Rush has been using the term "shrinkwrap file" to refer generically to this file across NPM/Yarn/PNPM. This was the name originally used by NPM, but if all the package managers are now calling it a "lock file", we should update our terminology. (This term "lock file" has a different, widely established meaning in the software industry that predates Ruby GEM and even the JavaScript language. Maybe Rush should call it something like "version lock file" or "package lock file" to avoid ambiguity.)

This fix should not break support for PNPM 2.x, so it seems like we need to select the filename based on pnpmVersion.

@octogonz octogonz added help wanted If you're looking to contribute, this issue is a good place to start! effort: medium Needs a somewhat experienced developer labels Mar 30, 2019
@tnc1997
Copy link
Contributor

tnc1997 commented Apr 1, 2019

I managed to make a start adjusting the rush-lib app in order to support both shrinkwrap.yaml (v2) and pnpm-lock.yaml (v3) files as per the differing versions of pnpm. Feel free to take a look at the changes, which continue on from those mentioned in #1180, in my fork.

@octogonz
Copy link
Collaborator

octogonz commented Apr 5, 2019

In a gitter thread @poelstra suggested that Rush should print an error if the package manager didn't create the filename that it was expected to create. Without that, he had a really confusing experience where he tried the "latest" version of PNPM and it mysteriously succeeded but there wasn't any shrinkwrap file.

@Toxaris
Copy link

Toxaris commented Apr 10, 2019

I just had a similar "really confusing experience" where rush install was failing in the CI so I locally run rush update && rush install and the latter complained that I need to run rush update again.

We're considering to switch from lerna+yarn to rush+pnpm in our monorepo and I'm following https://rushjs.io/pages/maintainer/setup_new_repo/ which tells me to "check that you’re using recent stable releases for any other applicable fields such as pnpmVersion".

A pointer from the documentation to this issue would have been appreciated. Or maybe https://rushjs.io/pages/maintainer/package_managers/ could mention the most recent pnpm version that is "known to work".

@bsiegel
Copy link
Member

bsiegel commented May 14, 2019

Is this completed by #1210?

@octogonz
Copy link
Collaborator

Yup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium Needs a somewhat experienced developer enhancement The issue is asking for a new feature or design change help wanted If you're looking to contribute, this issue is a good place to start!
Projects
None yet
Development

No branches or pull requests

5 participants