Skip to content

Switch servicebroker-npm from Yarn to pnpm 11.6#513

Merged
AArnott merged 49 commits into
mainfrom
aarnott/switch-to-pnpm
Jun 15, 2026
Merged

Switch servicebroker-npm from Yarn to pnpm 11.6#513
AArnott merged 49 commits into
mainfrom
aarnott/switch-to-pnpm

Conversation

@AArnott

@AArnott AArnott commented Jun 15, 2026

Copy link
Copy Markdown
Member

This switches the src/servicebroker-npm package off Yarn and onto pnpm so the repo no longer depends on checked-in Yarn release/SDK artifacts and can use a current pnpm toolchain instead.

The change updates the local developer flow, CI restore/test/pack steps, and contributor docs together so the package is restored, built, tested, and packed consistently through corepack pnpm. It replaces yarn.lock with pnpm-lock.yaml, removes the tracked .yarn and PnP artifacts, updates VS Code guidance to use node_modules, and keeps the pack output compatible with the existing publish pipeline.

For pnpm 11.6 specifically, the transitive synckit override moved from package.json into pnpm-workspace.yaml because pnpm 11 no longer reads pnpm-specific settings from package.json. The workspace file also explicitly allows the trusted unrs-resolver postinstall script, which pnpm 11 now gates behind its supply-chain policy.

I validated the updated root init flow, the package init wrapper, package build/test, and package pack flow with the migrated setup.

AArnott and others added 2 commits June 14, 2026 20:59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 03:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the src/servicebroker-npm package from Yarn (Zero-Install / PnP + checked-in SDK artifacts) to a Corepack-managed pnpm toolchain, updating local scripts, CI steps, and contributor guidance so restore/build/test/pack flows work consistently with corepack pnpm.

Changes:

  • Switch packageManager from yarn@4.16.0 to pnpm@11.6.0, add pnpm workspace configuration, and replace Yarn artifacts with pnpm-lock.yaml.
  • Update restore/build/test/pack scripts and Azure Pipelines steps to use corepack pnpm and keep tarball naming compatible with the existing publish pipeline.
  • Update editor/tooling guidance to use node_modules-based TypeScript/ESLint/Prettier rather than Yarn SDK wrappers.

Reviewed changes

Copilot reviewed 24 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/servicebroker-npm/pnpm-workspace.yaml Adds pnpm v11 workspace-level config (allowBuilds, overrides).
src/servicebroker-npm/pnpm-lock.yaml Adds pnpm lockfile (with synckit override recorded).
src/servicebroker-npm/package.json Pins pnpm via packageManager and removes Yarn SDK dependency.
src/servicebroker-npm/pack.ps1 Replaces Yarn commands with pnpm/Corepack and preserves expected .tgz naming.
src/servicebroker-npm/init.ps1 Updates per-package init to run corepack pnpm install.
src/servicebroker-npm/.yarnrc.yml Removes Yarn-specific configuration.
src/servicebroker-npm/.yarn/sdks/typescript/package.json Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/typescript/lib/typescript.js Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/typescript/lib/tsserverlibrary.js Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/typescript/lib/tsserver.js Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/typescript/lib/tsc.js Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/prettier/package.json Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/prettier/index.cjs Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/integrations.yml Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/eslint/package.json Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/eslint/lib/unsupported-api.js Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.yarn/sdks/eslint/lib/api.js Removes checked-in Yarn SDK artifact.
src/servicebroker-npm/.vscode/settings.json Updates VS Code settings to use node_modules and pnpm-based Jest command.
src/servicebroker-npm/.npmrc Adds project-level npm registry settings for pnpm installs.
src/servicebroker-npm/.npmignore Ensures pnpm/workspace artifacts and .npmrc aren’t included in published tarballs.
src/servicebroker-npm/.gitignore Updates ignore rules to drop Yarn-specific patterns and include pnpm logs.
init.ps1 Updates root init flow to run pnpm install (and remove PnP artifacts).
CONTRIBUTING.md Updates contributor instructions for npm auth, maintenance, and pnpm usage.
azure-pipelines/node.yml Updates CI node test/pack steps to use pnpm.
azure-pipelines/install-dependencies.yml Updates CI setup to authenticate via .npmrc and rely on Corepack.

AArnott and others added 2 commits June 14, 2026 21:20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 28 changed files in this pull request and generated 4 comments.

Comment thread src/servicebroker-npm/pnpm-workspace.yaml
Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md Outdated
Comment thread src/servicebroker-npm/.vscode/settings.json Outdated
AArnott and others added 2 commits June 14, 2026 21:43
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 03:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 28 changed files in this pull request and generated 1 comment.

Comment thread src/servicebroker-npm/pnpm-workspace.yaml Outdated
AArnott and others added 2 commits June 14, 2026 22:03
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 06:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 28 changed files in this pull request and generated 2 comments.

Comment thread init.ps1 Outdated
Comment thread azure-pipelines/install-dependencies.yml Outdated
AArnott and others added 2 commits June 15, 2026 00:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 06:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 28 changed files in this pull request and generated 4 comments.

Comment thread src/servicebroker-npm/pack.ps1 Outdated
Comment thread src/servicebroker-npm/pack.ps1 Outdated
Comment thread src/servicebroker-npm/init.ps1 Outdated
Comment thread init.ps1
AArnott and others added 2 commits June 15, 2026 00:49
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 06:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 28 changed files in this pull request and generated 2 comments.

Comment thread src/servicebroker-npm/init.ps1 Outdated
Comment thread azure-pipelines/install-dependencies.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 27 out of 30 changed files in this pull request and generated 1 comment.

Comment thread src/servicebroker-npm/package.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AArnott AArnott marked this pull request as draft June 15, 2026 16:51
AArnott and others added 13 commits June 15, 2026 10:56
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip package-manager artifacts while scanning MSBuild inputs so pnpm's node_modules layout does not break SDK discovery. Add a targeted retry around pnpm restore for transient Azure Artifacts tarball timeouts, and clarify that the servicebroker npm wrapper restores through the repo-root init script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use FullName when reading discovered MSBuild input files so Windows PowerShell does not resolve FileInfo objects relative to the current directory during Azure prerequisite installation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configure pnpm to place its virtual store under obj so repo-wide MSBuild project scans do not recurse through pnpm's package tree. This avoids changing the shared Install-DotNetSdk.ps1 template script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Configure pnpm's virtual store in pnpm-workspace.yaml so the actual package tree is placed under obj while node_modules remains a lightweight linker directory. This keeps package artifacts out of src without changing the shared SDK install script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The default pnpm layout works with the root init prerequisite path after a clean install, so do not move package artifacts to obj as an unproven workaround.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AArnott AArnott marked this pull request as ready for review June 15, 2026 20:23
Copilot AI review requested due to automatic review settings June 15, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 32 changed files in this pull request and generated 1 comment.

Comment thread azure-pipelines/node.yml Outdated
AArnott and others added 2 commits June 15, 2026 14:34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 32 changed files in this pull request and generated 1 comment.

Comment thread src/servicebroker-npm/pack.ps1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AArnott AArnott enabled auto-merge (squash) June 15, 2026 21:41
@AArnott AArnott merged commit 634c8ff into main Jun 15, 2026
10 checks passed
@AArnott AArnott deleted the aarnott/switch-to-pnpm branch June 15, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants