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 c7f959b
Show file tree
Hide file tree
Showing 34 changed files with 6,565 additions and 1,994 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
11 changes: 11 additions & 0 deletions .github/workflows/test_weaver-asset-exchange-besu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,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

# PROTOS
- name: Build JS Protos
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test_weaver-asset-exchange-fabric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ jobs:
unzip protoc-3.15.6-linux-x86_64.zip -d protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- 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

# PROTOS
- name: Build JS Protos
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/test_weaver-asset-transfer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,17 @@ jobs:
make build
working-directory: weaver/common/protos-go

- 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

# PROTOS
- name: Build JS Protos
run: |
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test_weaver-data-sharing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,17 @@ jobs:
make build
working-directory: weaver/common/protos-go

- 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

# PROTOS
- name: Build JS Protos
run: |
Expand Down Expand Up @@ -838,6 +849,17 @@ jobs:
make build
working-directory: weaver/common/protos-go

- 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

# PROTOS
- name: Build JS Protos
run: |
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
24 changes: 24 additions & 0 deletions .github/workflows/test_weaver-node-pkgs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ 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
run: |
export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin"
Expand Down Expand Up @@ -68,6 +80,18 @@ 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
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
2 changes: 1 addition & 1 deletion weaver/core/drivers/fabric-driver/fabricDriver.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WORKDIR /driver/fabric

ADD .npmrc .
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 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 @@ -14,7 +14,7 @@ WORKDIR /opt/iinagent

ADD .npmrc .
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
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
Loading

0 comments on commit c7f959b

Please sign in to comment.