msw 1.0.1 → 1.1.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/cli/init.js +0 -0
- package/config/scripts/postinstall.js +0 -0
- package/lib/{SetupServerApi-39df862c.d.ts → SetupServerApi-1855d9c6.d.ts} +1 -1
- package/lib/iife/index.js +1510 -1442
- package/lib/iife/index.js.map +1 -1
- package/lib/index.d.ts +19 -19
- package/lib/index.js +547 -345
- package/lib/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/lib/native/index.d.ts +1 -1
- package/lib/native/index.js +329 -248
- package/lib/native/index.mjs +328 -248
- package/lib/node/index.d.ts +3 -4
- package/lib/node/index.js +334 -249
- package/lib/node/index.js.map +1 -1
- package/lib/node/index.mjs +333 -249
- package/lib/node/index.mjs.map +1 -1
- package/package.json +32 -29
- package/CHANGELOG.md +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "msw",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -25,21 +25,6 @@
|
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=14"
|
|
27
27
|
},
|
|
28
|
-
"scripts": {
|
|
29
|
-
"start": "tsup --watch",
|
|
30
|
-
"clean": "rimraf ./lib",
|
|
31
|
-
"lint": "eslint \"{cli,config,src,test}/**/*.ts\"",
|
|
32
|
-
"build": "cross-env NODE_ENV=production tsup",
|
|
33
|
-
"test": "yarn test:unit && yarn test:integration",
|
|
34
|
-
"test:unit": "cross-env BABEL_ENV=test jest --maxWorkers=3",
|
|
35
|
-
"test:integration": "jest --config=./test/jest.config.js --maxWorkers=1",
|
|
36
|
-
"test:smoke": "./config/scripts/smoke.sh",
|
|
37
|
-
"test:ts": "ts-node test/typings/run.ts",
|
|
38
|
-
"prepare": "yarn simple-git-hooks init",
|
|
39
|
-
"prepack": "yarn build",
|
|
40
|
-
"release": "release publish",
|
|
41
|
-
"postinstall": "node -e \"try{require('./config/scripts/postinstall')}catch(e){}\""
|
|
42
|
-
},
|
|
43
28
|
"lint-staged": {
|
|
44
29
|
"**/*.ts": [
|
|
45
30
|
"eslint --fix"
|
|
@@ -112,12 +97,14 @@
|
|
|
112
97
|
"@babel/preset-env": "^7.16.11",
|
|
113
98
|
"@commitlint/cli": "^16.1.0",
|
|
114
99
|
"@commitlint/config-conventional": "^16.0.0",
|
|
115
|
-
"@open-draft/test-server": "^0.2
|
|
100
|
+
"@open-draft/test-server": "^0.4.2",
|
|
116
101
|
"@ossjs/release": "^0.4.0",
|
|
117
|
-
"@
|
|
118
|
-
"@swc/
|
|
102
|
+
"@playwright/test": "^1.30.0",
|
|
103
|
+
"@swc/core": "^1.3.35",
|
|
104
|
+
"@swc/jest": "^0.2.24",
|
|
105
|
+
"@types/express": "^4.17.17",
|
|
119
106
|
"@types/fs-extra": "^9.0.13",
|
|
120
|
-
"@types/jest": "
|
|
107
|
+
"@types/jest": "^29.4.0",
|
|
121
108
|
"@types/json-bigint": "^1.0.1",
|
|
122
109
|
"@types/node": "^14.14.31",
|
|
123
110
|
"@types/node-fetch": "^2.5.11",
|
|
@@ -130,12 +117,15 @@
|
|
|
130
117
|
"cross-env": "^7.0.3",
|
|
131
118
|
"cross-fetch": "^3.1.5",
|
|
132
119
|
"cz-conventional-changelog": "3.3.0",
|
|
120
|
+
"esbuild-loader": "^2.21.0",
|
|
133
121
|
"eslint": "^7.30.0",
|
|
134
122
|
"eslint-config-prettier": "^8.3.0",
|
|
135
123
|
"eslint-plugin-prettier": "^3.4.0",
|
|
124
|
+
"express": "^4.18.2",
|
|
136
125
|
"fs-extra": "^10.0.0",
|
|
137
126
|
"fs-teardown": "^0.3.0",
|
|
138
|
-
"jest": "
|
|
127
|
+
"jest": "^29.4.3",
|
|
128
|
+
"jest-environment-jsdom": "^29.4.3",
|
|
139
129
|
"json-bigint": "^1.0.0",
|
|
140
130
|
"lint-staged": "^13.0.3",
|
|
141
131
|
"page-with": "^0.5.0",
|
|
@@ -144,16 +134,16 @@
|
|
|
144
134
|
"rimraf": "^3.0.2",
|
|
145
135
|
"simple-git-hooks": "^2.8.0",
|
|
146
136
|
"statuses": "^2.0.0",
|
|
147
|
-
"ts-
|
|
148
|
-
"ts-node": "^10.1.0",
|
|
137
|
+
"ts-node": "^10.9.1",
|
|
149
138
|
"tsup": "^5.12.8",
|
|
150
|
-
"typescript": "^
|
|
139
|
+
"typescript": "^5.0.2",
|
|
151
140
|
"url-loader": "^4.1.1",
|
|
152
141
|
"webpack": "^5.68.0",
|
|
153
|
-
"webpack-dev-server": "^3.11.2"
|
|
142
|
+
"webpack-dev-server": "^3.11.2",
|
|
143
|
+
"webpack-http-server": "^0.5.0"
|
|
154
144
|
},
|
|
155
145
|
"peerDependencies": {
|
|
156
|
-
"typescript": ">= 4.4.x <=
|
|
146
|
+
"typescript": ">= 4.4.x <= 5.0.x"
|
|
157
147
|
},
|
|
158
148
|
"peerDependenciesMeta": {
|
|
159
149
|
"typescript": {
|
|
@@ -169,8 +159,21 @@
|
|
|
169
159
|
}
|
|
170
160
|
},
|
|
171
161
|
"simple-git-hooks": {
|
|
172
|
-
"pre-commit": "
|
|
173
|
-
"prepare-commit-msg": "grep -qE '^[^#]' .git/COMMIT_EDITMSG || (exec < /dev/tty &&
|
|
174
|
-
"commit-msg": "
|
|
162
|
+
"pre-commit": "pnpm lint-staged",
|
|
163
|
+
"prepare-commit-msg": "grep -qE '^[^#]' .git/COMMIT_EDITMSG || (exec < /dev/tty && pnpm cz --hook || true)",
|
|
164
|
+
"commit-msg": "pnpm commitlint --edit $1"
|
|
165
|
+
},
|
|
166
|
+
"scripts": {
|
|
167
|
+
"start": "tsup --watch",
|
|
168
|
+
"clean": "rimraf ./lib",
|
|
169
|
+
"lint": "eslint \"{cli,config,src,test}/**/*.ts\"",
|
|
170
|
+
"build": "cross-env NODE_ENV=production tsup",
|
|
171
|
+
"test": "pnpm test:unit && pnpm test:node && pnpm test:browser",
|
|
172
|
+
"test:unit": "cross-env BABEL_ENV=test jest --maxWorkers=3",
|
|
173
|
+
"test:node": "jest --config=./test/jest.config.js",
|
|
174
|
+
"test:browser": "playwright test -c ./test/browser/playwright.config.ts",
|
|
175
|
+
"test:ts": "ts-node test/typings/run.ts",
|
|
176
|
+
"release": "release publish",
|
|
177
|
+
"postinstall": "node -e \"try{require('./config/scripts/postinstall')}catch(e){}\""
|
|
175
178
|
}
|
|
176
179
|
}
|
package/CHANGELOG.md
DELETED