Skip to content

Fix bin/semver runtime error #255

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

Closed
wants to merge 1 commit into from

Conversation

pjohnmeyer
Copy link
Contributor

Changes since v5.5.1 have introduced an error when running the
semver CLI:

ReferenceError: options is not defined

This commit fixes this problem, then adds a few sanity tests
that run the CLI to hopefully ensure this doesn't happen again.

Changes since v5.5.1 have introduced an error when running the
semver CLI:

`ReferenceError: options is not defined`

This commit fixes this problem, then adds a few sanity tests
that run the CLI to hopefully ensure this doesn't happen again.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.454% when pulling b177fe1 on pjohnmeyer:fix-cli-error into 829858a on npm:master.

@pjohnmeyer
Copy link
Contributor Author

I make this pull request because I was looking at working on #224 and possibly #146, but ran into this issue.

I think it might make sense to, in a future PR:

  • Move the actual logic of the CLI into a different requirable file, like semver-cli.js, so it can be tested without using execSync.
  • Change bin/semver to a wrapper that basically just does something like the below, but with additional error handling:
var argv = process.argv.slice(2);
var main = require('../semver-cli').entryPoint;
main(argv);

@isaacs isaacs closed this in 3a70a68 Oct 10, 2018
isaacs pushed a commit that referenced this pull request Oct 10, 2018
Changes since v5.5.1 have introduced an error when running the
semver CLI:

`ReferenceError: options is not defined`

This commit fixes this problem, then adds a few sanity tests
that run the CLI to hopefully ensure this doesn't happen again.

Close #255
stabbylambda pushed a commit to stabbylambda/node-semver that referenced this pull request Nov 18, 2019
Changes since v5.5.1 have introduced an error when running the
semver CLI:

`ReferenceError: options is not defined`

This commit fixes this problem, then adds a few sanity tests
that run the CLI to hopefully ensure this doesn't happen again.

Close npm#255
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.

2 participants