Skip to content

Commit

Permalink
fix(pnpm-linker): warn only once about virtuals (#4776)
Browse files Browse the repository at this point in the history
* fix(pnpm-linker): warn only once about virtuals

* chore: changelog
  • Loading branch information
paul-soporan authored and merceyz committed Nov 18, 2022
1 parent aaf7ef3 commit 60f1dae
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .yarn/versions/56df934e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
releases:
"@yarnpkg/cli": patch
"@yarnpkg/plugin-pnpm": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-nm"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnp"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- "@yarnpkg/builder"
- "@yarnpkg/core"
- "@yarnpkg/doctor"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Yarn now accepts sponsorships! Please give a look at our [OpenCollective](https:

## Master

## 3.3.1

### Installs

- The `pnpm` linker no longer reports duplicate "incompatible virtual" warnings.

## 3.3.0

### Installs
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-pnpm/sources/PnpmLinker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class PnpmInstaller implements Installer {
// Downgrade virtual workspaces (cf isPnpmVirtualCompatible's documentation)
let targetDependency = dependency;
if (!isPnpmVirtualCompatible(dependency, {project: this.opts.project})) {
this.opts.report.reportWarning(MessageName.UNNAMED, `The pnpm linker doesn't support providing different versions to workspaces' peer dependencies`);
this.opts.report.reportWarningOnce(MessageName.UNNAMED, `The pnpm linker doesn't support providing different versions to workspaces' peer dependencies`);
targetDependency = structUtils.devirtualizeLocator(dependency);
}

Expand Down

0 comments on commit 60f1dae

Please sign in to comment.