Skip to content

Commit

Permalink
refactor!: drops support for 10 (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
jly36963 authored Oct 23, 2021
1 parent 54c0d2c commit 3aaf878
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions lib/yargs-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -759,7 +759,7 @@ export class YargsParser {
argv[ali] = value
})
} catch (err) {
error = err
error = err as Error
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"!*.d.ts"
],
"engines": {
"node": ">=10"
"node": ">=12"
},
"standardx": {
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion test/tscc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 3aaf878

Please sign in to comment.