From 3580790dcfbeb4f83d409010fe7c07dcbed6174e Mon Sep 17 00:00:00 2001 From: Tommy Brunn Date: Wed, 24 May 2023 17:04:46 +0200 Subject: [PATCH 1/3] Update ramda to support node 18 Fixes #430 --- package.json | 2 +- src/response/validate.js | 4 ++-- yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index be87b38..f4dcbfc 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "dependencies": { "async": "^3.2.2", - "ramda": "^0.27.2", + "ramda": "^0.29.0", "snakecase-keys": "^2.0.0", "spected": "^0.7.2" }, diff --git a/src/response/validate.js b/src/response/validate.js index d189c3b..952d2dd 100644 --- a/src/response/validate.js +++ b/src/response/validate.js @@ -22,7 +22,7 @@ const notNil = R.compose( const isString = R.is(String); const isBoolean = R.is(Boolean); const isObject = R.is(Object); -const oneOf = collection => R.curry(R.contains)(R.__, R.keys(collection)); +const oneOf = collection => R.curry(R.includes)(R.__, R.keys(collection)); const createSuffix = healthy => `when healthcheck is ${healthy ? "healthy" : "unhealthy"}`; @@ -35,7 +35,7 @@ const unhealthyCheckMessage = msg => `${msg} ${SUFFIX_UNHEALTHY_MSG}`; const commonRules = input => ({ healthy: [[isBoolean, "Healthy should be a boolean"]], info: [[R.either(R.isNil, isObject), "Info should be an object"]], - dependentOn: R.contains(input.type, DEPENDENT_ON_REQUIRED_TYPES) + dependentOn: R.includes(input.type, DEPENDENT_ON_REQUIRED_TYPES) ? [ [isString, "DependentOn should be a string"], [ diff --git a/yarn.lock b/yarn.lock index 2fccec1..0913748 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3073,16 +3073,16 @@ qs@~6.5.1: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" -ramda@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.2.tgz#84463226f7f36dc33592f6f4ed6374c48306c3f1" - integrity sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA== - ramda@^0.28.0: version "0.28.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.28.0.tgz#acd785690100337e8b063cab3470019be427cc97" integrity sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA== +ramda@^0.29.0: + version "0.29.0" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.29.0.tgz#fbbb67a740a754c8a4cbb41e2a6e0eb8507f55fb" + integrity sha512-BBea6L67bYLtdbOqfp8f58fPMqEwx0doL+pAi8TZyp2YWz8R9G8z9x75CZI8W+ftqhFHCpEX2cRnUUXK130iKA== + range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" From 9316fb341488d1716a5490dd2cc70f505dbd42ba Mon Sep 17 00:00:00 2001 From: Tommy Brunn Date: Wed, 24 May 2023 17:06:27 +0200 Subject: [PATCH 2/3] Test on node 18 and 20 --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 034f39e..c153f16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [14.x, 16.x, 18.x, 20.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b2342e..d97f235 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 16 + node-version: 18 - run: yarn install --frozen-lockfile - run: yarn test @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 16 + node-version: 18 registry-url: https://registry.npmjs.org/ - run: npm publish env: From 98dabcfe6849d4ff910a1c66cf4e5834f24fd7a7 Mon Sep 17 00:00:00 2001 From: Tommy Brunn Date: Wed, 24 May 2023 17:13:00 +0200 Subject: [PATCH 3/3] v1.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4dcbfc..9a77215 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-physical", - "version": "1.0.2", + "version": "1.0.3", "description": "Healthcheck middleware for Express 🌡", "main": "index.js", "repository": "git@github.com:Nevon/express-physical.git",