-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update dependency nock to v13 #46
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/nock-13.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
August 27, 2020 12:57
e5e2ba2
to
86d8b18
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
November 27, 2020 09:54
86d8b18
to
5119663
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
January 24, 2021 11:48
5119663
to
c6dc506
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
February 1, 2021 23:00
c6dc506
to
064c2fa
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
April 26, 2021 16:37
064c2fa
to
9e510e5
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
June 6, 2021 20:24
9e510e5
to
874c1c7
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
October 19, 2021 00:33
874c1c7
to
ceb099d
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
March 7, 2022 16:31
ceb099d
to
9db8d01
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
June 18, 2022 16:52
9db8d01
to
dfaba5d
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
September 25, 2022 23:02
dfaba5d
to
66fdeb4
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
November 20, 2022 12:01
66fdeb4
to
ccddf56
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
March 18, 2023 12:08
ccddf56
to
d1bb7d8
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
May 28, 2023 11:21
d1bb7d8
to
484f552
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
July 13, 2023 22:48
484f552
to
1318201
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
August 16, 2023 22:23
1318201
to
472a699
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
October 11, 2023 00:20
472a699
to
14c8be0
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
October 19, 2023 20:56
14c8be0
to
ccfa405
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
2 times, most recently
from
November 3, 2023 07:48
7c48c59
to
36c5943
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
November 27, 2023 23:05
36c5943
to
0e74ee4
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
January 14, 2024 19:23
0e74ee4
to
3f57f57
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
January 28, 2024 19:37
3f57f57
to
1ecd789
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
February 17, 2024 19:31
1ecd789
to
849de13
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
February 27, 2024 00:11
849de13
to
948ef64
Compare
renovate
bot
force-pushed
the
renovate/nock-13.x
branch
from
August 20, 2024 08:19
948ef64
to
a7504fc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
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.
This PR contains the following updates:
9.0.2
->13.5.5
Release Notes
nock/nock (nock)
v13.5.5
Compare Source
v13.5.4
Compare Source
Bug Fixes
fs.createReadStream
lazily (#2357) (ba9fc42)v13.5.3
Compare Source
Bug Fixes
v13.5.2
Compare Source
Bug Fixes
activeMocks()
andpendingMocks()
(#2356) (7e957b3)v13.5.1
Compare Source
Bug Fixes
v13.5.0
Compare Source
Features
Scope#clone()
method (#2564) (65385f7)v13.4.0
Compare Source
Features
context.query()
to nock back (#2553) (617511f)v13.3.8
Compare Source
Bug Fixes
filteringBodyRequest
(#2552) (0b18d07)v13.3.7
Compare Source
Reverts
v13.3.6
Compare Source
Bug Fixes
semver
usage (#2531) (f7216e9)v13.3.5
Compare Source
Bug Fixes
v13.3.4
Compare Source
Bug Fixes
nock(new URL('https://example.test/'))
(#2526) (6987327)v13.3.3
Compare Source
Bug Fixes
v13.3.2
Compare Source
Bug Fixes
nock.removeInterceptor
can remove the wrong Intercept (#2497) (92de0de)v13.3.1
Compare Source
Bug Fixes
v13.3.0
Compare Source
Features
v13.2.9
Compare Source
Bug Fixes
v13.2.8
Compare Source
Bug Fixes
Definition#scope
andDefinition#path
(#2374) (2edf341)v13.2.7
Compare Source
Bug Fixes
InterceptedRequestRouter.handleWrite
arity issue (#2371) (7f21d0c)v13.2.6
Compare Source
Reverts
v13.2.5
Compare Source
Bug Fixes
v13.2.4
Compare Source
Bug Fixes
v13.2.3
Compare Source
Bug Fixes
v13.2.2
Compare Source
Bug Fixes
allowUnocked
not working with regex host + request body match (#2277) (ac7b4fd)v13.2.1
Compare Source
Bug Fixes
update
type for record mode (#2250) (e8f23b1), closes #2241v13.2.0
Compare Source
Features
update
mode (#2241) (1cb4880)v13.1.4
Compare Source
Bug Fixes
v13.1.3
Compare Source
Bug Fixes
v13.1.2
Compare Source
Bug Fixes
v13.1.1
Compare Source
Bug Fixes
v13.1.0
Compare Source
Features
v13.0.11
Compare Source
Bug Fixes
v13.0.10
Compare Source
Bug Fixes
v13.0.9
Compare Source
Bug Fixes
destroyed
attribute (#2152) (b9758c8)v13.0.8
Compare Source
Bug Fixes
v13.0.7
Compare Source
Bug Fixes
v13.0.6
Compare Source
Bug Fixes
v13.0.5
Compare Source
Bug Fixes
req.end
multiple times (20e9f8a), closes /github.com/nodejs/node/blob/39a7f7663e8f70fc774105d8fa41b8e4cc69149f/lib/_http_outgoing.js#L816v13.0.4
Compare Source
Bug Fixes
v13.0.3
Compare Source
Bug Fixes
v13.0.2
Compare Source
Bug Fixes
v13.0.1
Compare Source
Bug Fixes
v13.0.0
Compare Source
See the Migration Guide
Breaking changes
Scope.log
has been removed. Use thedebug
library when debugging failed matches.socketDelay
has been removed. UsedelayConnection
instead.delay
,delayConnection
, anddelayBody
are now setters instead of additive.When recording, skipping body matching using
*
is no longer supported bynock.define
.Set the definition body to
undefined
instead.ClientRequest.abort()
has been updated to align with Node's native behavior.This could be considered a feature, however, it created some subtle differences that are not backwards compatible. Refer to the migration guide for details.
Playback of a mocked responses will now never happen until the 'socket' event is emitted.
v12.0.3
Compare Source
Bug Fixes
v12.0.2
Compare Source
Bug Fixes
v12.0.1
Compare Source
Bug Fixes
v12.0.0
Compare Source
BREAKING CHANGES
nock
global fromcleanAll()
(#1872) (0a4a944), closes #1872When checking types of strings, Nock will no longer recognize the String constructor, only string primitives.
Features
enableNetConnect()
(#1889) (7f9e26c)v11.9.1
Compare Source
Bug Fixes
v11.9.0
Compare Source
Features
enableNetConnect()
(#1889) (566461b)v11.8.2
Compare Source
Bug Fixes
v11.8.1
Compare Source
Bug Fixes
v11.8.0
Compare Source
Bug Fixes
Features
v11.7.2
Compare Source
Bug Fixes
v11.7.1
Compare Source
Bug Fixes
v11.7.0
Compare Source
Features
currentMode
(#1794) (ba60fd2), closes /github.com/nock/nock/blob/master/lib/back.js#L282v11.6.0
Compare Source
Features
v11.5.0
Compare Source
Features
v11.4.0
Compare Source
Features
v11.3.6
Compare Source
Bug Fixes
v11.3.5
Compare Source
Bug Fixes
v11.3.4
Compare Source
Bug Fixes
v11.3.3
Compare Source
Bug Fixes
v11.3.2
: v11Compare Source
Upgrading from Nock 10 to Nock 11
Bug fixes and internal improvements
Nock 11 includes many under-the-hood improvements, including a fully offline
test suite and 100% test coverage. The codebase was also converted to ES6
syntax and formatted with Prettier. Leaning on the test coverage, some
substantial refactors have begun.
Many bug fixes are included. See the detailed changelog below or the
compare view for details.
Fabulous new features for developers
http.request
signatures added in Node 10.9using e.g.
.conditionally(() => true)
afterRecord()
post-processing hook. When
afterRecord()
returns a string, therecorder will no longer attempt to re-stringify it. (Added in v11.3)
.reply()
can now be async/promise-returning..reply()
or.defaultReplyHeaders()
,can now be done consistently using an object, Map, or flat array.
Breaking changes
For many developers no code changes will be needed. However, there are several
minor changes to the API, and it's possible that you will need to update your
code for Nock to keep working properly. It's unlikely that your tests will
falsely pass; what's more probable is that your tests will fail until the
necessary changes are made.
Nock 11 requires Node 8 or later. Nock supports and tests all the "current"
and "maintenance" versions of Node. As of now, that's Node 8, 10, and 12.
In Nock 10, when
reply()
was invoked with a function, the return values werehandled ambiguously depending on their types.
Consider the following example:
In Nock 10, the 200 was ignored, the 500 was interpreted as the status
code, and the body would contain
'hello world'
. This caused problemswhen the goal was to return a numeric array, so in Nock 11, the 200 is
properly interpreted as the status code, and
[500, 'hello world']
as thebody.
These are the correct calls for Nock 11:
The
.reply()
method can be called with explicit arguments:It can be called with a status code and a function that returns an array:
Alternatively the status code can be included in the array:
.reply()
can also be called with anasync
or promise-returning function. Thesignatures are identical, e.g.
Finally, an error-first callback can be used, e.g.:
In Nock 10, errors in user-provided reply functions were caught by Nock, and
generated HTTP responses with status codes of 500. In Nock 11 these errors
are not caught, and instead are re-emitted through the request, like any
other error that occurs during request processing.
Consider the following example:
When
fs.readFile()
errors in Nock 10, a 500 error was emitted. To get thesame effect in Nock 11, the example would need to be rewritten to:
When
.reply()
is invoked with something other than a whole number statuscode or a function, Nock 11 raises a new error Invalid ... value for status code.
Callback functions provided to the
.query
method now receive the result ofquerystring.parse
instead ofqs.parse
.In particular,
querystring.parse
does not interpret keys with JSONpath notation:
In Nock 10, duplicate field names provided to the
.query()
method weresilently ignored. We decided this was probably hiding unintentionally bugs
and causing frustration with users. In Nock 11, attempts to provide query
params more than once will throw a new error
Query parameters have aleady been defined. This could happen by calling
.query()
twice, or by calling.query()
after specifying a literal querystring via the path.
Paths in Nock have always required a leading slash. e.g.
In Nock 10, if the leading slash was missing the mock would never match. In
Nock 11, this raises an error.
The
reqheaders
parameter should be provided as a plain object, e.g.nock('http://example.com', { reqheaders: { X-Foo: 'bar' }})
. When theheaders are specified incorrectly as e.g.
{ reqheaders: 1 }
, Nock 10 wouldbehave in unpredictable ways. In Nock 11, a new error
Headers must be provided as an object is thrown.
In Nock 10, the
ClientRequest
instance wrapped the nativeon
methodand aliased
once
to it. In Nock 11, this been removed andrequest.once
will correctly call registered listeners...once.
In Nock 10, when the method was not specified in a call to
nock.define()
,the method would default to
GET
. In Nock 11, this raises an error.In very old versions of nock, recordings may include a response status
code encoded as a string in the
reply
field. In Nock 10 these strings couldbe non-numeric. In Nock 11 this raises an error.
Updates to the mock surface
the overrides to
request.end()
, includingrequest.end(cb)
in Node 12..destroy()
methodare propagated correctly. (Added in v11.3)
.complete
property is set whenending the response.
unref()
function(which does nothing).
If you discover bugs in this release, please open a bug report on the Nock repo. 🐛
Detailed changelog
BREAKING CHANGES
Interceptor.query
twice throws an error.query
method throws an error instead of ignoring subsequent values.
Features
conditionally()
(#1488) (24e5b47)IncomingMessage.client
for parity with real requests (dc71a3b), closes /github.com/nodejs/node/blob/2e613a9c301165d121b19b86e382860323abc22f/lib/_http_incoming.js#L67unref
to Socket (#1612) (a75f49f)2e56fb0
), closes #1670de9c40b
), closes #1669Bug Fixes
req.end(cb)
compatibility with Node 12 (#1551) (31623fb).matchHeader()
withallowUnmocked
(#1480) (d6667f0)req.end(cb)
; prevent TypeError in Node 12 (#1547) (9a494da), closes #1509new ClientMessage()
is invoked with no options (#1386) (6d2a312)Code Refactoring
v11.3.1
Compare Source
v11.3.0
Compare Source
v11.2.0
Compare Source
v11.1.0
Compare Source
v11.0.0
Compare Source
v10.0.6
Compare Source
Bug Fixes
v10.0.5
Compare Source
Bug Fixes
v10.0.4
Compare Source
Bug Fixes
v10.0.3
Compare Source
Bug Fixes
v10.0.2
Compare Source
Bug Fixes
v10.0.1
Compare Source
Bug Fixes
v10.0.0
Compare Source
BREAKING CHANGES
There is no intentional change that breaks usage in Node 4, but as we
stop testing in this no longer supported Node version we recommend to
no update nock if you still rely on Node 4.
The reason why we decided to go ahead and make a breaking version
release is that it became increasingly harder to update dependencies
to the latest versions as they also drop support for Node 4.
Bug Fixes
Code Refactoring
Continuous Integration
v9.6.1
Compare Source
Bug Fixes
v9.6.0
Compare Source
Features
v9.5.0
Compare Source
Features
v9.4.4
Compare Source
Bug Fixes
v9.4.3
Compare Source
Bug Fixes
v9.4.2
Compare Source
Bug Fixes
v9.4.1
Compare Source
Bug Fixes
v9.4.0
Compare Source
Features
v9.3.3
Compare Source
Bug Fixes
v9.3.2
Compare Source
Bug Fixes
v9.3.1
Compare Source
Bug Fixes
aborted
property on http request (#1134) (aaa9a56)v9.3.0
Compare Source
Features
v9.2.6
Compare Source
Bug Fixes
v9.2.5
Compare Source
Bug Fixes
v9.2.4
Compare Source
Bug Fixes
v9.2.3
Compare Source
Bug Fixes
v9.2.2
Compare Source
Bug Fixes
v9.2.1
Compare Source
Bug Fixes
v9.2.0
[Compar
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.