Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbatuto committed Jan 7, 2025
1 parent 50d19f8 commit 1838d11
Show file tree
Hide file tree
Showing 6 changed files with 626 additions and 234 deletions.
36 changes: 20 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"tools:validate-bundle-names": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/validate-bundle-names.js",
"tools:bump-openapi-spec-dep-versions": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/bump-openapi-spec-dep-versions.ts",
"tools:bundle-open-api-tpl-files": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/bundle-open-api-tpl-files.ts",
"tools:check-dependency-version-consistency": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/custom-checks/check-dependency-version-consistency.ts",
"tools:create-production-only-archive": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/create-production-only-archive.ts",
"tools:download-file-to-disk": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/download-file-to-disk.ts",
"tools:get-latest-sem-ver-git-tag": "TS_NODE_PROJECT=./tools/tsconfig.json node --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node --no-warnings ./tools/get-latest-sem-ver-git-tag.ts",
Expand Down Expand Up @@ -91,34 +92,34 @@
"resolutions": {
"@babel/traverse": ">=7.23.2",
"ansi-html": ">=0.0.8",
"axios": ">=0.27.2",
"body-parser": ">=1.20.3",
"axios": ">=1.7.9",
"body-parser": "1.20.3",
"braces": ">=3.0.3",
"x-dicer": ">0.3.1",
"elliptic": ">=6.5.7",
"elliptic": ">=6.6.0",
"engine.io": ">=6.4.2",
"get-func-name": ">=2.0.1",
"glob-parent": ">=5.1.2",
"x-hoek": ">6.1.3",
"http-cache-semantics": ">=4.1.1",
"http-cache-semantics": "4.1.1",
"[email protected]": "2.0.7",
"http-proxy-middleware@^2.0.3": "2.0.7",
"x-ip": ">2.0.1",
"jsonwebtoken": ">=9.0.0",
"jsrsasign": ">=11.0.0",
"lodash": ">=4.17.21",
"jsonwebtoken": ">=9.0.2",
"jsrsasign": "11.0.0",
"lodash": "4.17.21",
"x-minimatch": ">=3.0.5",
"minimist": ">=1.2.6",
"minimist": ">=1.2.8",
"nano": ">=10.0.0",
"node-forge": ">=1.3.0",
"node-forge": "1.3.0",
"nth-check": ">=2.0.1",
"postcss": ">=8.4.31",
"protobufjs": ">=7.2.5",
"semver": ">=7.5.2",
"protobufjs": ">=7.4.0",
"semver": ">=7.6.2",
"socket.io-parser": ">=4.2.3",
"tough-cookie": ">=4.1.3",
"underscore": ">=1.13.2",
"vite": ">4.5.1",
"vite": ">5.4.11",
"webpack-dev-middleware": ">=6.1.2",
"word-wrap": ">=1.2.5",
"ws": ">=1.1.5",
Expand Down Expand Up @@ -152,7 +153,7 @@
"@types/fs-extra": "11.0.4",
"@types/jest": "29.5.3",
"@types/madge": "5.0.3",
"@types/node": "18.11.9",
"@types/node": "18.19.0",
"@types/node-fetch": "2.6.4",
"@types/tape": "4.13.4",
"@types/tape-promise": "4.0.1",
Expand Down Expand Up @@ -219,9 +220,9 @@
"ts-node": "10.9.1",
"tsx": "4.16.2",
"typescript": "5.5.2",
"web3": "4.1.1",
"web3": "4.4.0",
"web3-core": "4.1.1",
"web3-eth": "4.1.1",
"web3-eth": "4.4.0",
"web3-utils": "4.3.0",
"webpack": "5.96.0",
"webpack-cli": "4.10.0",
Expand Down Expand Up @@ -320,5 +321,8 @@
"built": false
}
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"check-dependency-version-consistency": "4.1.0"
}
}
4 changes: 2 additions & 2 deletions packages/cactus-plugin-consortium-manual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
"body-parser": "1.20.3",
"express": "4.21.2",
"jose": "4.15.5",
"json-stable-stringify": "1.0.1",
"json-stable-stringify": "1.0.2",
"prom-client": "15.1.3",
"typescript-optional": "2.0.1",
"uuid": "10.0.0"
},
"devDependencies": {
"@types/express": "5.0.0",
"@types/json-stable-stringify": "1.0.33",
"@types/json-stable-stringify": "1.0.34",
"@types/uuid": "10.0.0"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/cactus-plugin-htlc-eth-besu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
"@hyperledger/cactus-test-tooling": "2.1.0",
"axios": "1.7.9",
"bn.js": "5.2.1",
"dotenv": "16.0.3",
"ethers": "6.3.0",
"dotenv": "16.3.1",
"ethers": "6.12.1",
"express": "4.21.2",
"joi": "17.13.3",
"openapi-types": "12.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/cactus-plugin-keychain-aws-sm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@hyperledger/cactus-core-api": "2.1.0",
"aws-sdk": "2.965.0",
"axios": "1.7.9",
"http-status-codes": "2.1.4",
"http-status-codes": "2.3.0",
"prom-client": "15.1.3",
"typescript-optional": "2.0.1"
},
Expand Down
29 changes: 29 additions & 0 deletions tools/custom-checks/check-dependency-version-consistency.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { CDVC } from "check-dependency-version-consistency";
import esMain from "es-main";
import { exit } from "process";

const PACKAGES_TO_BE_IGNORED_FOR_DEP_CONSISTENCY_CHECK: string[] = [];

export async function checkDependencyVersionConsistency(): Promise<
[boolean, string[]]
> {
const errors: string[] = [];
const cdvc = new CDVC(process.cwd(), {
ignorePackage: PACKAGES_TO_BE_IGNORED_FOR_DEP_CONSISTENCY_CHECK,
fix: true,
});
if (cdvc.hasMismatchingDependencies) {
errors.push(cdvc.toMismatchSummary());
}
return [errors.length === 0, errors];
}

if (esMain(import.meta)) {
const [success, dependencyMismatchSummary] =
await checkDependencyVersionConsistency();
if (!success) {
console.log(`${dependencyMismatchSummary}`);
exit(1);
}
exit(0);
}
Loading

0 comments on commit 1838d11

Please sign in to comment.