diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64f8769..1e87d46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Use Node.js 14.x + - name: Use Node.js 16.x uses: actions/setup-node@v2 with: - node-version: 14.x + node-version: 16.x - name: Setup cache uses: actions/cache@v2 @@ -40,11 +40,11 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [12.x, 14.x, 16.x] os: [ubuntu-latest] include: - os: ubuntu-latest - node-version: 14.x + node-version: 16.x env: COVERAGE: 1 diff --git a/package-lock.json b/package-lock.json index d56a255..0b1ec7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,10 +5,11 @@ "requires": true, "packages": { "": { + "name": "tplink-smarthome-api", "version": "3.3.0", "license": "MIT", "dependencies": { - "commander": "^7.2.0", + "commander": "^9.0.0", "lodash.castarray": "^4.4.0", "lodash.clone": "^4.5.0", "lodash.defaultto": "^4.14.0", @@ -1615,7 +1616,6 @@ "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -1706,11 +1706,11 @@ } }, "node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", "engines": { - "node": ">= 10" + "node": "^12.20.0 || >=14" } }, "node_modules/comment-json": { @@ -2495,6 +2495,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/cspell/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/cspell/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4192,7 +4201,6 @@ "minimist": "^1.2.5", "neo-async": "^2.6.0", "source-map": "^0.6.1", - "uglify-js": "^3.1.4", "wordwrap": "^1.0.0" }, "bin": { @@ -4877,7 +4885,6 @@ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.6", "universalify": "^2.0.0" }, "optionalDependencies": { @@ -9429,9 +9436,9 @@ "dev": true }, "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==" }, "comment-json": { "version": "4.1.0", @@ -9995,6 +10002,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", diff --git a/package.json b/package.json index 3dd05c1..e527922 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:only": "cross-env NODE_ENV=test && nyc mocha --color && npm run test:cli" }, "dependencies": { - "commander": "^7.2.0", + "commander": "^9.0.0", "lodash.castarray": "^4.4.0", "lodash.clone": "^4.5.0", "lodash.defaultto": "^4.14.0", @@ -107,7 +107,7 @@ "typescript": "^4.2.3" }, "engines": { - "node": ">=10" + "node": ">=12.20.0" }, "standard-version": { "scripts": { diff --git a/src/cli.ts b/src/cli.ts index 7bcbf19..a5d1bd2 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -2,7 +2,7 @@ /* eslint-disable no-console */ import castArray from 'lodash.castarray'; -import program from 'commander'; +import { program } from 'commander'; import type { LogLevelDesc } from 'loglevel'; import * as tplinkCrypto from 'tplink-smarthome-crypto'; import type { PickProperties } from 'ts-essentials';