You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Last week there were 11 commits.
🛠️ [refactor: add utility to return origin with non-standard ports (#1616) For #1404 (code coverage)
We were doing this logic in several places and not always getting good
coverage. Adds a small utility DRY things up.](7eef487) by mastermatt
🛠️ [refactor: simplify some cases of common.formatQueryValue (#1598) * refactor(common): replace lodash.forOwn with Array.reduce
This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce.
Beginning with v10.9.0, the url parameter can be passed along with a
separate options object to http[s].request, http[s].get, or to the
constructor of ClientRequest.
The logic that does the juggling was mostly copied from Node's source.
Remove unnecessary overrider in intercept.
Register ClientRequest callback on response event.
Instead of passing it all around the overrider.
This mimics how the native implementation does it.](e3e6a65) by mastermatt
🛠️ [Add coverage ignores to recorder, and emit text report (#1608) Ref https://github.com//issues/1404#issuecomment-509347456
This leaves intact two missed coverage spots in lib/recorder.js which are being taken care of in #1588.
Before Node v8, OutgoingMessage, which is extended by ClientRequest,
would literally do what it says in the docs if data was provided. It
would call this.write(data, encoding). This meant that nock could wrap
only the write method when recording and gather all the chunks even if
the last chunk was sent to end. But, the above changed that to call an
internal function dual used by end and write.
The method now correctly accepts all the permutations allowed.
request.end(data, encoding, callback)
request.end(data, callback)
request.end(data, encoding)
request.end(data)
request.end(callback)
request.end()
And a few tests were added to ensure all cases are explicitly covered.](ad34222) by mastermatt
Here's the Weekly Digest for nock/nock:
ISSUES
Last week 13 issues were created.
Of these, 8 issues have been closed and 5 issues are still open.
OPEN ISSUES
💚 #1617 fix(recorder): allow recording req headers when not outputting objects, by mastermatt
💚 #1614 fix: allow unmocked when providing literal search params., by mastermatt
💚 #1613 refactor: Scope.pendingMocks, by mastermatt
💚 #1607 Help wanted to reach 100% coverage in lib/recorder.js, by paulmelnikow
💚 #1606 Document the mock surface, by paulmelnikow
CLOSED ISSUES
❤️ #1616 refactor: add utility to identify non-standard ports, by mastermatt
❤️ #1615 Update eslint-config-standard to the latest version 🚀, by greenkeeper[bot]
❤️ #1612 added noop method
unref
to Socket, by zenlor❤️ #1611 The automated release is failing 🚨, by nockbot
❤️ #1610 test: Some hostname cleanup, by paulmelnikow
❤️ #1609 test: Minor cleanup in test_abort, by paulmelnikow
❤️ #1608 Add coverage ignores to recorder, and emit text report, by paulmelnikow
❤️ #1605 Bump prettier from 1.17.0 to 1.18.2, by paulmelnikow
NOISY ISSUE
🔈 #1606 Document the mock surface, by paulmelnikow
It received 2 comments.
PULL REQUESTS
Last week, 16 pull requests were created, updated or merged.
UPDATED PULL REQUEST
Last week, 5 pull requests were updated.
💛 #1617 fix(recorder): allow recording req headers when not outputting objects, by mastermatt
💛 #1614 fix: allow unmocked when providing literal search params., by mastermatt
💛 #1613 refactor: Scope.pendingMocks, by mastermatt
💛 #1601 fix: response.complete must be true after res.end, by doochik
💛 #1484 Added compatibility with node-http-proxy header altering, by AlexGilleran
MERGED PULL REQUEST
Last week, 11 pull requests were merged.
💜 #1616 refactor: add utility to identify non-standard ports, by mastermatt
💜 #1615 Update eslint-config-standard to the latest version 🚀, by greenkeeper[bot]
💜 #1612 added noop method
unref
to Socket, by zenlor💜 #1610 test: Some hostname cleanup, by paulmelnikow
💜 #1609 test: Minor cleanup in test_abort, by paulmelnikow
💜 #1608 Add coverage ignores to recorder, and emit text report, by paulmelnikow
💜 #1605 Bump prettier from 1.17.0 to 1.18.2, by paulmelnikow
💜 #1603 test: Rewrite test_header_matching using got / async, by paulmelnikow
💜 #1598 refactor: simplify some cases of common.formatQueryValue , by laumair
💜 #1591 fix: request.end accepted arguments, by mastermatt
💜 #1588 feat: Support http.request signatures added in Node 10.9+, by mastermatt
COMMITS
Last week there were 11 commits.
🛠️ [refactor: add utility to return origin with non-standard ports (#1616) For #1404 (code coverage)
We were doing this logic in several places and not always getting good
coverage. Adds a small utility DRY things up.](7eef487) by mastermatt
🛠️ [refactor: simplify some cases of common.formatQueryValue (#1598) * refactor(common): replace lodash.forOwn with Array.reduce
This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce.
Related #1285
This commit simplifies array formatting by using Array.map instead of a plain for loop.
This commit adds unit test coverage for #formatQueryValue.
Related #1404
chore: run prettier to fix lint errors
fix: use Object.entries() in favor of Object.keys()
This commit replaces the usage of Object.keys() with Object.entries() to address this comment.
This commit addresses the following comments:
1- #1598 (comment)
2- #1598 (comment)
chore: run prettier to fix lint errors
refactor(common): replace lodash.forOwn with Array.reduce
This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce.
Related #1285
This commit simplifies array formatting by using Array.map instead of a plain for loop.
This commit adds unit test coverage for #formatQueryValue.
Related #1404
chore: run prettier to fix lint errors
fix: use Object.entries() in favor of Object.keys()
This commit replaces the usage of Object.keys() with Object.entries() to address this comment.
This commit addresses the following comments:
1- #1598 (comment)
2- #1598 (comment)
chore: run prettier to fix lint errors
chore: remove unnecessary formatting changes](1e0acad) by laumair
🛠️ [Update eslint-config-standard to the latest version 🚀 (Update eslint-config-standard to the latest version 🚀 #1615) * chore(package): update eslint-config-standard to version 13.0.1
chore(package): update lockfile package-lock.json](b9431a7) by greenkeeper[bot]
🛠️ [feat: added noop method
unref
to Socket (added noop methodunref
to Socket #1612) it has been implemented in node.js 0.9.1 but it's seldomly used.ref: https://nodejs.org/api/net.html#net_socket_unref](https://github.com/nock/nock/commit/a75f49f1353c0b56769fea996f4fc99d28b359fa) by zenlor
🛠️ [feat: Support http.request signatures added in Node 10.9+ (#1588) * Allow three arg form of
request
andClientRequest
.Fixes #1227
Beginning with v10.9.0, the
url
parameter can be passed along with aseparate options object to
http[s].request
,http[s].get
, or to theconstructor of
ClientRequest
.https://nodejs.org/api/http.html#http_http_request_url_options_callback
The logic that does the juggling was mostly copied from Node's source.
Remove unnecessary overrider in intercept.
Register ClientRequest callback on response event.
Instead of passing it all around the overrider.
This mimics how the native implementation does it.](e3e6a65) by mastermatt
🛠️ [Add coverage ignores to recorder, and emit text report (#1608) Ref https://github.com//issues/1404#issuecomment-509347456
This leaves intact two missed coverage spots in
lib/recorder.js
which are being taken care of in #1588.Also ref #1607](2bca61b) by paulmelnikow
🛠️ test: Some hostname cleanup (#1610) Ref #1351 by paulmelnikow
🛠️ test: Minor cleanup in test_abort (#1609) by paulmelnikow
🛠️ test: Rewrite test_header_matching using got / async (#1603) by paulmelnikow
🛠️ Bump prettier from 1.17.0 to 1.18.2 (#1605) by paulmelnikow
🛠️ [fix: request.end accepted arguments (#1591) * Fix typo about wrapping request.end.
I'm making this change it's own commit so I have a place to comment the
findings.
Digging through Node git history, I found the change that created the
breaking change in nock (ref nock PR 929).
nodejs/node@a10bdb5#diff-286202fdbdd74ede6f5f5334b6176b5cL779
Before Node v8,
OutgoingMessage
, which is extended byClientRequest
,would literally do what it says in the docs if data was provided. It
would call
this.write(data, encoding)
. This meant that nock could wraponly the
write
method when recording and gather all the chunks even ifthe last chunk was sent to
end
. But, the above changed that to call aninternal function dual used by
end
andwrite
.Fixes #1549
The method now correctly accepts all the permutations allowed.
request.end(data, encoding, callback)
request.end(data, callback)
request.end(data, encoding)
request.end(data)
request.end(callback)
request.end()
And a few tests were added to ensure all cases are explicitly covered.](ad34222) by mastermatt
CONTRIBUTORS
Last week there were 5 contributors.
👤 mastermatt
👤 laumair
👤 greenkeeper[bot]
👤 zenlor
👤 paulmelnikow
STARGAZERS
Last week there were 36 stagazers.
⭐ MisterEmpyrean
⭐ licg9999
⭐ ryotaro
⭐ darthchudi
⭐ BitForger
⭐ wainola
⭐ brunohenriquepj
⭐ huqiyang
⭐ exeqt
⭐ calinbuzatu
⭐ wupinlang
⭐ vladdancer
⭐ iveczek
⭐ blackcat1383
⭐ doronrk
⭐ fernandofranca
⭐ jinjingbo
⭐ MagicMike90
⭐ throrin19
⭐ guerrap
⭐ ersah123
⭐ lauriliivamagi
⭐ a9
⭐ rafaelfesi
⭐ kkak10
⭐ dbeff
⭐ paulshibanov
⭐ callerc1
⭐ achaussier
⭐ romfrolov
⭐ andreykko
⭐ samiriff
⭐ juhuami233
⭐ dangdennis
⭐ slopezbelsue
⭐ ianbytchek
You all are the stars! 🌟
RELEASES
Last week there were 3 releases.
🚀 v11.0.0-beta.23@beta v11.0.0-beta.23@beta
🚀 v11.0.0-beta.22@beta v11.0.0-beta.22@beta
🚀 v11.0.0-beta.21@beta v11.0.0-beta.21@beta
That's all for last week, please 👀 Watch and ⭐ Star the repository nock/nock to receive next weekly updates. 😃
You can also view all Weekly Digests by clicking here.
The text was updated successfully, but these errors were encountered: