msw 1.0.0 → 1.1.0
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 +1 -1
- 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 -28
- 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.0",
|
|
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",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"types": "./lib/node/index.d.ts",
|
|
17
17
|
"require": "./lib/node/index.js",
|
|
18
18
|
"default": "./lib/node/index.mjs"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
20
21
|
},
|
|
21
22
|
"bin": {
|
|
22
23
|
"msw": "cli/index.js"
|
|
@@ -24,21 +25,6 @@
|
|
|
24
25
|
"engines": {
|
|
25
26
|
"node": ">=14"
|
|
26
27
|
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"start": "tsup --watch",
|
|
29
|
-
"clean": "rimraf ./lib",
|
|
30
|
-
"lint": "eslint \"{cli,config,src,test}/**/*.ts\"",
|
|
31
|
-
"build": "cross-env NODE_ENV=production tsup",
|
|
32
|
-
"test": "yarn test:unit && yarn test:integration",
|
|
33
|
-
"test:unit": "cross-env BABEL_ENV=test jest --maxWorkers=3",
|
|
34
|
-
"test:integration": "jest --config=./test/jest.config.js --maxWorkers=1",
|
|
35
|
-
"test:smoke": "./config/scripts/smoke.sh",
|
|
36
|
-
"test:ts": "ts-node test/typings/run.ts",
|
|
37
|
-
"prepare": "yarn simple-git-hooks init",
|
|
38
|
-
"prepack": "yarn build",
|
|
39
|
-
"release": "release publish",
|
|
40
|
-
"postinstall": "node -e \"try{require('./config/scripts/postinstall')}catch(e){}\""
|
|
41
|
-
},
|
|
42
28
|
"lint-staged": {
|
|
43
29
|
"**/*.ts": [
|
|
44
30
|
"eslint --fix"
|
|
@@ -111,12 +97,14 @@
|
|
|
111
97
|
"@babel/preset-env": "^7.16.11",
|
|
112
98
|
"@commitlint/cli": "^16.1.0",
|
|
113
99
|
"@commitlint/config-conventional": "^16.0.0",
|
|
114
|
-
"@open-draft/test-server": "^0.2
|
|
100
|
+
"@open-draft/test-server": "^0.4.2",
|
|
115
101
|
"@ossjs/release": "^0.4.0",
|
|
116
|
-
"@
|
|
117
|
-
"@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",
|
|
118
106
|
"@types/fs-extra": "^9.0.13",
|
|
119
|
-
"@types/jest": "
|
|
107
|
+
"@types/jest": "^29.4.0",
|
|
120
108
|
"@types/json-bigint": "^1.0.1",
|
|
121
109
|
"@types/node": "^14.14.31",
|
|
122
110
|
"@types/node-fetch": "^2.5.11",
|
|
@@ -129,12 +117,15 @@
|
|
|
129
117
|
"cross-env": "^7.0.3",
|
|
130
118
|
"cross-fetch": "^3.1.5",
|
|
131
119
|
"cz-conventional-changelog": "3.3.0",
|
|
120
|
+
"esbuild-loader": "^2.21.0",
|
|
132
121
|
"eslint": "^7.30.0",
|
|
133
122
|
"eslint-config-prettier": "^8.3.0",
|
|
134
123
|
"eslint-plugin-prettier": "^3.4.0",
|
|
124
|
+
"express": "^4.18.2",
|
|
135
125
|
"fs-extra": "^10.0.0",
|
|
136
126
|
"fs-teardown": "^0.3.0",
|
|
137
|
-
"jest": "
|
|
127
|
+
"jest": "^29.4.3",
|
|
128
|
+
"jest-environment-jsdom": "^29.4.3",
|
|
138
129
|
"json-bigint": "^1.0.0",
|
|
139
130
|
"lint-staged": "^13.0.3",
|
|
140
131
|
"page-with": "^0.5.0",
|
|
@@ -143,13 +134,13 @@
|
|
|
143
134
|
"rimraf": "^3.0.2",
|
|
144
135
|
"simple-git-hooks": "^2.8.0",
|
|
145
136
|
"statuses": "^2.0.0",
|
|
146
|
-
"ts-
|
|
147
|
-
"ts-node": "^10.1.0",
|
|
137
|
+
"ts-node": "^10.9.1",
|
|
148
138
|
"tsup": "^5.12.8",
|
|
149
139
|
"typescript": "^4.9.3",
|
|
150
140
|
"url-loader": "^4.1.1",
|
|
151
141
|
"webpack": "^5.68.0",
|
|
152
|
-
"webpack-dev-server": "^3.11.2"
|
|
142
|
+
"webpack-dev-server": "^3.11.2",
|
|
143
|
+
"webpack-http-server": "^0.5.0"
|
|
153
144
|
},
|
|
154
145
|
"peerDependencies": {
|
|
155
146
|
"typescript": ">= 4.4.x <= 4.9.x"
|
|
@@ -168,8 +159,21 @@
|
|
|
168
159
|
}
|
|
169
160
|
},
|
|
170
161
|
"simple-git-hooks": {
|
|
171
|
-
"pre-commit": "
|
|
172
|
-
"prepare-commit-msg": "grep -qE '^[^#]' .git/COMMIT_EDITMSG || (exec < /dev/tty &&
|
|
173
|
-
"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){}\""
|
|
174
178
|
}
|
|
175
179
|
}
|
package/CHANGELOG.md
DELETED