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.
Fixes: mcollina/autocannon#520
Arg parsing fails if URL ends with ]:
The previous implementation was picking up inline(attached to the string supplied) brackets. This PR changes the regex that was used to end a context.
This change means that if an opening bracket is found inside the string(except the very first character), the regex returns false and therefore does not close the context.
The PR also updates the minimist dependency to
1.2.8
since there were critical vulnerabilities(namely, prototype pollution on versions<=1.2.5
). I've tested autocannon to make sure the version doesnt include breaking changes, but took the liberty to bump to a major version. Feel free to change it(or comment it out so I change it) should you consider the changes not major-bump-worthyI also took the liberty to add a
.gitignore
which includes only thenode_modules
directory.Tests
The following tests are all returning the correct object. There's a mix between using the closing and opening brackets(used for changing contexts) directly adjacent to the string/word and having a space inbetween.
The following tests are not working as expected. I've documented them(added the test cases, but the tests are skipped), but I think those are super edge-cases. If you think otherwise, let me know and I'll try to find a way to fix it
-u http://localhost
at the end)