unstale

npm / nock

nock

What changed in nock 10 to 15, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-28.

13 breaking2 new APIs and options11 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

nock 155 changes

Breaking changes 1

  • Removes headers from Definition to align the type with runtime behavior.

    15.0.5release notes

Fixes and other changes 4

  • Supports @mswjs/interceptors 0.45 by streaming delayed bodies.

    15.0.6release notes

  • Added rawHeaders to Definition to align the type with runtime behavior.

    14.0.13, 15.0.5release notesrelease notes

  • replyContentLength counts bytes rather than characters, avoiding incorrect lengths for multibyte content.

    15.0.3release notes

  • Empty request bodies are no longer decompressed.

    15.0.2release notes

nock 148 changes

Breaking changes 1

  • Support for Node versions below 18 was dropped.

    14.0.0release notes

New APIs and options 1

Fixes and other changes 6

  • Calling nock.removeInterceptor now removes the interceptor from scope.interceptors.

    14.0.17release notes

  • The response handler now guards against requests aborted by an AbortSignal.

    14.0.16release notes

  • Reverts the change that applied body delay before the response end.

    14.0.15release notes

  • Applies the body delay before the response ends.

    14.0.14release notes

  • Prevents a crash when query params have conflicting dot-notation keys.

    14.0.12release notes

  • Updated @mswjs/interceptors to fix a memory leak.

    14.0.11release notes

nock 137 changes

Breaking changes 7

  • ClientRequest.abort() now aligns with Node's native behavior, with subtle differences that are not backwards compatible.

    13.0.0release notes

  • delay is now a setter instead of additive.

    13.0.0release notes

  • delayBody is now a setter instead of additive.

    13.0.0release notes

  • delayConnection is now a setter instead of additive.

    13.0.0release notes

  • Playback of mocked responses will not happen until the 'socket' event is emitted.

    13.0.0release notes

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

    13.0.0release notes

  • socketDelay has been removed; use delayConnection instead.

    13.0.0release notes

nock 124 changes

Breaking changes 3

  • cleanAll() no longer returns the nock global.

    12.0.0release notes

  • Nock now requires Node 10 or later.

    12.0.0release notes

  • String constructor values are no longer recognized when checking types of strings; only string primitives are recognized.

    12.0.0release notes

New APIs and options 1

nock 102 changes

Breaking changes 1

  • Official support for Node versions below 6 is dropped; Node 4 usage may still work, but is no longer tested.

    10.0.0release notes

Fixes and other changes 1

  • Fixes handling of statusCode when there is no payload.

    10.0.0release notes