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

[WIP] Manual bump of MSW from 1.2.3 to 2.0.13 #1481

Closed
wants to merge 2 commits into from

Conversation

regexowl
Copy link
Collaborator

@regexowl regexowl commented Dec 8, 2023

Started working on the bump several days ago. Wasn't able to make it work as there's some problem with the testing environment setup and the render functions do not seem to be rendering.

I plan to take another look at it later, but wanted to create a draft in case anyone else wanted to check the migration as well.

The handlers and fixtures were updated as per guide: https://mswjs.io/docs/migrations/1.x-to-2.x

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Attention: 71 lines in your changes are missing coverage. Please review.

Comparison is base (e5f3745) 77.69% compared to head (d5ee829) 19.03%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1481       +/-   ##
===========================================
- Coverage   77.69%   19.03%   -58.66%     
===========================================
  Files          69       69               
  Lines        2035     2028        -7     
  Branches      560      557        -3     
===========================================
- Hits         1581      386     -1195     
- Misses        413     1472     +1059     
- Partials       41      170      +129     
Files Coverage Δ
src/test/mocks/browser.js 0.00% <ø> (ø)
src/mockServiceWorker.js 0.00% <0.00%> (ø)
src/test/mocks/handlers.js 1.88% <0.00%> (-94.04%) ⬇️

... and 43 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5f3745...d5ee829. Read the comment docs.

Copy link
Contributor

github-actions bot commented Jan 8, 2024

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 8, 2024
@regexowl regexowl removed the Stale label Jan 8, 2024
This updates the version of MSW. Upon `npm ci` the file `mockServiceWorker.js` is automatically updated as well.
This migrates the previously used handlers and fixtures according to following guide: https://mswjs.io/docs/migrations/1.x-to-2.x
@regexowl regexowl changed the title [WIP] Manual bump of MSW from 1.2.3 to 2.0.10 [WIP] Manual bump of MSW from 1.2.3 to 2.0.13 Jan 9, 2024
Copy link
Member

@amirfefer amirfefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @regexowl !
we just migrated to msw 2.x last week RHEnVision/provisioning-frontend#370
you can have a look :)

msw 2.x requires node version 18+
We had some similar issues with tests and jsdom test env, make sure that you have all the required polyfills, in the msw official migration guide the polyfills includes packages from undici

@regexowl
Copy link
Collaborator Author

Hi @regexowl ! we just migrated to msw 2.x last week RHEnVision/provisioning-frontend#370 you can have a look :)

msw 2.x requires node version 18+ We had some similar issues with tests and jsdom test env, make sure that you have all the required polyfills, in the msw official migration guide the polyfills includes packages from undici

@amirfefer Thank you! ✨ I will check it out 👀

Copy link
Contributor

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

Copy link
Contributor

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@regexowl
Copy link
Collaborator Author

I've opened a more up-to-date WIP: #1831

@regexowl regexowl closed this Mar 21, 2024
@regexowl regexowl deleted the manual-bump-msw branch March 21, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants