@squide/msw 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/{chunk-2T6CVU4B.js → chunk-2J7GQPWR.js} +3 -3
- package/dist/{chunk-UYITHRH3.js → chunk-D2TOUDBN.js} +1 -1
- package/dist/{chunk-JZCWIFHV.js → chunk-JLS7DBDX.js} +4 -1
- package/dist/{chunk-KIQ5XSM7.js → chunk-P5ONHQEP.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/mswPlugin.d.ts +3 -3
- package/dist/mswPlugin.js +3 -3
- package/dist/requestHandlerRegistry.d.ts +3 -3
- package/dist/requestHandlerRegistry.js +2 -2
- package/dist/setMswAsStarted.d.ts +2 -1
- package/dist/setMswAsStarted.js +1 -1
- package/dist/useIsMswStarted.js +2 -0
- package/package.json +11 -6
- package/dist/useIsMswReady.js +0 -2
- /package/dist/{useIsMswReady.d.ts → useIsMswStarted.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @squide/msw
|
|
2
2
|
|
|
3
|
+
## 2.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#108](https://github.com/gsoft-inc/wl-squide/pull/108) [`58097a2`](https://github.com/gsoft-inc/wl-squide/commit/58097a2fbaa7e5942cbe6f9b765fe471d52758d8) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated types in the function signatures for MSW 2.0
|
|
8
|
+
|
|
9
|
+
## 2.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#103](https://github.com/gsoft-inc/wl-squide/pull/103) [`b72fca3`](https://github.com/gsoft-inc/wl-squide/commit/b72fca38385ddacbcd80376c9afd0c9485658d90) Thanks [@patricklafrance](https://github.com/patricklafrance)! - The `msw` dependency is now an optional `peerDependency`.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`b72fca3`](https://github.com/gsoft-inc/wl-squide/commit/b72fca38385ddacbcd80376c9afd0c9485658d90)]:
|
|
16
|
+
- @squide/core@2.2.0
|
|
17
|
+
|
|
3
18
|
## 2.0.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isMswStarted } from './chunk-
|
|
1
|
+
import { isMswStarted } from './chunk-JLS7DBDX.js';
|
|
2
2
|
|
|
3
3
|
// src/requestHandlerRegistry.ts
|
|
4
4
|
var RequestHandlerRegistry = class {
|
|
@@ -9,8 +9,8 @@ var RequestHandlerRegistry = class {
|
|
|
9
9
|
}
|
|
10
10
|
this.#handlers.push(...handlers);
|
|
11
11
|
}
|
|
12
|
-
// Must specify the return type, otherwise we get
|
|
13
|
-
//
|
|
12
|
+
// Must specify the return type, otherwise we get a TS2742: The inferred type cannot be named without a reference to X. This is likely not portable.
|
|
13
|
+
// A type annotation is necessary.
|
|
14
14
|
get handlers() {
|
|
15
15
|
return this.#handlers;
|
|
16
16
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { MswPlugin, getMswPlugin } from './mswPlugin.js';
|
|
2
2
|
export { RequestHandlerRegistry } from './requestHandlerRegistry.js';
|
|
3
|
-
export { isMswStarted, setMswAsStarted } from './setMswAsStarted.js';
|
|
4
|
-
export { UseIsMswStartedOptions, useIsMswStarted } from './
|
|
3
|
+
export { __resetMswStatus, isMswStarted, setMswAsStarted } from './setMswAsStarted.js';
|
|
4
|
+
export { UseIsMswStartedOptions, useIsMswStarted } from './useIsMswStarted.js';
|
|
5
5
|
import '@squide/core';
|
|
6
6
|
import 'msw';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MswPlugin, getMswPlugin } from './chunk-
|
|
2
|
-
export { RequestHandlerRegistry } from './chunk-
|
|
3
|
-
export { useIsMswStarted } from './chunk-
|
|
4
|
-
export { isMswStarted, setMswAsStarted } from './chunk-
|
|
1
|
+
export { MswPlugin, getMswPlugin } from './chunk-D2TOUDBN.js';
|
|
2
|
+
export { RequestHandlerRegistry } from './chunk-2J7GQPWR.js';
|
|
3
|
+
export { useIsMswStarted } from './chunk-P5ONHQEP.js';
|
|
4
|
+
export { __resetMswStatus, isMswStarted, setMswAsStarted } from './chunk-JLS7DBDX.js';
|
package/dist/mswPlugin.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Plugin, AbstractRuntime } from '@squide/core';
|
|
2
|
-
import {
|
|
2
|
+
import { RequestHandler } from 'msw';
|
|
3
3
|
|
|
4
4
|
declare class MswPlugin extends Plugin {
|
|
5
5
|
#private;
|
|
6
6
|
constructor();
|
|
7
|
-
registerRequestHandlers(handlers:
|
|
8
|
-
get requestHandlers():
|
|
7
|
+
registerRequestHandlers(handlers: RequestHandler[]): void;
|
|
8
|
+
get requestHandlers(): RequestHandler[];
|
|
9
9
|
}
|
|
10
10
|
declare function getMswPlugin(runtime: AbstractRuntime): MswPlugin;
|
|
11
11
|
|
package/dist/mswPlugin.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MswPlugin, getMswPlugin } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { MswPlugin, getMswPlugin } from './chunk-D2TOUDBN.js';
|
|
2
|
+
import './chunk-2J7GQPWR.js';
|
|
3
|
+
import './chunk-JLS7DBDX.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RequestHandler } from 'msw';
|
|
2
2
|
|
|
3
3
|
declare class RequestHandlerRegistry {
|
|
4
4
|
#private;
|
|
5
|
-
add(handlers:
|
|
6
|
-
get handlers():
|
|
5
|
+
add(handlers: RequestHandler[]): void;
|
|
6
|
+
get handlers(): RequestHandler[];
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { RequestHandlerRegistry };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RequestHandlerRegistry } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { RequestHandlerRegistry } from './chunk-2J7GQPWR.js';
|
|
2
|
+
import './chunk-JLS7DBDX.js';
|
package/dist/setMswAsStarted.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { isMswStarted, setMswAsStarted } from './chunk-
|
|
1
|
+
export { __resetMswStatus, isMswStarted, setMswAsStarted } from './chunk-JLS7DBDX.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squide/msw",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "Add support for MSW to @squide federated application shell.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -31,22 +31,27 @@
|
|
|
31
31
|
"react": "*",
|
|
32
32
|
"react-dom": "*"
|
|
33
33
|
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"msw": {
|
|
36
|
+
"optional": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
34
39
|
"devDependencies": {
|
|
35
|
-
"@types/jest": "29.5.
|
|
36
|
-
"@types/react": "18.2.
|
|
37
|
-
"@types/react-dom": "18.2.
|
|
40
|
+
"@types/jest": "29.5.7",
|
|
41
|
+
"@types/react": "18.2.36",
|
|
42
|
+
"@types/react-dom": "18.2.14",
|
|
38
43
|
"@workleap/eslint-plugin": "3.0.0",
|
|
39
44
|
"@workleap/tsup-configs": "3.0.1",
|
|
40
45
|
"@workleap/typescript-configs": "3.0.2",
|
|
41
46
|
"jest": "29.7.0",
|
|
42
|
-
"msw": "
|
|
47
|
+
"msw": "2.0.3",
|
|
43
48
|
"react": "18.2.0",
|
|
44
49
|
"react-dom": "18.2.0",
|
|
45
50
|
"tsup": "7.2.0",
|
|
46
51
|
"typescript": "5.2.2"
|
|
47
52
|
},
|
|
48
53
|
"dependencies": {
|
|
49
|
-
"@squide/core": "2.
|
|
54
|
+
"@squide/core": "2.2.0"
|
|
50
55
|
},
|
|
51
56
|
"sideEffects": false,
|
|
52
57
|
"engines": {
|
package/dist/useIsMswReady.js
DELETED
|
File without changes
|