Skip to content

Commit 61d3164

Browse files
feat: add support for packageExtensions in yarn and pnpm (#1847)
1 parent 9cc5a41 commit 61d3164

20 files changed

Lines changed: 144 additions & 65 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "@plugins/pnpm2",
3+
"dependencies": {
4+
"is-odd": "*"
5+
}
6+
}

packages/knip/fixtures/plugins/pnpm2/pnpm-lock.yaml renamed to packages/knip/fixtures/plugins/pnpm-workspace/pnpm-lock.yaml

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
packages:
2+
- 'packages/*'
3+
packageExtensions:
4+
react-csv@*:
5+
peerDependencies:
6+
is-odd: "*"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
{
2-
"packageManager": "pnpm@10.14.0"
2+
"name": "@plugins/pnpm",
3+
"packageManager": "pnpm@10.14.0",
4+
"dependencies": {
5+
"prop-types": "*"
6+
},
7+
"pnpm": {
8+
"packageExtensions": {
9+
"react-csv@*": {
10+
"peerDependencies": {
11+
"prop-types": "*"
12+
}
13+
}
14+
}
15+
}
316
}

packages/knip/fixtures/plugins/pnpm2/.pnpmfile.cjs

Whitespace-only changes.

packages/knip/fixtures/plugins/pnpm2/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/knip/fixtures/plugins/pnpm2/pnpm-workspace.yaml

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packageExtensions:
2+
react-csv@*:
3+
peerDependencies:
4+
prop-types: "*"

0 commit comments

Comments
 (0)