Skip to content

Tags: nock/nock

Tags

v15.0.0-beta.12

Toggle v15.0.0-beta.12's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: remove interceptor from scope.interceptors (#2975)

v15.0.0-beta.11

Toggle v15.0.0-beta.11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: Convert nock to TypeScript + ESM (#2968)

v14.0.15

Toggle v14.0.15's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: Revert "fix(backport): apply body delay before the response end" (

…#2973)

Revert "fix(backport): apply body delay before the response end (#2969)"

This reverts commit 215cd2a.

v14.0.14

Toggle v14.0.14's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(backport): apply body delay before the response end (#2969)

This fixes a regression where `delayBody(N)` no longer makes a body look
slow to the caller. Read timeouts on the response stream are expected to
fire when N exceeds them, but in v14 the @mswjs/interceptors-based
pipeline drains the response body before delivering the response event.
Pausing the body source (the v13 mechanism) ended up delaying the
*whole* response — response, data, and end events all moved to
`+delayBodyInMs`, indistinguishable from a slow connection.

Two coordinated pieces fix it:

1. `lib/playback_interceptor.js`: drop the pause/resume mechanism and
   gate only the end-of-response push (`response.push(null)`) on
   `delayBodyInMs`. Schedule that gate inside `respond()` so
   `delay({ head, body })` continues to compound — head defers the
   response event, body then defers the end signal by an additional
   `body` ms. Reply callbacks like `replyWithFile` hand back an
   explicitly-paused `fs.createReadStream`, so call
   `bodyAsStream.resume()` to ensure the body flows.
2. `tests/got/test_delay.js`: the two tests that asserted timing on the
   first `data` event are updated to assert on the `end` event,
   matching the new (and intended) semantics.

Refs: #2867
Fixes: #2863

v14.0.13

Toggle v14.0.13's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(types): align Definition with runtime; add rawHeaders, drop heade…

…rs (#2955)

v14.0.12

Toggle v14.0.12's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
fix: prevent crash when query params have conflicting dot-notation ke…

…ys (#2958)

fix: return undefined from expand() when a path segment conflicts with a primitive

Co-authored-by: Michael Solomon <github@tltv.co.il>

v15.0.0-beta.10

Toggle v15.0.0-beta.10's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: Vendor prod dependency on json-stringify-safe (#2910)

v15.0.0-beta.9

Toggle v15.0.0-beta.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: add passthrough() method to interceptors (#2944)

v15.0.0-beta.8

Toggle v15.0.0-beta.8's commit message

Verified

This commit was signed with the committer’s verified signature.
mikicho Michael Solomon
fix: package lock file

v14.0.11

Toggle v14.0.11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: upgrade semantic-release (#2943)