Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: drop node 10 #421

Merged
merged 4 commits into from Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
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
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this 👍 solid work.

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
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
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
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"
}
}