Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Update dependency msw to v2 #181

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

Update dependency msw to v2 #181

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Oct 26, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
msw (source) 0.38.2 -> 2.7.0 age adoption passing confidence

Release Notes

mswjs/msw (msw)

v2.7.0

Compare Source

v2.7.0 (2024-12-17)
Features

v2.6.9

Compare Source

v2.6.9 (2024-12-16)

Bug Fixes

v2.6.8

Compare Source

v2.6.8 (2024-12-07)

Bug Fixes

v2.6.7

Compare Source

v2.6.7 (2024-12-06)

Bug Fixes

v2.6.6

Compare Source

v2.6.6 (2024-11-22)

Bug Fixes

v2.6.5

Compare Source

v2.6.5 (2024-11-16)

Bug Fixes

v2.6.4

Compare Source

v2.6.4 (2024-11-10)

Bug Fixes

v2.6.3

Compare Source

v2.6.3 (2024-11-10)

Bug Fixes

v2.6.2

Compare Source

v2.6.2 (2024-11-07)
Bug Fixes

v2.6.1

Compare Source

v2.6.1 (2024-11-06)
Bug Fixes

v2.6.0

Compare Source

v2.6.0 (2024-10-29)

Features

v2.5.2

Compare Source

v2.5.2 (2024-10-27)

Bug Fixes

v2.5.1

Compare Source

v2.5.1 (2024-10-24)

Bug Fixes

v2.5.0

Compare Source

v2.5.0 (2024-10-22)

Features

v2.4.13

Compare Source

v2.4.13 (2024-10-22)

Bug Fixes

v2.4.12

Compare Source

v2.4.12 (2024-10-21)

Bug Fixes

v2.4.11

Compare Source

v2.4.11 (2024-10-14)

Bug Fixes

v2.4.10

Compare Source

v2.4.10 (2024-10-11)

Bug Fixes

v2.4.9

Compare Source

v2.4.9 (2024-09-20)

Bug Fixes

v2.4.8

Compare Source

v2.4.8 (2024-09-17)

Bug Fixes

v2.4.7

Compare Source

v2.4.7 (2024-09-15)

Bug Fixes

v2.4.6

Compare Source

v2.4.6 (2024-09-13)

Bug Fixes

v2.4.5

Compare Source

v2.4.5 (2024-09-11)
Bug Fixes

v2.4.4

Compare Source

v2.4.4 (2024-09-08)

Bug Fixes

v2.4.3

Compare Source

v2.4.3 (2024-09-07)

Bug Fixes

v2.4.2

Compare Source

v2.4.2 (2024-09-04)

Bug Fixes

v2.4.1

Compare Source

v2.4.1 (2024-08-29)

Bug Fixes

v2.4.0

Compare Source

v2.4.0 (2024-08-28)

Features

v2.3.5

Compare Source

v2.3.5 (2024-08-02)

Bug Fixes

v2.3.4

Compare Source

v2.3.4 (2024-07-23)

Bug Fixes

v2.3.3

Compare Source

v2.3.3 (2024-07-23)

Bug Fixes

v2.3.2

Compare Source

v2.3.2 (2024-07-19)

Bug Fixes

v2.3.1

Compare Source

v2.3.1 (2024-06-01)

Bug Fixes

v2.3.0

Compare Source

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
server.events.on('unhandledException', ({ request, error }) => {
  console.log('%s %s errored! See details below.', request.method, request.url)
  console.error(error)
})
Bug Fixes

v2.2.14

Compare Source

v2.2.14 (2024-04-17)

Bug Fixes

v2.2.13

Compare Source

v2.2.13 (2024-03-27)
Bug Fixes

v2.2.12

Compare Source

v2.2.12 (2024-03-27)

Bug Fixes

v2.2.11

Compare Source

v2.2.11 (2024-03-26)

Bug Fixes

v2.2.10

Compare Source

v2.2.10 (2024-03-22)
Bug Fixes

v2.2.9

Compare Source

v2.2.9 (2024-03-20)

Bug Fixes

v2.2.8

Compare Source

v2.2.8 (2024-03-19)
Bug Fixes

v2.2.7

Compare Source

v2.2.7 (2024-03-18)

Bug Fixes

v2.2.6

Compare Source

v2.2.6 (2024-03-17)

Bug Fixes

v2.2.5

Compare Source

v2.2.5 (2024-03-17)

Bug Fixes

v2.2.4

Compare Source

v2.2.4 (2024-03-16)

Bug Fixes

v2.2.3

Compare Source

v2.2.3 (2024-03-08)

Bug Fixes

v2.2.2

Compare Source

v2.2.2 (2024-02-28)

Bug Fixes

v2.2.1

Compare Source

v2.2.1 (2024-02-17)

Bug Fixes

v2.2.0

Compare Source

v2.2.0 (2024-02-12)

Features
Bug Fixes

v2.1.7

Compare Source

v2.1.7 (2024-02-06)

Bug Fixes

Special thanks to @​willdawsonme for investigating these issues.

v2.1.6

Compare Source

v2.1.6 (2024-02-05)

Bug Fixes

v2.1.5

Compare Source

v2.1.5 (2024-01-25)

Bug Fixes

v2.1.4

Compare Source

v2.1.4 (2024-01-23)

Bug Fixes

v2.1.3

Compare Source

v2.1.3 (2024-01-22)

Bug Fixes

v2.1.2

Compare Source

v2.1.2 (2024-01-17)
Bug Fixes

v2.1.1

Compare Source

v2.1.1 (2024-01-17)

Bug Fixes

v2.1.0

Compare Source

v2.1.0 (2024-01-15)

Features

Shoutout to @​mattcosta7 for his continuous on the library's performance and stability 🎉

v2.0.14

Compare Source

v2.0.14 (2024-01-12)

Bug Fixes

v2.0.13

Compare Source

v2.0.13 (2024-01-09)
Bug Fixes

v2.0.12

Compare Source

v2.0.12 (2024-01-05)

Bug Fixes

v2.0.11

Compare Source

v2.0.11 (2023-12-11)
Bug Fixes

v2.0.10

Compare Source

v2.0.10 (2023-12-04)

Bug Fixes

v2.0.9

Compare Source

v2.0.9 (2023-11-24)

Bug Fixes

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.5

Compare Source

v1.3.5 (2024-10-21)

Bug Fixes

v1.3.4

Compare Source

v1.3.4 (2024-09-07)

Bug Fixes

v1.3.3

Compare Source

v1.3.3 (2024-03-15)

Bug Fixes
  • remove upper version range for "typescript" ([#​20

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - 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, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Dependency updates label Oct 26, 2023
@renovate
Copy link
Author

renovate bot commented Oct 26, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: dust-web@0.1.0
npm ERR! Found: typescript@4.6.3
npm ERR! node_modules/typescript
npm ERR!   peer typescript@">= 2.7" from fork-ts-checker-webpack-plugin@6.5.1
npm ERR!   node_modules/fork-ts-checker-webpack-plugin
npm ERR!     fork-ts-checker-webpack-plugin@"^6.5.0" from react-dev-utils@12.0.1
npm ERR!     node_modules/react-dev-utils
npm ERR!       react-dev-utils@"^12.0.1" from react-scripts@5.0.1
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"5.0.1" from the root project
npm ERR!   peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"5.0.1" from the root project
npm ERR!   1 more (tsutils)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev msw@"2.2.14" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typescript@5.4.5
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@">= 4.7.x" from msw@2.2.14
npm ERR!   node_modules/msw
npm ERR!     dev msw@"2.2.14" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /tmp/renovate/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate/cache/others/npm/_logs/2024-04-20T12_34_12_173Z-debug-0.log

@vercel
Copy link

vercel bot commented Oct 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dust-web ❌ Failed (Inspect) Dec 20, 2024 3:38am

@renovate renovate bot force-pushed the renovate/msw-2.x branch from 9b876bd to 7c6593a Compare October 31, 2023 01:09
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 7c6593a to 1e44d72 Compare November 4, 2023 19:42
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 1e44d72 to 3a41c14 Compare November 7, 2023 17:28
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 3a41c14 to d648d3a Compare November 11, 2023 17:12
@renovate renovate bot force-pushed the renovate/msw-2.x branch from d648d3a to 36dbd9f Compare November 13, 2023 00:32
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 36dbd9f to 8f1fa55 Compare November 16, 2023 00:45
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 8f1fa55 to 3ec46e6 Compare November 19, 2023 13:54
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 3ec46e6 to 741e6d3 Compare November 20, 2023 10:29
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 741e6d3 to ca81f00 Compare November 27, 2023 19:13
@renovate renovate bot force-pushed the renovate/msw-2.x branch from ca81f00 to b4f9bc2 Compare December 7, 2023 00:55
@renovate renovate bot force-pushed the renovate/msw-2.x branch from b4f9bc2 to 88b65fc Compare December 14, 2023 19:20
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 88b65fc to 99933d2 Compare January 8, 2024 14:39
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 99933d2 to 4650752 Compare January 12, 2024 01:57
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 93369b8 to a165b82 Compare November 1, 2024 13:29
@renovate renovate bot force-pushed the renovate/msw-2.x branch from a165b82 to 948bb0f Compare November 9, 2024 21:45
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 948bb0f to e283dbc Compare November 10, 2024 13:29
@renovate renovate bot force-pushed the renovate/msw-2.x branch from e283dbc to 627a9ea Compare November 13, 2024 02:28
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 627a9ea to 391c5da Compare November 13, 2024 23:17
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 391c5da to af3394d Compare November 19, 2024 04:31
@renovate renovate bot force-pushed the renovate/msw-2.x branch from af3394d to 165d8c3 Compare November 25, 2024 20:03
@renovate renovate bot changed the title Update dependency msw to v2 Update dependency msw to v2 - autoclosed Dec 8, 2024
@renovate renovate bot closed this Dec 8, 2024
@renovate renovate bot deleted the renovate/msw-2.x branch December 8, 2024 18:36
@renovate renovate bot changed the title Update dependency msw to v2 - autoclosed Update dependency msw to v2 Dec 9, 2024
@renovate renovate bot reopened this Dec 9, 2024
@renovate renovate bot force-pushed the renovate/msw-2.x branch 2 times, most recently from 165d8c3 to b73b9ef Compare December 9, 2024 10:01
@renovate renovate bot force-pushed the renovate/msw-2.x branch from b73b9ef to 182bfad Compare December 10, 2024 04:25
@renovate renovate bot force-pushed the renovate/msw-2.x branch from 182bfad to 75b84e6 Compare December 19, 2024 04:39
Dependency update (patch) :)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Dependency updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants