Update pnpm to v11#16716
Conversation
🦋 Changeset detectedLatest commit: c53b7b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| }, | ||
| "dependencies": { | ||
| "@webcomponents/template-shadowroot": "^0.2.1", | ||
| "lit": "^3.3.2", |
There was a problem hiding this comment.
haha, i can't believe we still had this.
| "@webcomponents/template-shadowroot": "^0.2.1", | ||
| "lit": "^3.3.2", |
There was a problem hiding this comment.
These packages used to be used in this fixture but are no longer needed now we don’t have the Lit integration. Removing them allowed me to clean up some pnpm config.
| "dependencies": { | ||
| "@astrojs/cloudflare": "workspace:*", | ||
| "@astrojs/solid-js": "^5.1.3", | ||
| "@astrojs/solid-js": "workspace:*", |
There was a problem hiding this comment.
This fixture and a few others were not using workspace:* copies of monorepo packages. This caused them to lag behind and use outdated versions which the newly enable trustPolicy caught.
|
Ah, smoke test is failing because it clones docs but runs it in the context of the monorepo so trustPolicy needs to apply on docs deps too 😅 I might first make a PR to docs to enable it there and then I’ll come back here knowing what’s needed. Update: 9050066 should fix this |
There was a problem hiding this comment.
The failure is caused by an accidental update of one of netlfy deps, which are buggy and make our tests fail. In fact, the lock file changed some of those deps. Please revert them.
The Netlify team published a fixed a version a few days ago, but I don't know if it matches our minium age policy. The fix is here https://github.com/netlify/primitives/releases/tag/vite-plugin-v2.12.2
| # Dependencies in the docs repo that gets cloned for smoke tests | ||
| - 'undici@5.29.0' | ||
| - 'algoliasearch@4.27.0' | ||
| - '@algolia/client-analytics@4.27.0' | ||
| - '@algolia/recommend@4.27.0' | ||
| - '@algolia/client-search@4.27.0' | ||
| - '@algolia/requester-browser-xhr@4.27.0' | ||
| - '@algolia/requester-node-http@4.27.0' | ||
| - '@algolia/client-common@4.27.0' | ||
| - '@algolia/logger-console@4.27.0' | ||
| - '@algolia/client-personalization@4.27.0' |
There was a problem hiding this comment.
nit: Uhm, not a fan of this. We should probably review our smoke tests.
There was a problem hiding this comment.
Yeah agreed. I wondered if instead of cloning to smoke/docs/ and relying on pnpm to autolink astro & co, we should clone as a sibling to the monorepo and npm link packages? If possible? Might be too much to do in this PR though, so went with this as the easiest quick fix.
This comment was marked as outdated.
This comment was marked as outdated.
I accidentally ran an install with the docs repo still cloned, this fixes that.
| # Reset lockfile changes so that Turbo can reuse the old build cache | ||
| - name: Reset lockfile changes | ||
| run: git reset --hard | ||
|
|
There was a problem hiding this comment.
This hack no longer works: it appears pnpm 11 will run an install if it detects that packages are not installed correctly. This means that this reset caused the subsequent pnpm run build to rerun an install, which fails due to frozen lockfile requirements in CI. There’s no way to pass --no-frozen-lockfile in this scenario though.
I tested this in a small dummy project where I manually added a dep to package.json and tried running a script. pnpm 11 immediately went to install the dep before running the script.
|
You can update the VS Code engine and types package to |
|
I think this is ready. Some follow-ups coming out of this PR:
|
Changes
trustPolicywhich prevents installing versions of packages that have reduced their publishing provenance. This required applying some limited exceptions to continue installing our currently installed packages.Some semi-user-facing changes:
Testing
Existing tests should pass
Docs
n/a — monorepo hardening only