All Versions
49
Latest Version
Avg Release Cycle
15 days
Latest Release
349 days ago

Changelog History
Page 1

  • v13.0.5 Changes

    November 11, 2020

    13.0.5 (2020-11-11)

    ๐Ÿ› Bug Fixes

  • v13.0.4 Changes

    August 11, 2020

    13.0.4 (2020-08-11)

    ๐Ÿ› Bug Fixes

    • Parallel requests on same Interceptor are exposed correctly in reply functions (#2056) (6260217)
  • v13.0.3 Changes

    July 27, 2020

    13.0.3 (2020-07-27)

    ๐Ÿ› Bug Fixes

    • data comparison with undefined object values (#2049) (ac6ebbb)
  • v13.0.2 Changes

    July 01, 2020

    13.0.2 (2020-07-01)

    ๐Ÿ› Bug Fixes

    • intercept: mark Interceptors consumed immediately (#2033) (3b24821)
  • v13.0.1 Changes

    July 01, 2020

    13.0.1 (2020-07-01)

    ๐Ÿ› Bug Fixes

    • ๐Ÿ‘ allow Content-Type request introspection when header is an array (#2010) (e432ac5), closes #2009
  • v13.0.0 Changes

    June 15, 2020

    See the Migration Guide

    ๐Ÿ’ฅ Breaking changes

    ๐Ÿšš Scope.log has been removed. Use the debug library when debugging failed matches.

    ๐Ÿšš socketDelay has been removed. Use delayConnection instead.

    delay, delayConnection, and delayBody are now setters instead of additive.

    ๐Ÿ‘ When recording, skipping body matching using * is no longer supported by nock.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.

  • v13.0.0-beta.5 Changes

    May 14, 2020

    13.0.0-beta.5 (2020-05-14)

    ๐Ÿ› Bug Fixes

    • ClientRequest: Use native abort and destroy (#2000) (46e004c)
  • v13.0.0-beta.4 Changes

    May 02, 2020

    13.0.0-beta.4 (2020-05-02)

    ๐Ÿ”‹ Features

    ๐Ÿ’ฅ BREAKING CHANGES

    • ๐Ÿšš socketDelay has been removed. Use delayConnection instead.
    • delay, delayConnection, and delayBody are now setters instead of additive.
      example:

      nock('http://example.com').get('/').delay(1).delay({ head: 2, body: 3 }).delayConnection(4).delayBody(5).delayBody(6).reply()

    Previously, the connection would have been delayed by 7 and the body delayed by 14.
    Now, the connection will be delayed by 4 and the body delayed by 6.

  • v13.0.0-beta.3 Changes

    April 05, 2020

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

    ๐Ÿ”‹ feature

    • โœ‚ remove Scope.log in favor of more debug (#1966) (d523df2)

    ๐Ÿ’ฅ BREAKING CHANGES

    • ๐Ÿšš Scope.log has been removed. Use the debug library when debugging failed matches.
  • v13.0.0-beta.2 Changes

    April 04, 2020

    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()