diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b305473..9d035b64f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ -## 2.5.3 -Tue Mar 7 09:36:52 GMT 2023 +## v2.5.4 +Wed 14 Jun 2023 12:29:35 BST + +* [690c91a9](https://github.com/hyperledger/fabric-chaincode-node/commit/690c91a9) Using the CLI provided gRPC configurations when starting the chaincode (#401) +* [cf179e7b](https://github.com/hyperledger/fabric-chaincode-node/commit/cf179e7b) Update SetEvent documentation (#399) +* [6f66124b](https://github.com/hyperledger/fabric-chaincode-node/commit/6f66124b) Update COMPATIBILITY.md for Node 18. (#396) +## v2.5.3 +Tue Mar 7 09:36:52 GMT 2023 +* [7d865afd](https://github.com/hyperledger/fabric-chaincode-node/commit/7d865afd) Update to new version Update to the .github workflows to handle the branch rename. +* [220ac53b](https://github.com/hyperledger/fabric-chaincode-node/commit/220ac53b) Clean-up npm engine specs (#394) +* [5d72d902](https://github.com/hyperledger/fabric-chaincode-node/commit/5d72d902) Nominate Mark Lewis as maintainer, Remove James Taylor (#391) +* [385efa8b](https://github.com/hyperledger/fabric-chaincode-node/commit/385efa8b) Add scheduled builds (#392) +* [e9c9eb79](https://github.com/hyperledger/fabric-chaincode-node/commit/e9c9eb79) Update to Node18 ## v2.5.2 Wed Jan 25 14:21:32 GMT 2023 diff --git a/apis/fabric-contract-api/package.json b/apis/fabric-contract-api/package.json index 4526ed4b8..1b069a95c 100644 --- a/apis/fabric-contract-api/package.json +++ b/apis/fabric-contract-api/package.json @@ -1,7 +1,7 @@ { "name": "fabric-contract-api", - "version": "2.5.3", - "tag": "unstable", + "version": "2.5.4", + "tag": "latest", "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", "main": "index.js", "repository": { @@ -45,7 +45,7 @@ "lines": 100 }, "dependencies": { - "fabric-shim-api": "2.5.3", + "fabric-shim-api": "2.5.4", "class-transformer": "^0.4.0", "fast-safe-stringify": "^2.1.1", "get-params": "^0.1.2", diff --git a/apis/fabric-shim-api/package.json b/apis/fabric-shim-api/package.json index 05480d8e8..a3040c578 100644 --- a/apis/fabric-shim-api/package.json +++ b/apis/fabric-shim-api/package.json @@ -1,7 +1,7 @@ { "name": "fabric-shim-api", - "version": "2.5.3", - "tag": "unstable", + "version": "2.5.4", + "tag": "latest", "description": "A node.js API of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", "main": "index.js", "repository": { diff --git a/docker/fabric-nodeenv/package.json b/docker/fabric-nodeenv/package.json index 034531722..caed941e5 100644 --- a/docker/fabric-nodeenv/package.json +++ b/docker/fabric-nodeenv/package.json @@ -1,6 +1,6 @@ { "name": "fabric-nodeenv", - "version": "2.5.3", + "version": "2.5.4", "description": "", "main": "docker.js", "scripts": { @@ -11,6 +11,6 @@ "license": "Apache-2.0", "dependencies": { "git-rev-sync": "3.0.1", - "toolchain": "2.5.3" + "toolchain": "2.5.4" } } diff --git a/docs/package.json b/docs/package.json index 63055b5ec..1bf1f6753 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "fabric-shim-docs", - "version": "2.5.3", + "version": "2.5.4", "description": "", "private": true, "scripts": { @@ -8,7 +8,7 @@ "docs": "rimraf ./gen && jsdoc -c ./_jsdoc.json" }, "dependencies": { - "fabric-ledger": "2.5.3" + "fabric-ledger": "2.5.4" }, "devDependencies": { "ink-docstrap": "^1.3.2", diff --git a/libraries/fabric-ledger/package.json b/libraries/fabric-ledger/package.json index 4f22914e3..dbba7a97b 100644 --- a/libraries/fabric-ledger/package.json +++ b/libraries/fabric-ledger/package.json @@ -1,7 +1,7 @@ { "name": "fabric-ledger", - "version": "2.5.3", - "tag": "unstable", + "version": "2.5.4", + "tag": "latest", "description": "A node.js implementation of Hyperledger Fabric ledger api, to allow access to ledger data from smart contracts", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -48,7 +48,7 @@ "lines": 100 }, "dependencies": { - "fabric-contract-api": "2.5.3", + "fabric-contract-api": "2.5.4", "winston": "^3.7.2" }, "devDependencies": { diff --git a/libraries/fabric-shim/package.json b/libraries/fabric-shim/package.json index ec3da1340..e16993a38 100644 --- a/libraries/fabric-shim/package.json +++ b/libraries/fabric-shim/package.json @@ -1,7 +1,7 @@ { "name": "fabric-shim", - "version": "2.5.3", - "tag": "unstable", + "version": "2.5.4", + "tag": "latest", "description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", "main": "index.js", "bin": { @@ -59,8 +59,8 @@ "@hyperledger/fabric-protos": "0.1.0-dev.2300102001.1", "@types/node": "^16.11.1", "ajv": "^6.12.2", - "fabric-contract-api": "2.5.3", - "fabric-shim-api": "2.5.3", + "fabric-contract-api": "2.5.4", + "fabric-shim-api": "2.5.4", "fast-safe-stringify": "^2.1.1", "fs-extra": "^10.0.1", "long": "^5.2.3", diff --git a/test/chaincodes/annotations/package.json b/test/chaincodes/annotations/package.json index 5c3894bf3..c6872435c 100644 --- a/test/chaincodes/annotations/package.json +++ b/test/chaincodes/annotations/package.json @@ -13,13 +13,13 @@ "typings": "dist/index.d.ts", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "APACHE-2.0", "dependencies": { "@types/node": "^16.11.4", - "fabric-contract-api": "2.5.3", - "fabric-shim": "2.5.3", + "fabric-contract-api": "2.5.4", + "fabric-shim": "2.5.4", "ts-node": "^3.3.0", "tslint": "^5.6.0", "typescript": "^4.0.2" diff --git a/test/chaincodes/annotations/src/test_contract/expected-metadata.json b/test/chaincodes/annotations/src/test_contract/expected-metadata.json index 5c839b902..8d6c6ec50 100644 --- a/test/chaincodes/annotations/src/test_contract/expected-metadata.json +++ b/test/chaincodes/annotations/src/test_contract/expected-metadata.json @@ -107,7 +107,7 @@ } }, "info": { - "version": "2.5.3", + "version": "2.5.4", "title": "ts_chaincode" }, "components": { diff --git a/test/chaincodes/clientidentity/package.json b/test/chaincodes/clientidentity/package.json index 2d70a5b89..daf9186e6 100644 --- a/test/chaincodes/clientidentity/package.json +++ b/test/chaincodes/clientidentity/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/crosschaincode/package.json b/test/chaincodes/crosschaincode/package.json index 6d6075cf2..0c4add61b 100644 --- a/test/chaincodes/crosschaincode/package.json +++ b/test/chaincodes/crosschaincode/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/crosschaincode2/package.json b/test/chaincodes/crosschaincode2/package.json index bdb48d8c7..b3567b50e 100644 --- a/test/chaincodes/crosschaincode2/package.json +++ b/test/chaincodes/crosschaincode2/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/crud/package.json b/test/chaincodes/crud/package.json index 0943cf454..a6d64df65 100644 --- a/test/chaincodes/crud/package.json +++ b/test/chaincodes/crud/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/events/package.json b/test/chaincodes/events/package.json index b96b55096..d69f61f2d 100644 --- a/test/chaincodes/events/package.json +++ b/test/chaincodes/events/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/ledger/package.json b/test/chaincodes/ledger/package.json index 24a6463ac..153a49ac7 100644 --- a/test/chaincodes/ledger/package.json +++ b/test/chaincodes/ledger/package.json @@ -10,12 +10,12 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3", - "fabric-ledger": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4", + "fabric-ledger": "2.5.4" } } diff --git a/test/chaincodes/privateData/package.json b/test/chaincodes/privateData/package.json index b7ba51c65..67e3a194b 100644 --- a/test/chaincodes/privateData/package.json +++ b/test/chaincodes/privateData/package.json @@ -11,11 +11,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/query/package.json b/test/chaincodes/query/package.json index 04db2fd98..0026b142c 100644 --- a/test/chaincodes/query/package.json +++ b/test/chaincodes/query/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/chaincodes/scenario/package.json b/test/chaincodes/scenario/package.json index 4219dc2d1..01df0fd67 100644 --- a/test/chaincodes/scenario/package.json +++ b/test/chaincodes/scenario/package.json @@ -10,11 +10,11 @@ "main": "index.js", "engine-strict": true, "engineStrict": true, - "version": "2.5.3", + "version": "2.5.4", "author": "", "license": "Apache-2.0", "dependencies": { - "fabric-shim": "2.5.3", - "fabric-contract-api": "2.5.3" + "fabric-shim": "2.5.4", + "fabric-contract-api": "2.5.4" } } diff --git a/test/e2e/package.json b/test/e2e/package.json index 64ce761be..2aae143c8 100644 --- a/test/e2e/package.json +++ b/test/e2e/package.json @@ -1,6 +1,6 @@ { "name": "fabric-e2e-tests", - "version": "2.5.3", + "version": "2.5.4", "description": "", "main": "docker.js", "scripts": { @@ -13,7 +13,7 @@ "devDependencies": { "git-rev-sync": "3.0.1", "gulp": "^4.0.2", - "toolchain": "2.5.3", + "toolchain": "2.5.4", "delay": "5.0.0", "fs-extra": "^10.0.1", "ip": "^1.1.5", diff --git a/test/e2e/scenario.js b/test/e2e/scenario.js index cde10a677..d5dc95511 100644 --- a/test/e2e/scenario.js +++ b/test/e2e/scenario.js @@ -57,7 +57,7 @@ const queryFunctions = async () => { const metadata = JSON.parse(stdout); - const expectedMetadata = '{"$schema":"https://hyperledger.github.io/fabric-chaincode-node/main/api/contract-schema.json","contracts":{"UpdateValues":{"name":"UpdateValues","contractInstance":{"name":"UpdateValues","logBuffer":{"output":[]},"default":true},"transactions":[{"name":"setup","tags":["SUBMIT","submitTx"]},{"name":"setNewAssetValue","tags":["SUBMIT","submitTx"],"parameters":[{"name":"arg0","description":"Argument 0","schema":{"type":"string"}}]},{"name":"doubleAssetValue","tags":["SUBMIT","submitTx"]}],"info":{"title":"","version":""}},"RemoveValues":{"name":"RemoveValues","contractInstance":{"name":"RemoveValues"},"transactions":[{"name":"quarterAssetValue","tags":["SUBMIT","submitTx"]},{"name":"getAssetValue","tags":["SUBMIT","submitTx"]}],"info":{"title":"","version":""}},"org.hyperledger.fabric":{"name":"org.hyperledger.fabric","contractInstance":{"name":"org.hyperledger.fabric"},"transactions":[{"name":"GetMetadata"}],"info":{"title":"","version":""}}},"info":{"version":"2.5.3","title":"chaincode"},"components":{"schemas":{}}}'; + const expectedMetadata = '{"$schema":"https://hyperledger.github.io/fabric-chaincode-node/main/api/contract-schema.json","contracts":{"UpdateValues":{"name":"UpdateValues","contractInstance":{"name":"UpdateValues","logBuffer":{"output":[]},"default":true},"transactions":[{"name":"setup","tags":["SUBMIT","submitTx"]},{"name":"setNewAssetValue","tags":["SUBMIT","submitTx"],"parameters":[{"name":"arg0","description":"Argument 0","schema":{"type":"string"}}]},{"name":"doubleAssetValue","tags":["SUBMIT","submitTx"]}],"info":{"title":"","version":""}},"RemoveValues":{"name":"RemoveValues","contractInstance":{"name":"RemoveValues"},"transactions":[{"name":"quarterAssetValue","tags":["SUBMIT","submitTx"]},{"name":"getAssetValue","tags":["SUBMIT","submitTx"]}],"info":{"title":"","version":""}},"org.hyperledger.fabric":{"name":"org.hyperledger.fabric","contractInstance":{"name":"org.hyperledger.fabric"},"transactions":[{"name":"GetMetadata"}],"info":{"title":"","version":""}}},"info":{"version":"2.5.4","title":"chaincode"},"components":{"schemas":{}}}'; const schema = fs.readFileSync(path.join(__dirname, '../../apis/fabric-contract-api/schema/contract-schema.json')); diff --git a/test/fv/package.json b/test/fv/package.json index cc3155fc5..aa79bb6df 100644 --- a/test/fv/package.json +++ b/test/fv/package.json @@ -1,6 +1,6 @@ { "name": "fvtests", - "version": "2.5.3", + "version": "2.5.4", "description": "fv tests", "testFabricVersion": "main", "testFabricThirdParty": "0.4.15", @@ -25,9 +25,9 @@ "del": "^3.0.0", "delay": "5.0.0", "eslint": "^6.6.0", - "fabric-contract-api": "2.5.3", - "fabric-shim": "2.5.3", - "fabric-shim-api": "2.5.3", + "fabric-contract-api": "2.5.4", + "fabric-shim": "2.5.4", + "fabric-shim-api": "2.5.4", "fs-extra": "^10.0.1", "git-rev-sync": "3.0.1", "gulp": "^4.0.2", diff --git a/tools/scripts/updateversions.sh b/tools/scripts/updateversions.sh index a73996c1c..5c223e4f6 100755 --- a/tools/scripts/updateversions.sh +++ b/tools/scripts/updateversions.sh @@ -1,24 +1,23 @@ -#!/bin/bash -# Note uses bash4.4 or later features, and sponge from GNU moreutils +#!/usr/bin/env bash + set -eo pipefail -if [ -z $1 ]; then - echo "Need to have the first arg set to the new package.json version " +if [ -z "$1" ]; then + echo "Need to have the first arg set to the new package.json version" exit 1 fi -NEW_VERSION=$1 +NEW_VERSION="$1" echo "Setting new version to '${NEW_VERSION}'" -readarray -d '' PACKAGES < <(find . -name package.json -not -path '*/node_modules/*' -not -path '*/common/*') - -for PACKAGE in ${PACKAGES} -do - echo "Updating '${PACKAGE}'" - jq --arg VER "${NEW_VERSION}" '.version=$VER' "${PACKAGE}" | sponge "${PACKAGE}" -done +while read -r PACKAGE; do + echo "Updating '${PACKAGE}'" + ( cd "$(dirname "${PACKAGE}")" && npm --allow-same-version --no-git-tag-version version "${NEW_VERSION}" ) +done <<< "$(find . -type d \( -name node_modules -o -name common \) -prune -o -type f -name package.json -print)" +MAJOR_MINOR=$(cut -d. -f-2 <<< "${NEW_VERSION}") -echo "Please also check these files" +echo "Please also check these files containing ${MAJOR_MINOR}.n" # NB - the grep regexp syntax is a little different -find . -name "*.js" -not -path '*/node_modules/*' -not -path '*/common/*' | xargs grep "2\.4\.\?[0-9]" \ No newline at end of file +MAJOR_MINOR_REGEX="${MAJOR_MINOR/./\.}\.\?[0-9]" +find . -type d \( -name node_modules -o -name common \) -prune -o -type f -name '*.js' -exec grep "${MAJOR_MINOR_REGEX}" {} + diff --git a/tools/toolchain/package.json b/tools/toolchain/package.json index 2b55329aa..cc5ab5477 100644 --- a/tools/toolchain/package.json +++ b/tools/toolchain/package.json @@ -1,6 +1,6 @@ { "name": "toolchain", - "version": "2.5.3", + "version": "2.5.4", "description": "", "main": "index.js", "scripts": {