-
-
Notifications
You must be signed in to change notification settings - Fork 733
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
bug(recorder): replace qs lib with native querystring #1653
Conversation
Wouldn't this break recordings created in the old version? |
I don't think so, but I'll add a test using a recording from v10. |
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 |
Thanks for looking into that! |
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The
qs
dependency was removed, however, recorder.js retained usage of it.Replacing it with
querystring
from the std lib is sufficient.Introduced: #1632
Fixes: #1651
Note that the output of
generateRequestAndResponse
will change for requests with search params, however, the net effect when that output is used will be the same.