Skip to content

Commit

Permalink
#1175: Upgrade to Node 12.16.0 LTS (#244)
Browse files Browse the repository at this point in the history
* Update CircleCI and docker scripts to use Node 12.16.0 LTS
* Update dependencies and lock versions for hapi-related libraries. Resolve audit issue
* Bump version
* Fix integeration test
* Fix unit test
* Restore test npm script
* Restore integration dockerfile
  • Loading branch information
oderayi authored Feb 20, 2020
1 parent 7fda855 commit de62154
Show file tree
Hide file tree
Showing 10 changed files with 4,496 additions and 3,356 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ executors:
default-docker:
working_directory: /home/circleci/project
docker:
- image: node:10.15.3-alpine
- image: node:12.16.0-alpine

default-machine:
machine:
Expand Down
8 changes: 7 additions & 1 deletion .ncurc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"reject": []
"reject": [
"@hapi/hapi",
"@hapi/inert",
"@hapi/vision",
"@hapi/joi",
"hapi-swagger"
]
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.15.3-alpine as builder
FROM node:12.16.0-alpine as builder

WORKDIR /opt/central-settlement

Expand All @@ -14,7 +14,7 @@ COPY config /opt/central-settlement/config
COPY src /opt/central-settlement/src
COPY README.md /opt/central-settlement

FROM node:10.15.3-alpine
FROM node:12.16.0-alpine
WORKDIR /opt/central-settlement

COPY --from=builder /opt/central-settlement .
Expand Down
5 changes: 5 additions & 0 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"1300|nyc>istanbul-reports>handlebars": {
"decision": "postpone",
"madeAt": 1573224238328
},
"1482|@hapi/hapi": {
"decision": "ignore",
"madeAt": 1582123771440,
"expiresAt": 1582728550777
}
},
"rules": {},
Expand Down
5 changes: 5 additions & 0 deletions docker/central-ledger/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
]
},
"INTERNAL_TRANSFER_VALIDITY_SECONDS": "432000",
"CACHE": {
"CACHE_ENABLED": false,
"MAX_BYTE_SIZE": 10000000,
"EXPIRES_IN_MS": 1000
},
"KAFKA": {
"TOPIC_TEMPLATES": {
"PARTICIPANT_TOPIC_TEMPLATE": {
Expand Down
7,766 changes: 4,444 additions & 3,322 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 22 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "central-settlement",
"description": "Central settlements hosted by a scheme to record and make settlements",
"version": "8.8.0",
"version": "9.2.1",
"license": "Apache-2.0",
"private": false,
"author": "ModusBox",
Expand All @@ -21,51 +21,49 @@
"registry": "https://registry.npmjs.org"
},
"dependencies": {
"@hapi/basic": "5.1.1",
"@hapi/boom": "8.0.1",
"@hapi/catbox-memory": "4.1.1",
"@hapi/good": "8.2.4",
"@hapi/basic": "6.0.0",
"@hapi/boom": "9.0.0",
"@hapi/catbox-memory": "5.0.0",
"@hapi/good": "9.0.0",
"@hapi/hapi": "18.4.0",
"@hapi/inert": "5.2.2",
"@hapi/vision": "5.5.4",
"@mojaloop/central-services-auth": "5.2.1",
"@mojaloop/central-ledger": "8.2.4",
"@mojaloop/central-services-database": "8.2.1",
"@mojaloop/central-services-error-handling": "8.6.2",
"@mojaloop/central-services-health": "8.3.0",
"@mojaloop/central-services-logger": "8.6.0",
"@mojaloop/central-services-shared": "8.6.3",
"@mojaloop/central-services-stream": "8.4.0",
"@mojaloop/forensic-logging-client": "8.3.0",
"@mojaloop/central-ledger": "9.2.0",
"@mojaloop/central-services-database": "9.1.0",
"@mojaloop/central-services-error-handling": "9.1.0",
"@mojaloop/central-services-health": "9.2.0",
"@mojaloop/central-services-logger": "9.1.0",
"@mojaloop/central-services-shared": "9.1.4",
"@mojaloop/central-services-stream": "9.1.0",
"@mojaloop/ml-number": "8.2.0",
"@now-ims/hapi-now-auth": "2.0.0",
"@now-ims/hapi-now-auth": "2.0.1",
"blipp": "4.0.1",
"hapi-auth-bearer-token": "6.2.1",
"hapi-openapi": "1.2.6",
"hapi-pagination": "3.0.0",
"mustache": "3.1.0",
"hapi-swagger": "11.1.0",
"mustache": "4.0.0",
"parse-strings-in-object": "2.0.0",
"rc": "1.2.8",
"uuid4": "1.1.4"
},
"devDependencies": {
"@hapi/joi": "16.1.8",
"bluebird": "3.7.2",
"eslint": "6.7.2",
"eslint": "6.8.0",
"faucet": "0.0.1",
"node-fetch": "2.6.0",
"nodemon": "2.0.1",
"npm-audit-resolver": "2.1.0",
"npm-check-updates": "3.2.2",
"nyc": "14.1.1",
"nodemon": "2.0.2",
"npm-audit-resolver": "2.2.0",
"npm-check-updates": "4.0.1",
"nyc": "15.0.0",
"pre-commit": "1.2.2",
"proxyquire": "2.1.3",
"rewire": "4.0.1",
"sinon": "7.5.0",
"sinon": "9.0.0",
"standard": "14.3.1",
"swagmock": "1.0.0",
"tap-xunit": "2.4.1",
"tape": "4.11.0",
"tape": "4.13.0",
"tapes": "4.1.0"
},
"pre-commit": [
Expand Down
2 changes: 1 addition & 1 deletion test-integration.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.15.3-alpine
FROM node:12.16.0-alpine
USER root

WORKDIR /opt/central-settlement
Expand Down
13 changes: 9 additions & 4 deletions test/integration-config-centralledger.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
"DISABLED": false,
"RUN_DATA_MIGRATIONS": true
},
"ENABLE_TOKEN_AUTH": false,
"ENABLE_BASIC_AUTH": false,
"LEDGER_ACCOUNT_NAME": "LedgerName",
"LEDGER_ACCOUNT_PASSWORD": "LedgerPassword",
"AMOUNT": {
"PRECISION": 18,
"SCALE": 4
Expand All @@ -37,6 +33,10 @@
"CONNECT_TIMEOUT": 45000,
"RECONNECT_INTERVAL": 5000
},
"ENABLE_TOKEN_AUTH": false,
"ENABLE_BASIC_AUTH": false,
"LEDGER_ACCOUNT_NAME": "LedgerName",
"LEDGER_ACCOUNT_PASSWORD": "LedgerPassword",
"DB_CONNECTION": {
"POOL_MIN": 10,
"POOL_MAX": 30
Expand Down Expand Up @@ -91,6 +91,11 @@
"EMAIL_USER": "modusboxemailtest@gmail.com",
"EMAIL_PASSWORD": "April2o0%",
"EMAIL_SMTP": "smtp.gmail.com",
"CACHE": {
"CACHE_ENABLED": false,
"MAX_BYTE_SIZE": 10000000,
"EXPIRES_IN_MS": 1000
},
"KAFKA": {
"TOPIC_TEMPLATES": {
"PARTICIPANT_TOPIC_TEMPLATE": {
Expand Down
1 change: 0 additions & 1 deletion test/unit/handlers/lib/kafka/producer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ Test('Producer', producerTest => {
test.ok(e.message === `The following Producers could not be disconnected: [{"topic":"${topicNameFailure}","error":"No producer found for topic ${topicNameFailure}"}]`)
test.end()
}
getProducerStub.restore()
})

disconnectTest.test('throw error if failure to disconnect from kafka if topic does not exist', async test => {
Expand Down

0 comments on commit de62154

Please sign in to comment.