NullVoxPopuli / ember-resources

An implementation of Resources. Supports ember 3.28+
https://github.com/NullVoxPopuli/ember-resources/blob/main/docs/docs/README.md
MIT License
91 stars 37 forks source link

chore(deps): update dependency msw to v2 #1024

Closed renovate[bot] closed 10 months ago

renovate[bot] commented 10 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
msw (source) ^1.3.2 -> ^2.0.0 age adoption passing confidence

Release Notes

mswjs/msw (msw) ### [`v2.0.0`](https://togithub.com/mswjs/msw/releases/tag/v2.0.0) [Compare Source](https://togithub.com/mswjs/msw/compare/v1.3.2...v2.0.0) #### v2.0.0 (2023-10-23) > \[!IMPORTANT] > **This release is a BREAKING CHANGE**. Please follow the [Migration guidelines](https://mswjs.io/docs/migrations/1.x-to-2.x) 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](docs/migrations/1.x-to-2.x).** #### 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](https://togithub.com/dbritto-dev) [@​ddolcimascolo](https://togithub.com/ddolcimascolo) [@​markwhitfeld](https://togithub.com/markwhitfeld) [@​christoph-fricke](https://togithub.com/christoph-fricke) [@​thepassle](https://togithub.com/thepassle) [@​piotr-cz](https://togithub.com/piotr-cz) [@​mattcosta7](https://togithub.com/mattcosta7) [@​koddsson](https://togithub.com/koddsson) [@​dkobierski](https://togithub.com/dkobierski) [@​ricardocosta](https://togithub.com/ricardocosta) [@​dxlbnl](https://togithub.com/dxlbnl) [@​zkochan](https://togithub.com/zkochan) [@​felipefreitag](https://togithub.com/felipefreitag) [@​weyert](https://togithub.com/weyert) [@​95th](https://togithub.com/95th) [@​committomaster](https://togithub.com/committomaster) [@​Xayer](https://togithub.com/Xayer) [@​Kosai106](https://togithub.com/Kosai106) [@​colinsullivan](https://togithub.com/colinsullivan) [@​xmlking](https://togithub.com/xmlking) [@​thw0rted](https://togithub.com/thw0rted) [@​lee-reinhardt](https://togithub.com/lee-reinhardt) [@​wKovacs64](https://togithub.com/wKovacs64) [@​TeChn4K](https://togithub.com/TeChn4K) [@​cmolina](https://togithub.com/cmolina) [@​nickrttn](https://togithub.com/nickrttn) [@​thomasbertet](https://togithub.com/thomasbertet) [@​mscottnelson](https://togithub.com/mscottnelson) [@​jonnedeprez](https://togithub.com/jonnedeprez) [@​negabaro](https://togithub.com/negabaro) [@​the-ult](https://togithub.com/the-ult) [@​WesleyYue](https://togithub.com/WesleyYue) [@​cwagner22](https://togithub.com/cwagner22) [@​skvale](https://togithub.com/skvale) [@​alawiii521](https://togithub.com/alawiii521) [@​csantos1113](https://togithub.com/csantos1113) [@​elliotgonzalez123](https://togithub.com/elliotgonzalez123) [@​committomaster](https://togithub.com/committomaster) [@​tsteckenborn](https://togithub.com/tsteckenborn) [@​xxleyi](https://togithub.com/xxleyi) [@​jonnedeprez](https://togithub.com/jonnedeprez) [@​danny-does-stuff](https://togithub.com/danny-does-stuff) [@​lemcii](https://togithub.com/lemcii) [@​mattrodak](https://togithub.com/mattrodak) [@​luisr-carrillo](https://togithub.com/luisr-carrillo) [@​lee-reinhardt](https://togithub.com/lee-reinhardt) [@​ealejandrootalvaro](https://togithub.com/ealejandrootalvaro) [@​tomdglenn91](https://togithub.com/tomdglenn91)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.



This PR has been generated by Mend Renovate. View repository job log here.

stackblitz[bot] commented 10 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

changeset-bot[bot] commented 10 months ago

⚠️ No Changeset found

Latest commit: 377b65269ce27c87089a57e383533c0b35826f87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

github-actions[bot] commented 10 months ago

Estimated impact to a consuming app, depending on which bundle is imported

js min min + gzip min + brotli
/index.js 26.22 kB 5.71 kB 2.1 kB 1.85 kB
├── core/class-based/index.js 9.39 kB 2.48 kB 1.16 kB 999 B
├── core/function-based/index.js 15.01 kB 4.12 kB 1.55 kB 1.35 kB
└── core/use.js 11.18 kB 3.46 kB 1.4 kB 1.22 kB
/link.js 2.67 kB 376 B 233 B 185 B
/service.js 20.59 kB 5.74 kB 2.12 kB 1.86 kB
/util/debounce.js 3.07 kB 861 B 445 B 373 B
/util/ember-concurrency.js 5.07 kB 1.59 kB 750 B 640 B
/util/fps.js 3.16 kB 919 B 480 B 386 B
/util/function.js 10.06 kB 2.77 kB 1.02 kB 911 B
/util/helper.js 2.12 kB 303 B 218 B 177 B
/util/keep-latest.js 2.08 kB 412 B 261 B 209 B
/util/map.js 5.95 kB 2.44 kB 1.1 kB 924 B
/util/remote-data.js 7.96 kB 2.37 kB 808 B 705 B
github-actions[bot] commented 10 months ago

Preview URLs

readme: https://ee893bea.ember-resources.pages.dev api docs: https://ee893bea.ember-resources.pages.dev/modules.html