Skip to content

Commit

Permalink
Use Node 20 in runtime Docker image
Browse files Browse the repository at this point in the history
- Build, package and run unit tests with Node 18 to ensure compatibility.
- Remove use of fs-extra since the standard Node fs package provides all required functionality.

Signed-off-by: Mark S. Lewis <[email protected]>
  • Loading branch information
bestbeforetoday committed Dec 11, 2023
1 parent 76cc057 commit 7fc1bea
Show file tree
Hide file tree
Showing 44 changed files with 1,762 additions and 1,350 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

env:
CHAINCODE_CONTAINER_NODE_VER: 18
CHAINCODE_CONTAINER_NODE_VER: 20
DOCKER_REGISTRY: ${{ github.repository_owner == 'hyperledger' && 'docker.io' || 'ghcr.io' }}

jobs:
Expand Down
3 changes: 1 addition & 2 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ The dependencies of `fabric-contract-api` and `fabric-shim` will be required.
"name": "chaincode",
"description": "My first exciting chaincode implemented in node.js",
"engines": {
"node": "^12.16.1",
"npm": "^6.4.1"
"node": ">=18"
},
"scripts": {
"test": "mocha....."
Expand Down
9 changes: 5 additions & 4 deletions apis/fabric-contract-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Fabric Shim"
],
"engines": {
"node": "^18.0.0"
"node": ">=18"
},
"license": "Apache-2.0",
"types": "./types/index.d.ts",
Expand All @@ -45,14 +45,15 @@
"lines": 100
},
"dependencies": {
"class-transformer": "^0.5.1",
"fabric-shim-api": "2.5.4",
"class-transformer": "^0.4.0",
"fast-safe-stringify": "^2.1.1",
"get-params": "^0.1.2",
"reflect-metadata": "^0.1.13",
"winston": "^3.7.2"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.2",
"ajv": "^6.12.2",
"ajv-cli": "^3.2.1",
"ajv-formats": "2.1.1",
Expand All @@ -62,11 +63,11 @@
"eslint": "^6.6.0",
"gulp": "^4.0.2",
"gulp-debug": "~4.0.0",
"gulp-eslint": "~6.0.0",
"gulp-eslint": "^6.0.0",
"mocha": "9.1.3",
"nyc": "15.1.0",
"rewire": "6.0.0",
"sinon": "13.0.1",
"typescript": "4.4.4"
"typescript": "5.2.2"
}
}
13 changes: 5 additions & 8 deletions apis/fabric-contract-api/test/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
*/
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"target": "es2017",
"sourceMap": true,
"lib": [
"esnext"
]
"sourceMap": true
},
"exclude": [
"node_modules"
"node_modules"
]
}
}
34 changes: 0 additions & 34 deletions apis/fabric-contract-api/types/tsconfig.json

This file was deleted.

3 changes: 1 addition & 2 deletions apis/fabric-shim-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"Fabric Shim"
],
"engines": {
"node": "^18.0.0",
"eslint": "^6.6.0"
"node": ">=18"
},
"types": "./types/index.d.ts",
"license": "Apache-2.0",
Expand Down
37 changes: 0 additions & 37 deletions apis/fabric-shim-api/types/tsconfig.json

This file was deleted.

Loading

0 comments on commit 7fc1bea

Please sign in to comment.