diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9af2578d..5bcd95ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [10, 12, 14] + node: [12, 14, 16] steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 @@ -86,6 +86,6 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - run: cd test/tscc && npm install && npx @tscc/tscc - run: cd test/tscc && node out.js diff --git a/lib/index.ts b/lib/index.ts index c0bfac81..4758670e 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -18,7 +18,7 @@ import { YargsParser } from './yargs-parser.js' // version support policy. The YARGS_MIN_NODE_VERSION is used for testing only. const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 10 + : 12 if (process && process.version) { const major = Number(process.version.match(/v([^.]+)/)![1]) if (major < minNodeVersion) { diff --git a/lib/yargs-parser.ts b/lib/yargs-parser.ts index 1499fc60..ca7daac4 100644 --- a/lib/yargs-parser.ts +++ b/lib/yargs-parser.ts @@ -681,7 +681,7 @@ export class YargsParser { } setConfigObject(config) - } catch (ex) { + } catch (ex: any) { // Deno will receive a PermissionDenied error if an attempt is // made to load config without the --allow-read flag: if (ex.name === 'PermissionDenied') error = ex @@ -759,7 +759,7 @@ export class YargsParser { argv[ali] = value }) } catch (err) { - error = err + error = err as Error } } } diff --git a/package.json b/package.json index 6f58f501..4d1a6314 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "!*.d.ts" ], "engines": { - "node": ">=10" + "node": ">=12" }, "standardx": { "ignore": [ diff --git a/test/tscc/package.json b/test/tscc/package.json index 2ac7a8ca..3deb3bfc 100644 --- a/test/tscc/package.json +++ b/test/tscc/package.json @@ -2,7 +2,7 @@ "name": "optimized-test", "version": "0.0.0", "dependencies": { - "@tscc/tscc": "^0.6.4", + "@tscc/tscc": "^0.7.4", "@types/node": "^10.0.3" } }