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

chore(#zimic): upgrade msw to v2.7.0 #423

Merged
merged 30 commits into from
Jan 25, 2025
Merged

Conversation

diego-aquino
Copy link
Member

@diego-aquino diego-aquino commented Oct 13, 2024

Reopening #410.

Chore

  • [#zimic] Upgrades msw to its latest version.

@diego-aquino
Copy link
Member Author

The tests are still failing due to mswjs/msw#2297.

@diego-aquino diego-aquino self-assigned this Oct 13, 2024
@diego-aquino diego-aquino added blocked Blocked dependencies Pull requests that update a dependency file javascript labels Oct 13, 2024
@diego-aquino diego-aquino marked this pull request as draft October 13, 2024 12:44
@diego-aquino diego-aquino force-pushed the chore/bump-msw-from-2.4.3 branch from a348f58 to 07ee856 Compare October 21, 2024 20:16
@diego-aquino diego-aquino changed the title chore(#zimic): upgrade msw to v2.4.10 chore(#zimic): upgrade msw to v2.4.12 Oct 21, 2024
@diego-aquino
Copy link
Member Author

Upgrading to 2.4.12 now results in many errors as:

zimic:test:turbo: ⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯
zimic:test:turbo: 
zimic:test:turbo: Vitest caught 49 unhandled errors during the test run.
zimic:test:turbo: This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
zimic:test:turbo: 
zimic:test:turbo: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
zimic:test:turbo: TypeError: Cannot read properties of undefined (reading 'url')
zimic:test:turbo:  ❯ ../../node_modules/.pnpm/[email protected][email protected]/node_modules/msw/lib/browser/index.mjs:1089:24
zimic:test:turbo:  ❯ ServiceWorkerContainer.<anonymous> ../../node_modules/.pnpm/[email protected][email protected]/node_modules/msw/lib/browser/index.mjs:2591:15

@diego-aquino diego-aquino changed the title chore(#zimic): upgrade msw to v2.4.12 chore(#zimic): upgrade msw to v2.5.1 Oct 25, 2024
@diego-aquino
Copy link
Member Author

diego-aquino commented Oct 25, 2024

Upgrading to [email protected] now results in many errors as:

zimic:test:turbo: ⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯
zimic:test:turbo: 
zimic:test:turbo: Vitest caught 49 unhandled errors during the test run.
zimic:test:turbo: This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
zimic:test:turbo: 
zimic:test:turbo: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
zimic:test:turbo: TypeError: Cannot read properties of undefined (reading 'url')
zimic:test:turbo:  ❯ ../../node_modules/.pnpm/[email protected][email protected]/node_modules/msw/lib/browser/index.mjs:1089:24
zimic:test:turbo:  ❯ ServiceWorkerContainer.<anonymous> ../../node_modules/.pnpm/[email protected][email protected]/node_modules/msw/lib/browser/index.mjs:2591:15

Those errors are likely related to mswjs/msw#2146.

@diego-aquino diego-aquino changed the title chore(#zimic): upgrade msw to v2.5.1 chore(#zimic): upgrade msw to v2.6.0 Nov 3, 2024
@diego-aquino
Copy link
Member Author

diego-aquino commented Nov 3, 2024

Apparently, [email protected] fixes all of the issues blocking this upgrade!

However, I'll keep this PR open for another week to make sure everything is fine. We'll re-run the tests after the dependency upgrade next Sunday and hopefully merge this.

@diego-aquino diego-aquino removed the blocked Blocked label Nov 3, 2024
@diego-aquino diego-aquino added this to the v0.9.5 milestone Nov 3, 2024
@diego-aquino
Copy link
Member Author

Actually, mswjs/msw#2146 does not appear to be fixed in [email protected]. CI just failed with the same error. 😕

Still happening in [email protected].

@diego-aquino diego-aquino changed the title chore(#zimic): upgrade msw to v2.6.3 chore(#zimic): upgrade msw to v2.6.5 Nov 16, 2024
@diego-aquino diego-aquino changed the title chore(#zimic): upgrade msw to v2.6.5 chore(#zimic): upgrade msw to v2.6.8 Dec 8, 2024
@diego-aquino
Copy link
Member Author

Actually, mswjs/msw#2146 does not appear to be fixed in [email protected]. CI just failed with the same error. 😕

Still happening in [email protected].

@diego-aquino diego-aquino added the blocked Blocked label Dec 8, 2024
@diego-aquino diego-aquino changed the title chore(#zimic): upgrade msw to v2.6.8 chore(#zimic): upgrade msw to v2.7.0 Dec 29, 2024
@diego-aquino diego-aquino mentioned this pull request Jan 8, 2025
3 tasks
@diego-aquino
Copy link
Member Author

As mswjs/msw#2146 is still happening in the latest msw version and is causing #537, I added a manual postinstall patch to

https://github.com/mswjs/msw/blob/e3234fdce5a36f41c77719492e2eca0f77d7aaa6/src/browser/setupWorker/start/createResponseListener.ts#L31-L33

with the following diff:

-if (responseJson.type?.includes("opaque")) {
+if (!request || responseJson.type?.includes("opaque")) {
  return;
}

@diego-aquino diego-aquino marked this pull request as ready for review January 25, 2025 22:25
@diego-aquino diego-aquino merged commit 2a60673 into canary Jan 25, 2025
16 checks passed
@diego-aquino diego-aquino deleted the chore/bump-msw-from-2.4.3 branch January 25, 2025 22:25
Copy link
Contributor

Released in v0.12.4 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant