-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: Add strict mode to parser #74
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
697493f
feat: Restructure options API
aaronccasanova 9e42db0
chore: Remove debug comments
aaronccasanova 36ef68c
chore: Remove debug comments
aaronccasanova 67c0b03
chore: Alias args to argv to introduce less changes
aaronccasanova 082bec5
feat: Replace option with
0909008
docs: Update README to reflect updated implementation
042480b
chore: Revert args options to argv
10df671
feat: Add strict mode to parser
aaronccasanova e44c46c
docs: Update README from PR feedback
aaronccasanova 4063751
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova a50e940
chore: Reduce changes
aaronccasanova 062bdc9
chore: Tidy up naming conventions
aaronccasanova 28ae7b8
Merge branch 'main' into feat/restructure-options-api
bcoe e6fea72
Merge branch 'feat/restructure-options-api' of https://github.com/aar…
aaronccasanova ef06099
fix: Guard against prototype member access
aaronccasanova c228484
Merge branch 'feat/restructure-options-api' of https://github.com/aar…
aaronccasanova dd4f718
feat: Add strict mode type validation
aaronccasanova 26df81c
chore: Remove custom unknown option error
aaronccasanova a04d11c
chore: Remove unknown option error from test
aaronccasanova ca05b43
fix: Update value validation to check against undefined
aaronccasanova a1c3544
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova fa0775b
fix: Update error conditionals to check for null or undefined values
aaronccasanova 5b89108
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova 1d412da
feat: Add custom error classes for unknown and invalid options
aaronccasanova a16fc7b
Adjust unknown option message to be agnostic of long or short options
aaronccasanova c4271a0
feat: Pass shortOption to storeOption util for better error messages
aaronccasanova b6107bb
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova 948ca9e
fix(WIP): Update checks to use the ERR_INVALID_ARG_VALUE class
aaronccasanova a2ea48d
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova 38575cd
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova 99355dd
fix: Revert back to custom error classes and improve error messages
aaronccasanova e66a8b3
WIP: Default parseArgs to strict:true and update failing tests to str…
aaronccasanova a4fc92a
Update README to reflect strict:true behavior
aaronccasanova 12fd0e6
fix: Improve robustness of the short option error message
aaronccasanova 870cffe
fix: Improve error message for type:string options missing an argument
aaronccasanova 694c75d
fix: Namespace unique parseArgs error classes
aaronccasanova 9b76d55
docs: Update README examples
aaronccasanova fcb8c8d
Merge branch 'main' of https://github.com/aaronccasanova/parseargs in…
aaronccasanova e56246c
docs: Update remaing examples for consistency
aaronccasanova b4e0daf
Update index.js
aaronccasanova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might simplify this to
options[longOption] ?? {}
.