You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This codemod migrates your project from MSW v1 to v2, handling the breaking changes:
4
2
5
-
1- Updates import statements to new locations and names
6
-
2- Fixes generic type arguments order
7
-
3- Modernizes request object usage patterns
8
-
4- Replaces `ctx.fetch()` with new `fetch(bypass())` pattern
9
-
5- Updates passthrough method calls
10
-
6- Converts response patterns to new `HttpResponse` API
11
-
7- Updates handler callback signatures
12
-
8- Modernizes event callback signatures
13
-
9- Replaces deprecated handler printing methods
14
-
3
+
1. Updates import statements to new locations and names
4
+
2. Fixes generic type arguments order
5
+
3. Modernizes request object usage patterns
6
+
4. Replaces `ctx.fetch()` with new `fetch(bypass())` pattern
7
+
5. Updates passthrough method calls
8
+
6. Converts response patterns to new `HttpResponse` API
9
+
7. Updates handler callback signatures
10
+
8. Modernizes event callback signatures
11
+
9. Replaces deprecated handler printing methods
15
12
16
-
## Important Notes
13
+
###Important Notes
17
14
18
15
⚠️ **Custom Factory Functions**: This codemod does not change signatures of MSW handlers when called through custom factory functions. You'll need to update these manually.
19
16
@@ -22,10 +19,10 @@ This codemod migrates your project from MSW v1 to v2, handling the breaking chan
22
19
⚠️ **Complete Migration**: This codemod performs all necessary transformations in the correct order to ensure your code properly migrates to MSW v2.
0 commit comments