Skip to content

Conversation

@CraigMacomber
Copy link
Contributor

@CraigMacomber CraigMacomber commented May 16, 2024

Description

Update pnpm to version 8. That means lock-file format version 6.

This relies on microsoft/component-detection#1110 which seems to be deployed and working now.

This gets us onto a supported version of pnpm according to https://github.com/pnpm/pnpm/security.

Reviewer Guidance

The review process is outlined on this wiki page.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file base: main PRs targeted against main branch labels May 16, 2024
@github-actions github-actions bot added area: build Build related issues area: server Server related issues (routerlicious) labels May 21, 2024
@CraigMacomber CraigMacomber marked this pull request as ready for review May 21, 2024 21:18
Copy link
Contributor

@ChumpChief ChumpChief left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

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

Skimmed two of the lockfiles. The things I saw seemed reasonable; I don't think a line-by-line review is reasonable in this case.

Any reason why we only converted those two in tools/? benchmark, changelog-generator-wrwapper, markdown-magic, and test-tools are also on pnpm.

lockfileVersion: '6.0'

settings:
autoInstallPeers: true
Copy link
Contributor

Choose a reason for hiding this comment

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

This caught my eye... not sure what does it mean in the lockfile, but we don't currently auto-install peer deps, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting. I'll look into that. I'm guessing its a new setting in pnpm 8 with that as the default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I can tell, this matches how npm's behavior, and can be controlled via the npmrc file which we do have and has some related settings in it. I think this effects commands like pnpm i foo to add new dependencies (matching what npm i foo` would do), and we can reconfigure it from the default in our .npmrc file later if we do not like this behavior.

@CraigMacomber
Copy link
Contributor Author

Skimmed two of the lockfiles. The things I saw seemed reasonable; I don't think a line-by-line review is reasonable in this case.

Any reason why we only converted those two in tools/? benchmark, changelog-generator-wrwapper, markdown-magic, and test-tools are also on pnpm.

Thats a bug. When searching for package.json files to update, I had a comma at the end of my search thus skipping packages where "packageManager": was the last key. I'll fix it

@CraigMacomber
Copy link
Contributor Author

Skimmed two of the lockfiles. The things I saw seemed reasonable; I don't think a line-by-line review is reasonable in this case.
Any reason why we only converted those two in tools/? benchmark, changelog-generator-wrwapper, markdown-magic, and test-tools are also on pnpm.

Thats a bug. When searching for package.json files to update, I had a comma at the end of my search thus skipping packages where "packageManager": was the last key. I'll fix it

I also missed several packages using different version of pnpm, and a couple that didn't have an enforced version. Now there are no longer any hits for lockfileVersion: 5 when searching the repo, so I think I got everything.

submodules: false
- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # ratchet:pnpm/action-setup@v2
with:
version: "^7"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required if the package.json does not specify a version , and optional if it does. Since a version is now provided in the package.json, this can be removed, see https://github.com/pnpm/action-setup?tab=readme-ov-file#version for details.

@CraigMacomber CraigMacomber merged commit 73e371c into microsoft:main May 21, 2024
@CraigMacomber CraigMacomber deleted the pnpm8 branch May 21, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build related issues area: server Server related issues (routerlicious) area: website base: main PRs targeted against main branch dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants