Skip to content

Commit 4a711a4

Browse files
committed
Don't remove workspace protocol when comparing dev and peer deps
1 parent b939d8d commit 4a711a4

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

packages/hardhat-truffle4/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"web3": "^0.20.0"
6767
},
6868
"peerDependencies": {
69-
"@nomiclabs/hardhat-web3-legacy": "^2.0.0",
69+
"@nomiclabs/hardhat-web3-legacy": "workspace:^2.0.0",
7070
"hardhat": "workspace:^2.6.4",
7171
"web3": "^0.20.0"
7272
}

packages/hardhat-truffle5/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"web3": "^1.0.0-beta.36"
6767
},
6868
"peerDependencies": {
69-
"@nomiclabs/hardhat-web3": "^2.0.0",
69+
"@nomiclabs/hardhat-web3": "workspace:^2.0.0",
7070
"hardhat": "workspace:^2.6.4",
7171
"web3": "^1.0.0-beta.36"
7272
}

scripts/check-dependencies.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,9 @@ function checkPeerDepedencies(packageJson) {
5656
continue;
5757
}
5858

59-
const peerDep = packageJson.peerDependencies[dependency].replace(
60-
/^workspace:/,
61-
""
62-
);
59+
const peerDep = packageJson.peerDependencies[dependency];
60+
const devDep = packageJson.devDependencies[dependency];
6361

64-
const devDep = packageJson.devDependencies[dependency].replace(
65-
/^workspace:/,
66-
""
67-
);
6862
if (peerDep !== devDep) {
6963
console.error(
7064
`${packageJson.name} has different versions of ${dependency} as peerDependency and devDependency`

0 commit comments

Comments
 (0)