From 763fe075d8a62aa8d9ee603bfad2f3107c3a9f02 Mon Sep 17 00:00:00 2001 From: ehmicky Date: Sat, 4 May 2024 19:52:24 +0100 Subject: [PATCH] Run CI on Node.js 22 and upgrade `devDependencies` (#69) --- .github/workflows/main.yml | 2 +- index.js | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 346585c..9c27cac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: node-version: - - 20 + - 22 - 18 steps: - uses: actions/checkout@v4 diff --git a/index.js b/index.js index fdb58e8..83b0e0c 100644 --- a/index.js +++ b/index.js @@ -43,7 +43,7 @@ export default function prettyMilliseconds(milliseconds, options) { return; } - valueString = valueString ?? String(value); + valueString ??= String(value); if (options.colonNotation) { const wholeDigits = valueString.includes('.') ? valueString.split('.')[0].length : valueString.length; const minLength = result.length > 0 ? 2 : 1; diff --git a/package.json b/package.json index 5fc73dc..9d2d32e 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "ava": "^6.0.1", - "tsd": "^0.30.4", - "xo": "^0.56.0" + "tsd": "^0.31.0", + "xo": "^0.58.0" } }