msw 0.39.1 → 0.40.1
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 +4 -0
- package/lib/esm/graphql-deps.js +4 -10
- package/lib/esm/graphql.js +2 -2
- package/lib/esm/index.js +82 -26
- package/lib/esm/{RequestHandler-deps.js → matchRequestUrl-deps.js} +192 -173
- package/lib/esm/mockServiceWorker.js +1 -1
- package/lib/esm/rest-deps.js +4 -10
- package/lib/esm/rest.js +1 -1
- package/lib/iife/index.js +2 -2
- package/lib/iife/mockServiceWorker.js +1 -1
- package/lib/types/handlers/GraphQLHandler.d.ts +2 -10
- package/lib/types/handlers/RequestHandler.d.ts +18 -8
- package/lib/types/handlers/RestHandler.d.ts +5 -9
- package/lib/types/index.d.ts +1 -1
- package/lib/types/native/index.d.ts +1 -1
- package/lib/types/node/setupServer.d.ts +1 -1
- package/lib/types/response.d.ts +4 -2
- package/lib/types/rest.d.ts +9 -9
- package/lib/types/setupWorker/glossary.d.ts +1 -0
- package/lib/types/setupWorker/start/utils/printStartMessage.d.ts +3 -2
- package/lib/types/sharedOptions.d.ts +1 -0
- package/lib/types/utils/getResponse.d.ts +1 -1
- package/lib/types/utils/handleRequest.d.ts +2 -2
- package/lib/types/utils/internal/requestHandlerUtils.d.ts +1 -1
- package/lib/types/utils/logging/prepareRequest.d.ts +2 -1
- package/lib/types/utils/matching/matchRequestUrl.d.ts +3 -1
- package/lib/types/utils/request/setRequestCookies.d.ts +7 -0
- package/lib/umd/index.js +274 -211
- package/lib/umd/mockServiceWorker.js +1 -1
- package/native/lib/index.js +789 -729
- package/native/package.json +1 -1
- package/node/lib/index.js +789 -729
- package/node/package.json +1 -1
- package/package.json +19 -9
package/node/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "msw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.1",
|
|
4
4
|
"description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
|
|
5
5
|
"main": "lib/umd/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -9,21 +9,23 @@
|
|
|
9
9
|
"msw": "cli/index.js"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
12
|
-
"node": ">=
|
|
12
|
+
"node": ">=14"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"start": "cross-env NODE_ENV=development rollup -c rollup.config.ts -w",
|
|
16
16
|
"clean": "rimraf lib {native,node}/lib",
|
|
17
17
|
"lint": "eslint \"{cli,config,src,test}/**/*.ts\"",
|
|
18
|
-
"
|
|
18
|
+
"prebuild": "yarn clean && yarn lint",
|
|
19
|
+
"build": "cross-env NODE_ENV=production rollup -c rollup.config.ts",
|
|
20
|
+
"postbuild": "yarn test:ts",
|
|
19
21
|
"test": "yarn test:unit && yarn test:integration",
|
|
20
22
|
"test:unit": "cross-env BABEL_ENV=test jest --maxWorkers=3",
|
|
21
23
|
"test:integration": "jest --config=test/jest.config.js --maxWorkers=1",
|
|
22
24
|
"test:smoke": "config/scripts/smoke.sh",
|
|
23
|
-
"test:ts": "tsc -p test/typings/tsconfig.json",
|
|
25
|
+
"test:ts": "yarn tsc -p test/typings/tsconfig.json",
|
|
24
26
|
"prepare": "yarn simple-git-hooks init",
|
|
25
27
|
"prepack": "yarn build",
|
|
26
|
-
"release": "
|
|
28
|
+
"release": "release publish",
|
|
27
29
|
"postinstall": "node -e \"try{require('./config/scripts/postinstall')}catch(e){}\""
|
|
28
30
|
},
|
|
29
31
|
"lint-staged": {
|
|
@@ -67,8 +69,8 @@
|
|
|
67
69
|
],
|
|
68
70
|
"sideEffects": false,
|
|
69
71
|
"dependencies": {
|
|
70
|
-
"@mswjs/cookies": "^0.
|
|
71
|
-
"@mswjs/interceptors": "^0.
|
|
72
|
+
"@mswjs/cookies": "^0.2.0",
|
|
73
|
+
"@mswjs/interceptors": "^0.15.1",
|
|
72
74
|
"@open-draft/until": "^1.0.3",
|
|
73
75
|
"@types/cookie": "^0.4.1",
|
|
74
76
|
"@types/js-levenshtein": "^1.1.1",
|
|
@@ -93,6 +95,7 @@
|
|
|
93
95
|
"@commitlint/cli": "^16.1.0",
|
|
94
96
|
"@commitlint/config-conventional": "^16.0.0",
|
|
95
97
|
"@open-draft/test-server": "^0.2.3",
|
|
98
|
+
"@ossjs/release": "^0.3.0",
|
|
96
99
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
97
100
|
"@rollup/plugin-inject": "^4.0.4",
|
|
98
101
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -128,7 +131,6 @@
|
|
|
128
131
|
"rollup": "^2.67.2",
|
|
129
132
|
"rollup-plugin-terser": "^7.0.2",
|
|
130
133
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
131
|
-
"semantic-release": "^19.0.2",
|
|
132
134
|
"simple-git-hooks": "^2.7.0",
|
|
133
135
|
"ts-jest": "26",
|
|
134
136
|
"ts-loader": "^9.2.6",
|
|
@@ -138,6 +140,14 @@
|
|
|
138
140
|
"webpack": "^5.68.0",
|
|
139
141
|
"webpack-dev-server": "^3.11.2"
|
|
140
142
|
},
|
|
143
|
+
"peerDependencies": {
|
|
144
|
+
"typescript": "4.2.x || 4.3.x"
|
|
145
|
+
},
|
|
146
|
+
"peerDependenciesMeta": {
|
|
147
|
+
"typescript": {
|
|
148
|
+
"optional": true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
141
151
|
"resolutions": {
|
|
142
152
|
"chokidar": "3.4.1"
|
|
143
153
|
},
|
|
@@ -146,4 +156,4 @@
|
|
|
146
156
|
"path": "./node_modules/cz-conventional-changelog"
|
|
147
157
|
}
|
|
148
158
|
}
|
|
149
|
-
}
|
|
159
|
+
}
|