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

build!: drops Node 6. begin following Node.js LTS schedule #278

Merged
merged 4 commits into from Jun 6, 2020

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Jun 4, 2020

This skips the EOL Node 8, and moves us to Node 10 as the supported Node.js version for yargs-parser.

Note: we should complete the TypeScript conversion before we release this major version of the library.

TODO:

  • I'd like to add a snippet of code that throws if you're on an older Node.js version.

Refs #272

@bcoe bcoe requested a review from mleguen June 4, 2020 16:06
@bcoe
Copy link
Member Author

bcoe commented Jun 4, 2020

CC: @QmarkC

@QmarkC
Copy link
Contributor

QmarkC commented Jun 4, 2020

TODO:

  • I'd like to add a snippet of code that throws if you're on an older Node.js version.

Run time or build time e.g. in pretest?
Basic check such as parsing process.version or add a dep like check-node-version?

@bcoe
Copy link
Member Author

bcoe commented Jun 5, 2020

@QmarkC I think it's worth adding something along the lines of:

const minNodeVersion = 10;
if (process && process.version) {
  const major = Number(process.version.match(/v([^.]+)/)[1]);
  if (major < minNodeVersion) {
    throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}`)
  }
}

@bcoe bcoe changed the title build!: drops Node 6. moves to Node 10 as supported version build!: drops Node 6 moves to Node 10 as supported version Jun 6, 2020
@bcoe bcoe changed the title build!: drops Node 6 moves to Node 10 as supported version build!: drops Node 6, begin following Node.js LTS schedule Jun 6, 2020
@bcoe bcoe changed the title build!: drops Node 6, begin following Node.js LTS schedule build!: drops Node 6. begin following Node.js LTS schedule Jun 6, 2020
@bcoe bcoe merged commit 9014ed7 into master Jun 6, 2020
@bcoe bcoe deleted the drop-node-8-6 branch June 6, 2020 17:11
@release-please release-please bot mentioned this pull request Jun 6, 2020
QmarkC pushed a commit to QmarkC/yargs-parser that referenced this pull request Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants