Update Yarn usage to Yarn 4#16781
Draft
adamint wants to merge 7 commits intomicrosoft:mainfrom
Draft
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16781Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16781" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the repo’s VS Code extension and CI pipelines from Yarn Classic (v1) to Yarn 4, standardizing Yarn installation/activation via Corepack and updating config/lockfiles to the Yarn Berry format.
Changes:
- Install/activate
yarn@4.14.1via Corepack in official, unofficial, and CodeQL Azure Pipelines. - Update the VS Code extension to use Yarn 4 conventions (
packageManager,.yarnrc.yml) and remove the legacy.yarnrcand root Yarn Classic lockfile. - Add repo ignores for Yarn Berry artifacts and update extension build helpers/docs to reference Corepack.
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Removes the root Yarn Classic (v1) lockfile. |
| extension/package.json | Pins the package manager to yarn@4.14.1. |
| extension/Extension.proj | Attempts to enable Yarn via Corepack before version checks during extension build. |
| extension/CONTRIBUTING.MD | Updates contributor prerequisites to Corepack + pinned Yarn. |
| extension/build.sh | Enables Yarn via Corepack when Yarn isn’t present; updates install guidance. |
| extension/build.ps1 | Enables Yarn via Corepack when Yarn isn’t present; updates install guidance. |
| extension/.yarnrc.yml | Introduces Yarn 4 config (node-modules linker, registry/auth settings). |
| extension/.yarnrc | Removes legacy Yarn Classic configuration. |
| extension/.vscodeignore | Excludes Yarn 4 config/artifacts from packaged VSIX. |
| eng/pipelines/azure-pipelines.yml | Switches CI Yarn installation to Corepack + Yarn 4 and bridges npm auth into Yarn env vars. |
| eng/pipelines/azure-pipelines-unofficial.yml | Same Yarn/Corepack + auth bridging updates for unofficial pipeline. |
| eng/pipelines/azure-pipelines-codeql.yml | Adds npm auth + Yarn/Corepack setup so CodeQL can build the extension. |
| .gitignore | Ignores Yarn Berry artifacts (.yarn/, .pnp.*). |
| .github/workflows/tests.yml | Updates GitHub Actions test workflow to set up Yarn (per PR diff). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the repository's Yarn usage from Yarn Classic to Yarn 4.
Summary:
corepack@latestinstall.npmAuthenticate@0credentials into Yarn 4 auth environment variables so the dnceng npm feed remains usable, and adds the missing npm auth setup to CodeQL because it builds the VS Code extension..yarnrcto.yarnrc.yml, pinspackageManagertoyarn@4.14.1, and regeneratesextension/yarn.lockin Yarn 4 format.Validation:
YARN_NPM_REGISTRY_SERVER=https://registry.npmjs.org YARN_NPM_ALWAYS_AUTH=false yarn install --immutablefromextension/passed with existing peer dependency warnings.git diff --checkpassed.azure-pipelines-codeql.yml,azure-pipelines-unofficial.yml, orextension/.yarnrc.yml; existing diagnostics remain inazure-pipelines.ymlandextension/package.json.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: