bug(recorder): replace qs lib with native querystring#1653
Merged
mastermatt merged 1 commit intonock:betafrom Aug 6, 2019
Merged
bug(recorder): replace qs lib with native querystring#1653mastermatt merged 1 commit intonock:betafrom
mastermatt merged 1 commit intonock:betafrom
Conversation
Member
|
Wouldn't this break recordings created in the old version? |
Member
Author
|
I don't think so, but I'll add a test using a recording from v10. |
Member
Author
|
This change doesn't affect the way recordings are processed, just recorded when example: got('https://example.com/todos/1?foo[bar]=123&baz[0]=a&baz[1]=b')
// output before change
nock('https://example.com:443', {"encodedQueryParams":true})
.get('/todos/1')
.query({"foo":{"bar":"123"},"baz":["a","b"]})
...
// output after change
nock('https://example.com:443', {"encodedQueryParams":true})
.get('/todos/1')
.query({"foo%5Bbar%5D":"123","baz%5B0%5D":"a","baz%5B1%5D":"b"})
...And we already have tests in |
Member
|
Thanks for looking into that! |
paulmelnikow
approved these changes
Aug 6, 2019
Collaborator
|
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
gr2m
pushed a commit
that referenced
this pull request
Sep 4, 2019
gr2m
pushed a commit
that referenced
this pull request
Sep 4, 2019
gr2m
pushed a commit
that referenced
this pull request
Sep 5, 2019
juninmd
pushed a commit
to juninmd/nock
that referenced
this pull request
Mar 21, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
qsdependency was removed, however, recorder.js retained usage of it.Replacing it with
querystringfrom the std lib is sufficient.Introduced: #1632
Fixes: #1651
Note that the output of
generateRequestAndResponsewill change for requests with search params, however, the net effect when that output is used will be the same.