Skip to content

Update pnpm to v11#16716

Merged
delucis merged 22 commits into
mainfrom
chris/pnpm-11
May 13, 2026
Merged

Update pnpm to v11#16716
delucis merged 22 commits into
mainfrom
chris/pnpm-11

Conversation

@delucis
Copy link
Copy Markdown
Member

@delucis delucis commented May 12, 2026

Changes

  • Updates pnpm to v11
  • Removes minimum release age exceptions that are no longer required
  • Cleans up deps in a couple of fixtures that were accidentally using npm versions of monorepo packages
  • Explicitly disallows postinstall scripts for all dependencies that have them
  • Enables pnpm’s trustPolicy which 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:

  • Updated deps in the Netlify adapter
  • Dropped support for older versions of VS Code so we can test with Node ≥22 which is pnpm 11’s minimum required version

Testing

Existing tests should pass

Docs

n/a — monorepo hardening only

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: c53b7b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@astrojs/netlify Patch
@astrojs/ts-plugin Patch
astro-vscode Patch
@test/netlify-session Patch
@test/netlify-hosted-astro-project Patch

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

@github-actions github-actions Bot added pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels May 12, 2026
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.2.1",
"lit": "^3.3.2",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

haha, i can't believe we still had this.

Comment on lines -14 to -15
"@webcomponents/template-shadowroot": "^0.2.1",
"lit": "^3.3.2",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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:*",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@delucis
Copy link
Copy Markdown
Member Author

delucis commented May 12, 2026

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

Comment thread package.json Outdated
Comment thread pnpm-workspace.yaml
Copy link
Copy Markdown
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

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

Comment thread pnpm-workspace.yaml Outdated
Comment thread pnpm-workspace.yaml
Comment on lines +68 to +78
# 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'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Uhm, not a fan of this. We should probably review our smoke tests.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@github-actions

This comment was marked as outdated.

@github-actions github-actions Bot added the 🚨 action Modifies GitHub Actions label May 13, 2026
Comment thread .github/workflows/ci.yml
Comment on lines -358 to -361
# Reset lockfile changes so that Turbo can reuse the old build cache
- name: Reset lockfile changes
run: git reset --hard

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@Princesseuh
Copy link
Copy Markdown
Member

Princesseuh commented May 13, 2026

You can update the VS Code engine and types package to 1.101.x and update the CI to run on Node 22.15.1, this will need a vscode changeset too (can be a patch, it's not "breaking" people in the same way a library would)

@delucis
Copy link
Copy Markdown
Member Author

delucis commented May 13, 2026

I think this is ready.

Some follow-ups coming out of this PR:

  • Clean up pnpm overrides that may no longer be necessary (see Update pnpm to v11 #16716 (comment))
  • Remove minimum release age config that’s no longer necessary (on Friday)
  • Figure out if we can better handle the docs smoke test so we’re not maintaining a list of docs deps to exclude in this repo

@delucis delucis merged commit 04fdbb2 into main May 13, 2026
26 checks passed
@delucis delucis deleted the chris/pnpm-11 branch May 13, 2026 15:56
@astrobot-houston astrobot-houston mentioned this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 action Modifies GitHub Actions pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants