Skip to content

Conversation

bcoe
Copy link
Collaborator

@bcoe bcoe commented Apr 19, 2022

A couple small tweaks made while synchronizing with Node.js repository.

  • small tweak to wording for greedy args (thought it read clearer).
  • received warning from linter for capital Object in JSDoc.

* small tweak to wording for greedy args (thought it read clearer).
* received warning from linter for capital Object in JSDoc.
@@ -555,8 +555,7 @@ test('strict: when short option and suspect value then throws with whole expecte

assert.throws(() => {
parseArgs({ args, options });
// eslint-disable-next-line max-len
}, /Error: Option '-w' argument is ambiguous\.\nDid you forget to specify the option argument for '-w'\?\nOr to specify an option argument starting with a dash use '--with=-XYZ' or '-w-XYZ'\./
}, /To specify an option argument starting with a dash use '--with=-XYZ' or '-w-XYZ'\./
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor, and can safely be ignored. I deliberately had a couple of tests of the "whole" error message. But just take whole out of the test name and I'll be happy. 😄

Copy link
Collaborator Author

@bcoe bcoe Apr 20, 2022

Choose a reason for hiding this comment

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

The error message string varies a bit in Node.js (because of the class name differing).

If you don't mind my preference is the slightly shorter comparison.

@shadowspawn
Copy link
Collaborator

shadowspawn commented Apr 20, 2022

An aside: with a lot of recent suggestions on the node PR, would you like to make those changes upstream and later copy-down to parseArgs? Or make changes here and copy-up? (Whatever is easiest.)

@bcoe
Copy link
Collaborator Author

bcoe commented Apr 20, 2022

An aside: with a lot of recent suggestions on the node PR, would you like to make those changes upstream and later copy-down to parseArgs? Or make changes here and copy-up? (Whatever is easiest.)

I'll just make a new PR with the upstream changes.

@bcoe bcoe merged commit 6ca85cd into main Apr 20, 2022
@bcoe bcoe deleted the tweaks-from-merge branch April 20, 2022 02:07
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.

3 participants