mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-28 02:53:15 -04:00
fix: don't print the same deprecation warning multiple times (#5149)
This commit is contained in:
6
.changeset/clean-ears-jam.md
Normal file
6
.changeset/clean-ears-jam.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't print the same deprecation warning multiple times.
|
||||
@@ -925,7 +925,9 @@ async function resolveDependency (
|
||||
status: 'resolved',
|
||||
})
|
||||
|
||||
ctx.resolvedPackagesByDepPath[depPath] = await getResolvedPackage({
|
||||
// WARN: It is very important to keep this sync
|
||||
// Otherwise, deprecation messages for the same package might get written several times
|
||||
ctx.resolvedPackagesByDepPath[depPath] = getResolvedPackage({
|
||||
allowBuild: ctx.allowBuild,
|
||||
dependencyLockfile: currentPkg.dependencyLockfile,
|
||||
depPath,
|
||||
@@ -1016,7 +1018,7 @@ function pkgIsLeaf (pkg: PackageManifest) {
|
||||
isEmpty(pkg.peerDependencies ?? {})
|
||||
}
|
||||
|
||||
async function getResolvedPackage (
|
||||
function getResolvedPackage (
|
||||
options: {
|
||||
allowBuild?: (pkgName: string) => boolean
|
||||
dependencyLockfile?: PackageSnapshot
|
||||
@@ -1029,7 +1031,7 @@ async function getResolvedPackage (
|
||||
prepare: boolean
|
||||
wantedDependency: WantedDependency
|
||||
}
|
||||
): Promise<ResolvedPackage> {
|
||||
): ResolvedPackage {
|
||||
const peerDependencies = peerDependenciesWithoutOwn(options.pkg)
|
||||
|
||||
const requiresBuild = (options.allowBuild == null || options.allowBuild(options.pkg.name))
|
||||
|
||||
Reference in New Issue
Block a user