Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency msw to v2 #120

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

makaira-github
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
msw (source) devDependencies major ^0.43.0 -> 2.0.8

Release Notes

mswjs/msw

v2.0.8

Compare Source

v2.0.8 (2023-11-17)
Bug Fixes

v2.0.7

Compare Source

v2.0.7 (2023-11-16)

Bug Fixes

v2.0.6

Compare Source

v2.0.6 (2023-11-13)

Bug Fixes

v2.0.5

Compare Source

v2.0.5 (2023-11-10)
Bug Fixes

v2.0.4

Compare Source

v2.0.4 (2023-11-08)
Bug Fixes

v2.0.3

Compare Source

v2.0.3 (2023-11-04)

Bug Fixes

v2.0.2

Compare Source

v2.0.2 (2023-11-01)

Bug Fixes

v2.0.1

Compare Source

v2.0.1 (2023-10-28)

Bug Fixes

v2.0.0

Compare Source

v2.0.0 (2023-10-23)

[!IMPORTANT]
This release is a BREAKING CHANGE. Please follow the Migration guidelines to upgrade. This release took a lot of effort to make, and I expect a bit of that effort on your part while upgrading. Most of the changes are mechanical, and a simple Find/Replace All will get you a long way. For the rest of it, you will learn how to handle requests and responses using the standard JavaScript API. Thank you!

Breaking changes

  • Drops support for Node.js 16. Please upgrade to Node.js 18 or later to use the global Fetch API.
  • Drops support for TypeScript < 4.7.
  • All browser-side exports, like setupWorker, SetupWorkerApi, etc., must be imported from msw/browser now.
  • Renames the rest object to http (rest.get -> http.get).
  • Response resolver call signature is no longer (req, res, ctx) => res() but instead ({ request }) => new Response().
  • The following exports are removed due to no longer being needed:
    • response
    • context and related exports (defaultContext, restContext, graphqlContext).
    • compose and createResponseComposition
  • res.once() is removed in favor of the { once: boolean } option on the request handler.
  • Replaces the .printHandlers() method with .listHandlers().
  • Removes the NetworkError class in favor of the standard Response.error().
  • Moves request error handling from the worker thread to the client thread.
  • Changes the call signature of the Life-cycle Events API to accept a single object argument.
  • Uses crypto.randomUUID() instead of Math.random() in the worker.
  • For the full list of changes and detailed instructions on how to upgrade please see the Migration guidelines.

Features

  • Adopts Fetch API primitives. Represent intercepted requests and mocked responses as Request and Response instances respectively.
  • Supports Node.js v18.
  • Supports ReadableStream as a mocked response body.
  • Supports reading the intercepted request body as FormData.
  • Supports FormData as a mocked response body.
  • Uses File polyfill in Node.js.
  • Supports XMLHttpRequest “upload” events when responding with a mocked stream response.
  • Allows mocking a network error once using the { once: true } request handler option.
  • Makes the RequestHandler API public.

Bug fixes

  • Fixes the issue where the request body couldn’t be properly read as FormData.
  • Fixes a set of issues related to response patching when using the FormData response body.
  • Fixes the issue where URLSearchParams as the request body couldn’t be read.
  • Fixes the issue where a bypassed request’s referrerPolicy was reset to a different value than the original.
  • Fixes the wrong order of XMLHttpRequest events and readyState changes.
  • Fixes the issue when reading an XMLHttpRequest body of responseType equal to "arraybuffer" as an incorrect buffer (previously, always assumed to be a string).
  • Fixes the order of XMLHttpRequest events when the request fails.
  • Keeps XMLHttpRequest status equal to 0 until the request actually resolves.
  • Fixes the issue when the onload event callback was called twice for XMLHttpRequest.
  • Various improvements in Node.js network behavior compliance.

@​dbritto-dev @​ddolcimascolo @​markwhitfeld @​christoph-fricke @​thepassle @​piotr-cz @​mattcosta7 @​koddsson @​dkobierski @​ricardocosta @​dxlbnl @​zkochan @​felipefreitag @​weyert @​95th @​committomaster @​Xayer @​Kosai106 @​colinsullivan @​xmlking @​thw0rted @​lee-reinhardt @​wKovacs64 @​TeChn4K @​cmolina @​nickrttn @​thomasbertet @​mscottnelson @​jonnedeprez @​negabaro @​the-ult @​WesleyYue @​cwagner22 @​skvale @​alawiii521 @​csantos1113 @​elliotgonzalez123 @​committomaster @​tsteckenborn @​xxleyi @​jonnedeprez @​danny-does-stuff @​lemcii @​mattrodak @​luisr-carrillo @​lee-reinhardt @​ealejandrootalvaro @​tomdglenn91

v1.3.2

Compare Source

v1.3.2 (2023-10-01)

Bug Fixes

v1.3.1

Compare Source

v1.3.1 (2023-09-13)

Bug Fixes

v1.3.0

Compare Source

v1.3.0 (2023-09-03)

Features

v1.2.5

Compare Source

v1.2.5 (2023-08-28)

Bug Fixes

v1.2.4

Compare Source

v1.2.4 (2023-08-25)

Bug Fixes

v1.2.3

Compare Source

v1.2.3 (2023-07-20)

Bug Fixes

v1.2.2

Compare Source

v1.2.2 (2023-06-09)

Bug Fixes

v1.2.1

Compare Source

v1.2.1 (2023-03-24)

Bug Fixes

v1.2.0

Compare Source

v1.2.0 (2023-03-22)

Features

v1.1.1

Compare Source

v1.1.1 (2023-03-20)

Bug Fixes

v1.1.0

Compare Source

v1.1.0 (2023-02-24)

Features
Bug Fixes

v1.0.1

Compare Source

v1.0.1 (2023-02-10)

Bug Fixes

v1.0.0

Compare Source

v1.0.0 (2023-01-25)

⚠️ BREAKING CHANGES
Features

v0.49.3

Compare Source

v0.49.3 (2023-01-19)
Bug Fixes

v0.49.2

Compare Source

v0.49.2 (2022-12-13)

Bug Fixes

v0.49.1

Compare Source

v0.49.1 (2022-11-28)

Bug Fixes

v0.49.0

Compare Source

v0.49.0 (2022-11-19)

Features

v0.48.3

Compare Source

v0.48.3 (2022-11-15)

Bug Fixes

v0.48.2

Compare Source

v0.48.2 (2022-11-13)
Bug Fixes

v0.48.1

Compare Source

v0.48.1 (2022-11-10)

Bug Fixes

v0.48.0

Compare Source

v0.48.0 (2022-11-08)

Features

v0.47.4

Compare Source

v0.47.4 (2022-10-04)

Bug Fixes

v0.47.3

Compare Source

v0.47.3 (2022-09-15)

Bug Fixes

v0.47.2

Compare Source

v0.47.2 (2022-09-13)

Bug Fixes

v0.47.1

Compare Source

v0.47.1 (2022-09-10)

Bug Fixes

v0.47.0

Compare Source

v0.47.0 (2022-09-04)

Features

v0.46.1

Compare Source

v0.46.1 (2022-09-01)

Bug Fixes

v0.46.0

Compare Source

v0.46.0 (2022-08-31)

Features
server.listHandlers()
worker.listHandlers()

v0.45.0

Compare Source

v0.45.0 (2022-08-22)

Features
  • make GraphQL a peer dependency, support GraphQL v15.0 (#​1356) (ca0e2e0)

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants