Skip to content

Releases: nock/nock

v13.0.0-beta.3

05 Apr 19:27
d523df2
Compare
Choose a tag to compare
v13.0.0-beta.3 Pre-release
Pre-release

13.0.0-beta.3 (2020-04-05)

feature

BREAKING CHANGES

  • Scope.log has been removed. Use the debug library when debugging failed matches.

v13.0.0-beta.2

04 Apr 17:46
5c1b937
Compare
Choose a tag to compare
v13.0.0-beta.2 Pre-release
Pre-release

13.0.0-beta.2 (2020-04-04)

Bug Fixes

  • router: bring behavior of abort() inline with native Node (#1960) (5c1b937), closes #439

BREAKING CHANGES

  • Calling request.abort():

    • Use to always emit a 'socket hang up' error. Now only emits the error if abort is called between the 'socket' and 'response' events.
    • The emitted 'abort' event now happens on nextTick.
    • The socket is now only destroyed if the 'socket' event has fired, and now emits a 'close' event on nextTick that propagates though the request object.
    • request.aborted attribute is set to true instead of a timestamp. Changed in Node v11.0 nodejs/node#20230
    • Calling write, end, or flushHeaders on an aborted request no longer emits an error.
      However, writing to a request that is already finished (ended) will emit a 'write after end' error.
  • Playback of a mocked responses will now never happen until the 'socket' event is emitted.
    The 'socket' event is still artificially set to emit on nextTick when a ClientRequest is created.
    This means in the following code the Scope will never be done because at least one tick needs
    to happen before any matched Interceptor is considered consumed.

const scope = nock(...).get('/').reply()
const req = http.get(...)
scope.done()

v13.0.0-beta.1

31 Mar 02:44
f9a84a0
Compare
Choose a tag to compare
v13.0.0-beta.1 Pre-release
Pre-release

13.0.0-beta.1 (2020-03-31)

chore

  • remove body matching using "*" using definitions (#1964) (f9a84a0)

BREAKING CHANGES

  • Skipping body matching using "*" is no longer supported.
    Set the definition body to undefined instead.
    This was deprecated in v11.

v12.0.3

17 Mar 11:52
d81c260
Compare
Choose a tag to compare

12.0.3 (2020-03-17)

Bug Fixes

v12.0.2

01 Mar 18:52
fa3c237
Compare
Choose a tag to compare

12.0.2 (2020-03-01)

Bug Fixes

  • types: remove inaccurate Scope.restore method (#1940) (fa3c237)

v12.0.1

19 Feb 18:54
1f47f1a
Compare
Choose a tag to compare

12.0.1 (2020-02-19)

Bug Fixes

v12.0.0

16 Feb 21:04
Compare
Choose a tag to compare

12.0.0 (2020-02-16)

BREAKING CHANGES

When checking types of strings, Nock will no longer recognize the String constructor, only string primitives.

Features

  • Allow passing a function to enableNetConnect() (#1889) (7f9e26c)

v11.9.1

16 Feb 18:34
Compare
Choose a tag to compare

11.9.1 (2020-02-16)

Bug Fixes

  • revert breaking changes from v11.9.0 (062c10e)

v11.9.0

13 Feb 16:27
Compare
Choose a tag to compare

11.9.0 (2020-02-13)

Features

  • allow passing a function to enableNetConnect() (#1889) (566461b)

v12.0.0-beta.1

11 Feb 19:07
31bf521
Compare
Choose a tag to compare
v12.0.0-beta.1 Pre-release
Pre-release

12.0.0-beta.1 (2020-02-11)

BREAKING CHANGES

  • Fix version number for breaking changes