From fd1adef16da60f03eafa30b32363347c9cfc8407 Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Sat, 11 May 2024 11:21:31 +1000 Subject: [PATCH] chore: upgrade deps BREAKING CHANGE: drop support of Nodejs < v18 --- .github/workflows/ci.yml | 6 +++--- bin/browser-do.js | 6 +++--- package.json | 25 +++++++++++++------------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e5b642..28a79ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,13 @@ jobs: strategy: fail-fast: false matrix: - node_version: ['14', '16', '18'] + node_version: ['18', '20'] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node_version }} - run: npm i diff --git a/bin/browser-do.js b/bin/browser-do.js index 5f50a91..411dbda 100755 --- a/bin/browser-do.js +++ b/bin/browser-do.js @@ -1,12 +1,12 @@ #!/usr/bin/env node /* eslint-disable no-console */ -const opts = require('commander'); +const { program } = require('commander'); const fs = require('fs'); const path = require('path'); const browserDo = require('../index'); -opts +program .version(require('../package.json').version) .option('-b, --browser ', 'Browser to use, see available browsers below', 'electron') .option('-p, --port ', 'Starts listening on that port and waits for you to open a browser') @@ -44,7 +44,7 @@ function onCoverage(result) { '# then view coverage/lcov-report/index.html in a browser\n'); } -const options = opts.opts(); +const options = program.opts(); options.onCoverage = onCoverage; const run = browserDo(options); diff --git a/package.json b/package.json index 303487e..bd97b8d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Run JavaScript in a browser, forward browser console log to stdout, great for running unit tests in browser.", "main": "index.js", "engines": { - "node": ">=14.17.0" + "node": ">=18.0.0" }, "files": [ "index.js", @@ -43,25 +43,26 @@ "cat": "^0.2.0", "chai": "^4.3.7", "concat-stream": "^2.0.0", - "eslint": "^8.34.0", - "jasmine-core": "^4.5.0", - "mocha": "^10.2.0", - "socket.io-client": "^4.6.1", + "eslint": "^8.57.0", + "jasmine-core": "^5.1.2", + "mocha": "^10.4.0", + "parcel": "^2.12.0", + "socket.io-client": "^4.7.5", "source-map-support": "^0.5.21", - "standard-changelog": "^2.0.27", - "tape": "^5.6.3", + "standard-changelog": "^6.0.0", + "tape": "^5.7.5", "zora": "^5.2.0" }, "dependencies": { "ansi-colors": "^4.1.3", - "commander": "^10.0.0", - "electron": "^23.1.1", + "commander": "^12.0.0", + "electron": "^30.0.3", "finalhandler": "^1.2.0", "lodash.kebabcase": "^4.1.1", "serve-static": "^1.15.0", "server-destroy": "^1.0.1", - "socket.io": "^4.6.1", - "tmp": "^0.2.1", - "which": "^3.0.0" + "socket.io": "^4.7.5", + "tmp": "^0.2.3", + "which": "^4.0.0" } }