Skip to content

Commit

Permalink
build(deps): pin ALL dependency versions in package.json files 2023-0…
Browse files Browse the repository at this point in the history
…7-24

1. Replaced all tilde and caret characters in package.json
files with nothing so that all versions are pinned down
for safety and stability of the build/publishing process.
2. On top of just removing the tildes and carets, I also upgraded the
declared versions to whatever their caret upgrades would've been (e.g.
performed minor upgrades on all the versions). This is important because
this is how we achieve parity with the actual dependencies that were used
by the code prior to this PR - this also highlights why it is necessary to
have reproducible builds and pinned versions: because without it one has
no actual answer to the question of "So what dependencies does your code
need to function exactly?"
4. Removed the jasmine types from the root package because they
were causing build problems with the weaver tsc compilation.
The proper, longer term solution here is to make the weaver packages'
tsc configuration on-boarded to the monorepo structure, but I did not want
to blow up this commit to be 10x the current size just because of this.
I opened a couple of issues regarding this.
5. I added protobufjs as a dev dependency to the API server package because
artillery suddenly stopped working when grpcjs was upgraded and it was
complaining that one of its dependencies (protobufjs) cannot be imported.
6. I added the protocol buffer compiler to the dev container.
7. Added a new VSCode extension to the list of recommended ones because
I found it extremely useful while performing the minor upgrades in the
dozens of package.json files (100+ dependencies in total). Why? Because
all the other tooling that exists in the NodeJS ecosystem assumes that
doing major upgrades on dependencies in batch is the only thing needed.
None of the tools are able to do a minor upgrades only mass upgrade
operation, even the ones that claim this as a feature do not have it.
8. I synced the list of recommended VSCode extensions to the dev container
definition file so that the same extensions get installed automatically
in the container as well.

Fixes hyperledger-cacti#2571

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Aug 11, 2023
1 parent d84fcd5 commit 60db2b5
Show file tree
Hide file tree
Showing 26 changed files with 1,635 additions and 1,447 deletions.
26 changes: 25 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,32 @@
},
"ghcr.io/devcontainers-contrib/features/kind:1": {
"version": "v0.18.0"
},
"ghcr.io/devcontainers-contrib/features/protoc:1": {
"version": "v3.23.4"
}
},
"customizations": {
"vscode": {
"extensions": [
"bierner.markdown-mermaid",
"mhutchie.git-graph",
"alefragnani.bookmarks",
"yzhang.markdown-all-in-one",
"trabpukcip.vscode-npm-scripts",
"jebbs.plantuml",
"ms-vscode-remote.vscode-remote-extensionpack",
"juanblanco.solidity",
"dbaeumer.vscode-eslint",
"42crunch.vscode-openapi",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker",
"github.vscode-pull-request-github",
"codeandstuff.package-json-upgrade"
]
}
}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"esbenp.prettier-vscode",
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker",
"github.vscode-pull-request-github"
"github.vscode-pull-request-github",
"codeandstuff.package-json-upgrade"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@
"author": "hyperledger",
"license": "Apache-2.0",
"devDependencies": {
"@types/chai": "^4.2.16",
"@types/crypto-js": "^4.0.1",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.37",
"@types/rewire": "^2.5.28",
"chai": "^4.3.4",
"mocha": "^8.3.2",
"sinon": "^10.0.0",
"ts-node": "^9.1.1",
"tslint": "^6.1.3"
"@types/chai": "4.3.5",
"@types/crypto-js": "4.1.1",
"@types/mocha": "8.2.2",
"@types/node": "16.18.40",
"@types/rewire": "2.5.28",
"chai": "4.3.7",
"mocha": "8.4.0",
"sinon": "10.0.0",
"ts-node": "10.9.1"
},
"dependencies": {
"crypto-js": "^4.0.0",
"fabric-shim": "^2.2.1"
"crypto-js": "4.1.1",
"fabric-shim": "2.2.2"
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@
"@lerna-lite/run": "1.17.0",
"@openapitools/openapi-generator-cli": "2.4.14",
"@types/fs-extra": "9.0.12",
"@types/jasminewd2": "2.0.10",
"@types/jest": "27.5.0",
"@types/jest": "28.1.1",
"@types/node": "15.14.7",
"@types/node-fetch": "2.5.12",
"@types/tape": "4.13.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cacti-cmd-gui-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"solid-icons": "1.0.4",
"solid-js": "1.5.7",
"solid-slider": "1.3.9",
"solid-toast": "^0.4.0"
"solid-toast": "0.5.0"
},
"engines": {
"npm": ">=6"
Expand Down
7 changes: 4 additions & 3 deletions packages/cactus-cmd-api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"dependencies": {
"@grpc/grpc-js": "1.8.8",
"@grpc/proto-loader": "0.6.4",
"@grpc/grpc-js": "1.9.0",
"@grpc/proto-loader": "0.7.8",
"@hyperledger/cactus-common": "2.0.0-alpha.1",
"@hyperledger/cactus-core": "2.0.0-alpha.1",
"@hyperledger/cactus-core-api": "2.0.0-alpha.1",
Expand Down Expand Up @@ -117,7 +117,8 @@
"google-protobuf": "3.18.0-rc.2",
"grpc-tools": "1.11.2",
"grpc_tools_node_protoc_ts": "5.3.1",
"http-status-codes": "2.1.4"
"http-status-codes": "2.1.4",
"protobufjs": "7.2.4"
},
"engines": {
"node": ">=10",
Expand Down
4 changes: 2 additions & 2 deletions packages/cactus-core-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"axios": "0.21.4"
},
"devDependencies": {
"@grpc/grpc-js": "1.8.8",
"@grpc/proto-loader": "0.6.4",
"@grpc/grpc-js": "1.9.0",
"@grpc/proto-loader": "0.7.8",
"@types/express": "4.17.13",
"@types/google-protobuf": "3.15.5",
"grpc-tools": "1.11.2",
Expand Down
6 changes: 3 additions & 3 deletions weaver/common/policy-dsl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"author": "",
"license": "ISC",
"devDependencies": {
"ava": "^4.3.3",
"jest": "^26.6.3"
"ava": "4.3.3",
"jest": "26.6.3"
},
"dependencies": {
"antlr4": "^4.9.0"
"antlr4": "4.13.0"
}
}
12 changes: 6 additions & 6 deletions weaver/common/protos-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
"js"
],
"dependencies": {
"@grpc/grpc-js": "^1.1.3",
"@grpc/proto-loader": "^0.5.5",
"google-protobuf": "^3.21.2",
"grpc": "^1.24.3",
"grpc-tools": "^1.9.1"
"@grpc/grpc-js": "1.9.0",
"@grpc/proto-loader": "0.7.8",
"google-protobuf": "3.21.2",
"grpc": "1.24.11",
"grpc-tools": "1.12.4"
},
"devDependencies": {
"grpc_tools_node_protoc_ts": "^5.0.1"
"grpc_tools_node_protoc_ts": "5.3.3"
},
"author": "Sandeep Nishad",
"license": "Apache-2.0",
Expand Down
32 changes: 16 additions & 16 deletions weaver/core/drivers/fabric-driver/package-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@fidm/x509": "1.2.1",
"@grpc/grpc-js": "1.9.0",
"@hyperledger/cacti-weaver-protos-js": "file:./protos-js",
"@hyperledger/cacti-weaver-sdk-fabric": "file:./cacti-weaver-sdk-fabric",
"@fidm/x509": "^1.2.1",
"@grpc/grpc-js": "^1.1.1",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"dotenv": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"fabric-ca-client": "^2.2.8",
"fabric-network": "^2.2.8",
"level": "^8.0.0",
"winston": "^3.3.3"
"@typescript-eslint/eslint-plugin": "5.54.1",
"@typescript-eslint/parser": "5.54.1",
"dotenv": "8.6.0",
"eslint-config-prettier": "8.9.0",
"eslint-plugin-prettier": "3.4.1",
"fabric-ca-client": "2.2.18",
"fabric-network": "2.2.18",
"level": "8.0.0",
"winston": "3.10.0"
},
"devDependencies": {
"patch-package": "^6.2.2",
"@types/node": "^14.0.14",
"typedoc": "^0.23.15",
"typescript": "4.9.5",
"nodemon": "^2.0.4"
"@types/node": "16.11.7",
"nodemon": "2.0.22",
"patch-package": "6.5.1",
"typedoc": "0.24.8",
"typescript": "4.9.5"
}
}
30 changes: 15 additions & 15 deletions weaver/core/drivers/fabric-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@fidm/x509": "^1.2.1",
"@grpc/grpc-js": "^1.1.1",
"@fidm/x509": "1.2.1",
"@grpc/grpc-js": "1.9.0",
"@hyperledger/cacti-weaver-protos-js": "2.0.0-alpha.1",
"@hyperledger/cacti-weaver-sdk-fabric": "2.0.0-alpha.1",
"@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.1",
"dotenv": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"fabric-ca-client": "^2.2.8",
"fabric-network": "^2.2.8",
"level": "^8.0.0",
"winston": "^3.3.3"
"@typescript-eslint/eslint-plugin": "5.54.1",
"@typescript-eslint/parser": "5.54.1",
"dotenv": "8.6.0",
"eslint-config-prettier": "8.9.0",
"eslint-plugin-prettier": "3.4.1",
"fabric-ca-client": "2.2.18",
"fabric-network": "2.2.18",
"level": "8.0.0",
"winston": "3.10.0"
},
"devDependencies": {
"@types/node": "^14.0.14",
"nodemon": "^2.0.4",
"patch-package": "^6.2.2",
"typedoc": "^0.23.15",
"@types/node": "16.11.7",
"nodemon": "2.0.22",
"patch-package": "6.5.1",
"typedoc": "0.24.8",
"typescript": "4.9.5"
}
}
48 changes: 24 additions & 24 deletions weaver/core/identity-management/iin-agent/package-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@fidm/x509": "1.2.1",
"@grpc/grpc-js": "1.9.0",
"@hyperledger/cacti-weaver-protos-js": "file:./protos-js",
"@hyperledger/cacti-weaver-sdk-fabric": "file:./cacti-weaver-sdk-fabric",
"@fidm/x509": "^1.2.1",
"@grpc/grpc-js": "^1.1.1",
"@typescript-eslint/eslint-plugin": "^3.5.0",
"@typescript-eslint/parser": "^3.5.0",
"dotenv": "^8.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"fabric-ca-client": "^2.2.8",
"fabric-network": "^2.2.8",
"fabric-common": "^2.2.8"
"@typescript-eslint/eslint-plugin": "3.10.1",
"@typescript-eslint/parser": "3.10.1",
"dotenv": "8.6.0",
"eslint-config-prettier": "6.15.0",
"eslint-plugin-prettier": "3.4.1",
"fabric-ca-client": "2.2.18",
"fabric-common": "2.2.18",
"fabric-network": "2.2.18"
},
"devDependencies": {
"patch-package": "^6.2.2",
"@types/node": "^14.0.14",
"ts-node": "^10.9.0",
"typedoc": "^0.23.15",
"typescript": "4.9.5",
"nodemon": "^2.0.4",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"rewire": "^4.0.1",
"sinon": "^6.1.3",
"sinon-chai": "^3.3.0",
"proto3-json-serializer": "^1.1.0"
"@types/node": "16.11.7",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
"mocha": "5.2.0",
"nodemon": "2.0.22",
"nyc": "12.0.2",
"patch-package": "6.5.1",
"proto3-json-serializer": "1.1.1",
"rewire": "4.0.1",
"sinon": "6.3.5",
"sinon-chai": "3.7.0",
"ts-node": "10.9.1",
"typedoc": "0.24.8",
"typescript": "4.9.5"
}
}
46 changes: 23 additions & 23 deletions weaver/core/identity-management/iin-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@fidm/x509": "^1.2.1",
"@grpc/grpc-js": "^1.1.1",
"@fidm/x509": "1.2.1",
"@grpc/grpc-js": "1.9.0",
"@hyperledger/cacti-weaver-protos-js": "2.0.0-alpha.1",
"@hyperledger/cacti-weaver-sdk-fabric": "2.0.0-alpha.1",
"@typescript-eslint/eslint-plugin": "^3.5.0",
"@typescript-eslint/parser": "^3.5.0",
"dotenv": "^8.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"fabric-ca-client": "^2.2.8",
"fabric-common": "^2.2.8",
"fabric-network": "^2.2.8"
"@typescript-eslint/eslint-plugin": "3.10.1",
"@typescript-eslint/parser": "3.10.1",
"dotenv": "8.6.0",
"eslint-config-prettier": "6.15.0",
"eslint-plugin-prettier": "3.4.1",
"fabric-ca-client": "2.2.18",
"fabric-common": "2.2.18",
"fabric-network": "2.2.18"
},
"devDependencies": {
"@types/node": "^14.0.14",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"mocha": "^5.2.0",
"nodemon": "^2.0.4",
"nyc": "^12.0.2",
"patch-package": "^6.2.2",
"proto3-json-serializer": "^1.1.0",
"rewire": "^4.0.1",
"sinon": "^6.1.3",
"sinon-chai": "^3.3.0",
"ts-node": "^10.9.0",
"typedoc": "^0.23.15",
"@types/node": "16.11.7",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
"mocha": "5.2.0",
"nodemon": "2.0.22",
"nyc": "12.0.2",
"patch-package": "6.5.1",
"proto3-json-serializer": "1.1.1",
"rewire": "4.0.1",
"sinon": "6.3.5",
"sinon-chai": "3.7.0",
"ts-node": "10.9.1",
"typedoc": "0.24.8",
"typescript": "4.9.5"
}
}
22 changes: 11 additions & 11 deletions weaver/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"deploy-gh-pages": "gh-pages -d build"
},
"dependencies": {
"@docusaurus/core": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"gh-pages": "^2.2.0",
"elliptic": "^6.5.4",
"immer": "^9.0.21",
"react-dev-utils": "^11.0.4",
"is-svg": "^4.2.2"
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@mdx-js/react": "1.6.22",
"clsx": "1.2.1",
"elliptic": "6.5.4",
"gh-pages": "2.2.0",
"immer": "9.0.21",
"is-svg": "4.4.0",
"react": "16.14.0",
"react-dev-utils": "11.0.4",
"react-dom": "16.14.0"
},
"browserslist": {
"production": [
Expand Down
Loading

0 comments on commit 60db2b5

Please sign in to comment.