Skip to content

Commit

Permalink
update the package version scripts to include the peerDependencies (h…
Browse files Browse the repository at this point in the history
…yperledger-archives#3955)

* update the package version scripts to include the peerDependencies

Signed-off-by: Matthew B White <[email protected]>

* update package.json

Signed-off-by: Matthew B White <[email protected]>
  • Loading branch information
mbwhite authored and jt-nti committed May 9, 2018
1 parent 7480f8a commit e866a16
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/composer-runtime-embedded/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
}
},
"peerDependencies": {
"composer-common": "0.19.3"
"composer-common": "0.19.5"
},
"dependencies": {
"composer-runtime": "0.19.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-wallet-filesystem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
},
"peerDependencies": {
"composer-common": "0.19.3"
"composer-common": "0.19.5"
},
"dependencies": {
"mkdirp": "0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/composer-wallet-inmemory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
},
"peerDependencies": {
"composer-common": "0.19.3"
"composer-common": "0.19.5"
},
"nyc": {
"exclude": [
Expand Down
3 changes: 3 additions & 0 deletions scripts/depcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ for (const packageIndex in packages) {
for (const dependency in currentPackage.devDependencies) {
checkValue(packageIndex, dependency, currentPackage.devDependencies[dependency]);
}
for (const dependency in currentPackage.peerDependencies) {
checkValue(packageIndex, dependency, currentPackage.peerDependencies[dependency]);
}
}

if (Object.keys(badDependencies).length > 0) {
Expand Down
12 changes: 12 additions & 0 deletions scripts/pkgcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ for (const i in packages) {
}
}
}
for (const dependency in currentPackage.peerDependencies) {
const currentValue = currentPackage.peerDependencies[dependency];
if (dependency === otherPackage.name) {
if (currentValue !== targetDependency) {
if (!badDependencies[i]) {
badDependencies[i] = [];
}
badDependencies[i].push({ dependency: dependency, currentValue: currentValue });
mismatch = true;
}
}
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions scripts/pkgstamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ for (const i in packages) {
currentPackage.devDependencies[dependency] = targetVersion;
}
}
for (const dependency in currentPackage.peerDependencies) {
const currentValue = currentPackage.peerDependencies[dependency];
if (dependency === otherPackage.name) {
currentPackage.peerDependencies[dependency] = targetVersion;
}
}
}
const packageFile = path.resolve(packagesDirectory, i, 'package.json');
fs.writeFileSync(packageFile, JSON.stringify(currentPackage, null, 2), 'utf8');
Expand Down

0 comments on commit e866a16

Please sign in to comment.