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

chore(deps): update pnpm to v8 #12830

Merged
merged 3 commits into from
Apr 12, 2023
Merged

chore(deps): update pnpm to v8 #12830

merged 3 commits into from
Apr 12, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 11, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pnpm (source) 7.30.0 -> 8.2.0 age adoption passing confidence

Release Notes

pnpm/pnpm

v8.2.0

Compare Source

Minor Changes

  • Allow env variables to be specified with default values in .npmrc. This is a convention used by Yarn too.
    Using ${NAME-fallback} will return fallback if NAME isn't set. ${NAME:-fallback} will return fallback if NAME isn't set, or is an empty string #​6018.

Patch Changes

  • Add -g to mismatch registries error info when original command has -g option #​6224.
  • Don't fail with EBUSY error when trying to copy a file from the store #​6201
  • pnpm config get <key> should print boolean values #​6360
  • Don't print an info message about linked dependencies if they are real linked dependencies specified via the link: protocol in package.json #​6372

Our Gold Sponsors

Our Silver Sponsors

v8.1.1

Compare Source

Patch Changes

  • Repeat installation should work on a project that has a dependency with parentheses in the scope name #​6348.
  • Error summary should be reported as expected.
  • Update @yarnpkg/shell to fix issues in the shell emulator #​6320.
  • Installation should not fail when there is a local dependency in a directory that starts with the @ character #​6332.
  • Registries are now passed to the preResolution hook.

Our Gold Sponsors

Our Silver Sponsors

v8.1.0

Compare Source

Minor Changes

  • A new setting has been added called dedupe-direct-deps, which is disabled by default. When set to true, dependencies that are already symlinked to the root node_modules directory of the workspace will not be symlinked to subproject node_modules directories. This feature was enabled by default in v8.0.0 but caused issues, so it's best to disable it by default #​6299.
  • Add ignore-workspace-cycles to silence workspace cycle warning #​6308.

Patch Changes

  • Print the right lowest supported Node.js version in the error message, when pnpm is executed with an old Node.js version #​6297.
  • Improve the outdated lockfile error message #​6304.

Our Gold Sponsors

Our Silver Sponsors

v8.0.0

Compare Source

We are excited to announce the latest release of pnpm! To install it, check the installation page.

image

Major Changes

Node.js 14 Support Discontinued

If you still require Node.js 14, don't worry. We ship pnpm bundled with Node.js. This means that regardless of which Node.js version you've installed, pnpm will operate using the necessary Node.js runtime. For this to work you need to install pnpm either using the standalone script or install the @pnpm/exe package.

Configuration Updates

Most of the configuration changes are related to peer dependencies. Most of these settings were implemented long ago, and we recommended them to users encountering peer dependency issues. The recently added dedupe-peer-dependents resolved many such problems. With these new defaults, pnpm will face significantly fewer issues during migration from other package managers.

Lockfile Modifications
  • Lockfile v6 is adopted. This new format improves the readability of the lockfile by removing hashes from package IDs. It also has some rearrangement of fields in the importers section. The new pnpm-lock.yaml file is more resistant to git merge conflicts!
  • The registry field is removed from the resolution object in pnpm-lock.yaml.
  • A lockfile is generated even for projects with no dependencies.
Other Changes
  • When there's a files field in the package.json, only the files that are listed in it will be deployed. The same logic is applied when injecting packages. This behaviour can be changed by setting the deploy-all-files setting to true (Related issue #​5911).
  • Direct dependencies are deduped. If a dependency is present in both a project and the workspace root, it will only be linked to the workspace root.

Migration Instructions

Before updating pnpm to v8 in your CI, regenerate your pnpm-lock.yaml. To upgrade your lockfile, run pnpm install and commit the changes. Existing dependencies will not be updated; however, due to configuration changes in pnpm v8, some missing peer dependencies may be added to the lockfile and some packages may get deduplicated.

You can commit the new lockfile even before upgrading Node.js in the CI, as pnpm v7 already supports the new lockfile format.

pnpm v7 Support

pnpm v7 will likely not receive any new features, but it will continue to get bug fixes for a few months and vulnerability fixes for at least a year.

Our Gold Sponsors

Our Silver Sponsors

v7.32.0

Compare Source

Minor Changes
  • Allow env variables to be specified with default values in .npmrc. This is a convention used by Yarn too.
    Using ${NAME-fallback} will return fallback if NAME isn't set. ${NAME:-fallback} will return fallback if NAME isn't set, or is an empty string #​6018.
Patch Changes
  • pnpm config get <key> returns empty when the value is a boolean
  • Don't print an info message about linked dependencies if they are real linked dependencies specified via the link: protocol in package.json.
  • Add -g to mismatch registries error info when original command has -g option #​6224.
Our Gold Sponsors
Our Silver Sponsors

v7.31.0

Compare Source

Minor Changes

  • Add ignore-workspace-cycles to silence workspace cycle warning #​6308.
Patch Changes
  • Registries are now passed to the preResolution hook.
  • Repeat installation should work on a project that has a dependency with () chars in the scope name #​6348.
  • Should report error summary as expected.
  • Update @yarnpkg/shell to fix issues in the shell emulator #​6320.
  • Installation should not fail when there is a local dependency that starts in a directory that starts with the @ char #​6332.

Our Gold Sponsors

Our Silver Sponsors

v7.30.5

Compare Source

Patch Changes

  • pnpm audit should work even if there are no package.json file, just a pnpm-lock.yaml file.
  • Dedupe direct dependencies after hoisting.
  • Don't remove automatically installed peer dependencies from the root workspace project, when dedupe-peer-dependents is true #​6154.

Our Gold Sponsors

Our Silver Sponsors

v7.30.4

Compare Source

v7.30.3

Compare Source

Patch Changes

  • Should use most specific override rule when multiple rules match the same target #​6210.
  • Fix regression introduced in v7.30.1 #​6271.

Our Gold Sponsors

Our Silver Sponsors

v7.30.2

Compare Source

v7.30.1

Compare Source

Patch Changes
  • Don't write the pnpm-lock.yaml file if it has no changes and pnpm install --frozen-lockfile was executed #​6158.
  • Fix git-hosted dependencies referenced via git+ssh that use semver selectors #​6239.
  • When publish some package throws an error, the exit code should be non-zero #​5528.
  • Only three paths are displayed in pnpm audit output #​6203
  • Aliased packages should be used to resolve peer dependencies too #​4301.
Our Gold Sponsors
Our Silver Sponsors

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Apr 11, 2023
@stackblitz
Copy link

stackblitz bot commented Apr 11, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@Shinigami92 Shinigami92 marked this pull request as draft April 11, 2023 14:02
@renovate
Copy link
Contributor Author

renovate bot commented Apr 11, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@Shinigami92 Shinigami92 marked this pull request as ready for review April 11, 2023 14:09
@patak-dev
Copy link
Member

It looks like node 14 still works after updating 🤔

@Shinigami92
Copy link
Member

It looks like node 14 still works after updating 🤔

Have a look into what I did in ci.yaml !

@patak-dev
Copy link
Member

Oh, nice one! cc @dominikg, this could work, no?

@dominikg
Copy link
Contributor

this works as long as there is no engine-strict and engines.pnpm: "^8.0.0" in vite monorepo root.

To ensure pnpm7 uses the new lockfile format, you could set it in .npmrc or modify the install command for node14
see https://github.com/pnpm/pnpm/releases/tag/v7.24.2

but hopefully it just picks it up from the existing lockfile

Not really a fan of the duplication in ci.yml but as we are going to remove node14 soonish, it's not a dealbreaker.
If we only use it for install from frozen lock, i hope there are no differences in behavior between 7 and 8, otherwise this could lead to hard to debug problems on node14 ci.

@Shinigami92
Copy link
Member

@dominikg the pnpm's source code uses some lockfileVersion.toString().startsWith('6.')
so I assume it is as you already expected: it picks the lock-v6 variant if it is already on that

Otherwise I would also expect the CI to already fail due to invalid lock file format

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

LGTM. Can confirm that pnpm7 would automatically install with lockfile format 6 by default too.

Copy link
Collaborator

@benmccann benmccann left a comment

Choose a reason for hiding this comment

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

this would be nice. I've been holding off on updating SvelteKit and imagetools as having different versions was causing me difficulty

@Shinigami92
Copy link
Member

this would be nice. I've been holding off on updating SvelteKit and imagetools as having different versions was causing me difficulty

This is exactly what my motivation is to upgrade Vite to pnpm v8
I want to upgrade my nearer ecosystem around me, and Vite is one of them

@patak-dev
Copy link
Member

It seems Codeflow is having issues with the lockfile after this PR. I'm discussing this with @d3lm, let's hold the merge a bit if possible.

@dominikg
Copy link
Contributor

yeah, webcontainer needs to update pnpm to at least 7.24, briefly discussed here stackblitz/webcontainer-core#871 (comment)

if codeflow support is important for vite repo itself, should we add a ci check for it?

@d3lm
Copy link

d3lm commented Apr 12, 2023

pnpm has been updated to the latest version in WebContainer (8.2.0) and it's been deployed to production. I hope that this is now ready to move forward and it's no longer blocked.

@patak-dev
Copy link
Member

Thanks for the quick update @d3lm! I tested this PR (and some other projects) and it works great. Let's merge it then!

@patak-dev patak-dev merged commit 12ff365 into main Apr 12, 2023
@patak-dev patak-dev deleted the renovate/pnpm-8.x branch April 12, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants