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. Updated weaver fabric node SDK build to not do an npm install of its
own because the dependencies are already installed by yarn since we've
added the package to the monorepo build.
3. The weaver fabric driver's container build will now ignore the dependency
scripts during npm install because pkcs11's build scripts were failing
due to unknown reasons. We can likely fix this by upgrading the dependencies
versions but I didn't have time to figure out which one is exactly the
one that should be updated to make it so that pkcs11 is also updated.
Disabling the build of the native code is expected to not cause issues
because we already have its build disabled in the root package.json as well.
This makes it likely that it will be okay.
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.

Fixes hyperledger-cacti#2571

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Aug 10, 2023
1 parent ccdaa12 commit 6c38eb9
Show file tree
Hide file tree
Showing 27 changed files with 6,484 additions and 1,992 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
},
"ghcr.io/devcontainers-contrib/features/kind:1": {
"version": "v0.18.0"
},
"ghcr.io/devcontainers-contrib/features/protoc:1": {
"version": "v3.15.6"
}
}

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test_weaver-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ jobs:
run: |
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip
unzip protoc-3.15.6-linux-x86_64.zip -d protoc
- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v3.3.1
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: yarn install

- name: Build JS Protos (Local)
run: |
Expand Down Expand Up @@ -146,6 +157,17 @@ jobs:
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip
unzip protoc-3.15.6-linux-x86_64.zip -d protoc
- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v3.3.1
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: yarn install

- name: Build JS Protos (Local)
run: |
export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
"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.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"
},
"dependencies": {
"crypto-js": "^4.0.0",
"fabric-shim": "^2.2.1"
"crypto-js": "4.0.0",
"fabric-shim": "2.2.1"
}
}
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.4.0"
},
"engines": {
"npm": ">=6"
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.9.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.1.3",
"@grpc/proto-loader": "0.5.5",
"google-protobuf": "3.21.2",
"grpc": "1.24.3",
"grpc-tools": "1.9.1"
},
"devDependencies": {
"grpc_tools_node_protoc_ts": "^5.0.1"
"grpc_tools_node_protoc_ts": "5.0.1"
},
"author": "Sandeep Nishad",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /driver/fabric
ADD protos-js /driver/fabric/protos-js
ADD cacti-weaver-sdk-fabric /driver/fabric/cacti-weaver-sdk-fabric
ADD package.json .
RUN npm install --unsafe-perm
RUN npm install --unsafe-perm --ignore-scripts

ADD server /driver/fabric/server
ADD constants /driver/fabric/constants
Expand All @@ -22,7 +22,7 @@ RUN npm run build
FROM builder-${BUILD_TAG} AS builder

RUN rm -rf node_modules
RUN npm ci --only=production
RUN npm ci --only=production --ignore-scripts

FROM node:16-alpine AS prod

Expand Down
30 changes: 15 additions & 15 deletions weaver/core/drivers/fabric-driver/package-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
"dependencies": {
"@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"
"@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"
},
"devDependencies": {
"patch-package": "^6.2.2",
"@types/node": "^14.0.14",
"typedoc": "^0.23.15",
"patch-package": "6.2.2",
"@types/node": "16.11.7",
"typedoc": "0.24.8",
"typescript": "4.9.5",
"nodemon": "^2.0.4"
"nodemon": "2.0.4"
}
}
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.1.1",
"@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": "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"
},
"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.4",
"patch-package": "6.2.2",
"typedoc": "0.24.8",
"typescript": "4.9.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /opt/iinagent
ADD protos-js /opt/iinagent/protos-js
ADD cacti-weaver-sdk-fabric /opt/iinagent/cacti-weaver-sdk-fabric
ADD package.json .
RUN npm install --unsafe-perm
RUN npm install --unsafe-perm --ignore-scripts

ADD src /opt/iinagent/src
ADD tsconfig.json .
Expand Down
46 changes: 23 additions & 23 deletions weaver/core/identity-management/iin-agent/package-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@
"dependencies": {
"@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"
"@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"
},
"devDependencies": {
"patch-package": "^6.2.2",
"@types/node": "^14.0.14",
"ts-node": "^10.9.0",
"typedoc": "^0.23.15",
"patch-package": "6.2.2",
"@types/node": "14.0.14",
"ts-node": "10.9.0",
"typedoc": "0.24.8",
"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"
"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"
}
}
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.1.1",
"@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.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"
},
"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": "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.24.8",
"typescript": "4.9.5"
}
}
18 changes: 9 additions & 9 deletions weaver/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"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"
"@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"
},
"browserslist": {
"production": [
Expand Down
Loading

0 comments on commit 6c38eb9

Please sign in to comment.