msw

Seamless REST/GraphQL API mocking library for browser and Node.js.

MIT License

Downloads
15.7M
Stars
14.9K
Committers
153

Bot releases are hidden (Show)

msw - v2.4.5 Latest Release

Published by kettanaito about 1 month ago

v2.4.5 (2024-09-11)

Bug Fixes

  • remove cookies with max-age=0 from cookie store (#2275) (c307ab27643fc80631d3f0a28e72f7339a54af70) @kettanaito
msw - v2.4.4

Published by kettanaito about 1 month ago

v2.4.4 (2024-09-08)

Bug Fixes

  • fetch: follow mocked redirect responses (#2268) (f5785bfba1a026075feca4f74cadfcb636ffc257) @kettanaito
msw - v1.3.4

Published by kettanaito about 2 months ago

v1.3.4 (2024-09-07)

Bug Fixes

  • types: add generic type to MockedRequest.passthrough (#2198) (e13e64607aaca4468cd48b73a9a2105cd5b1db2e) @sbaechler
msw - v2.4.3

Published by kettanaito about 2 months ago

v2.4.3 (2024-09-07)

Bug Fixes

  • revert "graphql" as optional peer dependency (#2267) (7cd39e787aa9766eef914bce3d65daec1ce16635) @kettanaito
msw - v2.4.2

Published by kettanaito about 2 months ago

v2.4.2 (2024-09-04)

Bug Fixes

  • cli: support windows paths in the init command (#2260) (ba285b887cedfa22f32ae1e8d6569e57174cb561) @ivanfernandez2646 @kettanaito
  • use [email protected] as the minimal supported version (#2251) (6b2a7e6be8f9b63c2549ad7fbf271d38f803ad6e) @THETCR @kettanaito
  • keep graphql import as require in cjs (#2258) (b97760270b28bd633b56332d87a9d834f653cad2) @kettanaito
msw - v2.4.1

Published by kettanaito about 2 months ago

v2.4.1 (2024-08-29)

Bug Fixes

  • import graphql lazily (#2250) (1799e0638f0f860c19ba46db7c4287012f2cb716) @kettanaito
  • add graphql to "peerDependencies" (#2249) (8a9568ad4593b662a8c320bb1a02b380791a1696) @THETCR
msw - v2.4.0

Published by kettanaito about 2 months ago

v2.4.0 (2024-08-28)

Features

  • add HttpResponse.html() static method (#2140, docs) (8c5580a0e2e6e52785b0132128c36d679ddbe5d5) @scruffymongrel @kettanaito
  • list "graphql" as an optional peer dependency (#2187) (40b17fdf655e597b352094527f558f6d839f2970) @kettanaito
  • print request body in onUnhandledRequest message (#2227) (a2153c93edd752d7c5686573f684721b19f0a115) @bitttttten @kettanaito
msw - v2.3.5

Published by kettanaito 3 months ago

v2.3.5 (2024-08-02)

Bug Fixes

  • HttpResponse: skip setting "Content-Length" if it is already set (#2228) (a0234c9abebada6f66f8a14dfa04bf2aac6e6dcf) @kettanaito
msw - v2.3.4

Published by kettanaito 3 months ago

v2.3.4 (2024-07-23)

Bug Fixes

  • cookieStore: remove left-over console.log (#2217) (00fdbb265dbb5cf0f9f89bd91b546966463535a4) @Lalem001
msw - v2.3.3

Published by kettanaito 3 months ago

v2.3.3 (2024-07-23)

Bug Fixes

  • implement cookie persistence using tough-cookie (#2206) (c30613c2ba1df0c3f2575051ddb3eb42f1744f69) @kettanaito
  • support async generators as response resolvers (#2108) (d38fc3dd6437ef6503c1ad62bf853b5ca800179c) @kettanaito @jakebailey
msw - v2.3.2

Published by kettanaito 3 months ago

v2.3.2 (2024-07-19)

Bug Fixes

  • support [email protected] (deprecate v4.7) (#2190) (7df2533c183bb73b176863fee5101ade69c16fea) @KaiSpencer @kettanaito
msw - v2.3.1

Published by kettanaito 5 months ago

v2.3.1 (2024-06-01)

Bug Fixes

  • preserve trailing optional path parameters (#2169) (e69bbd6fda7c7997b523457b644440889e68d994) @kettanaito @KaiSpencer
msw - v2.3.0

Published by kettanaito 6 months ago

v2.3.0 (2024-05-08)

[!WARNING]
This release changes how MSW treats unhandled exceptions in response resolvers. Previously, they were treated as request errors. Starting with this release, unhandled resolver exceptions will be coerced to 500 Unhandled Exception mocked error responses produced by the library. Please note that you must not intentionally throw errors in your resolvers. Please use Response.error() to mock request/network errors. Unhandled exceptions are considered unintended and will be treated as if they happen on the actual server.

Features

  • treat unhandled exceptions in handlers as 500 error responses (#2135) (519139924639a0135169210a0d9c5cd0a0d3e994) @kettanaito
  • prioritize the node export when importing msw/node (#2134, transitively through @mswjs/interceptors).
  • add a new unhandledException event (#2135, docs).
server.events.on('unhandledException', ({ request, error }) => {
  console.log('%s %s errored! See details below.', request.method, request.url)
  console.error(error)
})

Bug Fixes

  • Disposable: make the ".dispose()" method synchronous (#2144) (686d3d668f7b76cbf26f75c990fded5e4fd298da) @kettanaito
msw - v2.2.14

Published by kettanaito 6 months ago

v2.2.14 (2024-04-17)

Bug Fixes

  • preserve search params in "onUnhandledRequest" messages (#2128) (64bcae7c27dfd36a35723a323c29cf0f5138a81c) @nagadevkrishna @kettanaito
  • give node export condition higher priority (#2134) (f948d13d2df85efa8d276396e1e60da235523a0e) @phryneas
msw - v2.2.13

Published by kettanaito 7 months ago

v2.2.13 (2024-03-27)

Bug Fixes

  • use createRequestId() instead of crypto.randomUUID() (#2113) (8f2be77627b94318e6c2e6d6eee38fc49558c6d9) @kettanaito
msw - v2.2.12

Published by kettanaito 7 months ago

v2.2.12 (2024-03-27)

Bug Fixes

  • do not mutate user-defined "X-Request-Id" request header (#2110) (64b6ba516123d655e82d164e8ed1bb1f75b8cff8) @kettanaito
msw - v2.2.11

Published by kettanaito 7 months ago

v2.2.11 (2024-03-26)

Bug Fixes

  • accept a narrower response body type by default (#2107) (d35ef92d0fe07831fb2aaa46050fabf27d3aa709) @kettanaito
msw - v2.2.10

Published by kettanaito 7 months ago

v2.2.10 (2024-03-22)

Bug Fixes

  • feature "new URL()" in the redundant query params warning (#2102) (9af301a7ea593642cc7b6d46f3685cf2ff9f2b58) @psjostrom @kettanaito
msw - v2.2.9

Published by kettanaito 7 months ago

v2.2.9 (2024-03-20)

Bug Fixes

  • properly infer parameter and return types in server.boundary() (#2101) (1370736580b5c2a37127359b79433ca4e9b20c79) @Andarist @kettanaito
msw - v2.2.8

Published by kettanaito 7 months ago

v2.2.8 (2024-03-19)

Bug Fixes

  • setupWorker: remove left-over console.log() (#2099) (cf979915aab2ed1759c6c05a6eb5e038fc0dcb2a) @kettanaito