Skip to content

Commit 51da8ae

Browse files
renovate[bot]Amxx
andauthored
Update dependency yargs to v18 (#5704)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent 6ccfb7b commit 51da8ae

File tree

6 files changed

+177
-28
lines changed

6 files changed

+177
-28
lines changed

package-lock.json

Lines changed: 157 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"solidity-coverage": "^0.8.14",
9090
"solidity-docgen": "^0.6.0-beta.29",
9191
"undici": "^7.4.0",
92-
"yargs": "^17.0.0"
92+
"yargs": "^18.0.0"
9393
},
9494
"lint-staged": {
9595
"*.{js,ts}": [

scripts/checks/compare-layout.js

100644100755
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
#!/usr/bin/env node
2+
13
const fs = require('fs');
24
const { getStorageUpgradeReport } = require('@openzeppelin/upgrades-core/dist/storage');
35

4-
const { ref, head } = require('yargs').argv;
6+
const { hideBin } = require('yargs/helpers');
7+
const { argv } = require('yargs/yargs')(hideBin(process.argv))
8+
.env('')
9+
.options({
10+
ref: { type: 'string', required: true },
11+
head: { type: 'string', required: true },
12+
});
513

6-
const oldLayout = JSON.parse(fs.readFileSync(ref));
7-
const newLayout = JSON.parse(fs.readFileSync(head));
14+
const oldLayout = JSON.parse(fs.readFileSync(argv.ref));
15+
const newLayout = JSON.parse(fs.readFileSync(argv.head));
816

917
for (const name in oldLayout) {
1018
if (name in newLayout) {

scripts/checks/compareGasReports.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
const fs = require('fs');
44
const chalk = require('chalk');
5-
const { argv } = require('yargs')
6-
.env()
5+
6+
const { hideBin } = require('yargs/helpers');
7+
const { argv } = require('yargs/yargs')(hideBin(process.argv))
8+
.env('')
79
.options({
810
style: {
911
type: 'string',

scripts/checks/extract-layout.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const fs = require('fs');
22
const { findAll, astDereferencer, srcDecoder } = require('solidity-ast/utils');
33
const { extractStorageLayout } = require('@openzeppelin/upgrades-core/dist/storage/extract');
44

5-
const { _ } = require('yargs').argv;
5+
const { hideBin } = require('yargs/helpers');
6+
const { argv } = require('yargs/yargs')(hideBin(process.argv));
67

78
const skipPath = ['contracts/mocks/', 'contracts-exposed/'];
89
const skipKind = ['interface', 'library'];
@@ -35,4 +36,4 @@ function extractLayouts(path) {
3536
return layout;
3637
}
3738

38-
console.log(JSON.stringify(Object.assign(..._.map(extractLayouts))));
39+
console.log(JSON.stringify(Object.assign(...argv._.map(extractLayouts))));

scripts/checks/inheritance-ordering.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const path = require('path');
44
const graphlib = require('graphlib');
55
const match = require('micromatch');
66
const { findAll } = require('solidity-ast/utils');
7-
const { _: artifacts } = require('yargs').argv;
7+
const { _: artifacts } = require('yargs/yargs')().argv;
88

99
// files to skip
1010
const skipPatterns = ['contracts-exposed/**', 'contracts/mocks/**'];

0 commit comments

Comments
 (0)