-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nodejs): fix infinity loops for
pnpm
with cyclic imports (#6857)
- Loading branch information
1 parent
c24dfba
commit a614b69
Showing
4 changed files
with
152 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -900,4 +900,68 @@ var ( | |
}, | ||
}, | ||
} | ||
|
||
pnpmV9CyclicImport = []ftypes.Package{ | ||
{ | ||
ID: "[email protected]", | ||
Name: "update-browserslist-db", | ||
Version: "1.0.16", | ||
Relationship: ftypes.RelationshipDirect, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "browserslist", | ||
Version: "4.23.0", | ||
Relationship: ftypes.RelationshipIndirect, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "caniuse-lite", | ||
Version: "1.0.30001627", | ||
Relationship: ftypes.RelationshipIndirect, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "electron-to-chromium", | ||
Version: "1.4.789", | ||
Relationship: ftypes.RelationshipIndirect, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "escalade", | ||
Version: "3.1.2", | ||
Relationship: ftypes.RelationshipIndirect, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "node-releases", | ||
Version: "2.0.14", | ||
Relationship: ftypes.RelationshipIndirect, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
Name: "picocolors", | ||
Version: "1.0.1", | ||
Relationship: ftypes.RelationshipIndirect, | ||
}, | ||
} | ||
pnpmV9CyclicImportDeps = []ftypes.Dependency{ | ||
{ | ||
ID: "[email protected]", | ||
DependsOn: []string{ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
}, | ||
}, | ||
{ | ||
ID: "[email protected]", | ||
DependsOn: []string{ | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
}, | ||
}, | ||
} | ||
) |
67 changes: 67 additions & 0 deletions
67
pkg/dependency/parser/nodejs/pnpm/testdata/pnpm-lock_v9_cyclic_import.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
lockfileVersion: '9.0' | ||
|
||
settings: | ||
autoInstallPeers: true | ||
excludeLinksFromLockfile: false | ||
|
||
importers: | ||
|
||
.: | ||
dependencies: | ||
update-browserslist-db: | ||
specifier: 1.0.16 | ||
version: 1.0.16([email protected]) | ||
|
||
packages: | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} | ||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} | ||
hasBin: true | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw==} | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-0VbyiaXoT++Fi2vHGo2ThOeS6X3vgRCWrjPeO2FeIAWL6ItiSJ9BqlH8LfCXe3X1IdcG+S0iLoNaxQWhfZoGzQ==} | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} | ||
engines: {node: '>=6'} | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} | ||
|
||
[email protected]: | ||
resolution: {integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==} | ||
hasBin: true | ||
peerDependencies: | ||
browserslist: '>= 4.21.0' | ||
|
||
snapshots: | ||
|
||
[email protected]: | ||
dependencies: | ||
caniuse-lite: 1.0.30001627 | ||
electron-to-chromium: 1.4.789 | ||
node-releases: 2.0.14 | ||
update-browserslist-db: 1.0.16([email protected]) | ||
|
||
[email protected]: {} | ||
|
||
[email protected]: {} | ||
|
||
[email protected]: {} | ||
|
||
[email protected]: {} | ||
|
||
[email protected]: {} | ||
|
||
[email protected]([email protected]): | ||
dependencies: | ||
browserslist: 4.23.0 | ||
escalade: 3.1.2 | ||
picocolors: 1.0.1 |