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 ebc74ca
Show file tree
Hide file tree
Showing 6 changed files with 559 additions and 160 deletions.
6 changes: 5 additions & 1 deletion 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 @@ -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 ebc74ca

Please sign in to comment.