Skip to content

Commit 61dd37d

Browse files
committed
Merge branch 'main' into feat/3.0
2 parents d03cf86 + 20521b9 commit 61dd37d

115 files changed

Lines changed: 3348 additions & 2207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.oxlintrc.json

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["unicorn", "typescript"],
4+
"categories": {
5+
"correctness": "off"
6+
},
7+
"env": {
8+
"builtin": true
9+
},
10+
"ignorePatterns": ["/lib", "/node", "/native", "/config"],
11+
"rules": {
12+
"constructor-super": "error",
13+
"for-direction": "error",
14+
"no-case-declarations": "error",
15+
"no-class-assign": "error",
16+
"no-compare-neg-zero": "error",
17+
"no-cond-assign": "error",
18+
"no-const-assign": "error",
19+
"no-constant-binary-expression": "error",
20+
"no-constant-condition": "error",
21+
"no-debugger": "error",
22+
"no-delete-var": "error",
23+
"no-dupe-class-members": "error",
24+
"no-dupe-else-if": "error",
25+
"no-dupe-keys": "error",
26+
"no-duplicate-case": "error",
27+
"no-empty": "error",
28+
"no-empty-character-class": "error",
29+
"no-empty-static-block": "error",
30+
"no-ex-assign": "error",
31+
"no-extra-boolean-cast": "error",
32+
"no-fallthrough": "error",
33+
"no-func-assign": "error",
34+
"no-global-assign": "error",
35+
"no-import-assign": "error",
36+
"no-invalid-regexp": "error",
37+
"no-irregular-whitespace": "error",
38+
"no-loss-of-precision": "error",
39+
"no-misleading-character-class": "error",
40+
"no-new-native-nonconstructor": "error",
41+
"no-nonoctal-decimal-escape": "error",
42+
"no-obj-calls": "error",
43+
"no-prototype-builtins": "error",
44+
"no-redeclare": "error",
45+
"no-regex-spaces": "error",
46+
"no-self-assign": "error",
47+
"no-setter-return": "error",
48+
"no-shadow-restricted-names": "error",
49+
"no-sparse-arrays": "error",
50+
"no-this-before-super": "error",
51+
"no-unsafe-finally": "error",
52+
"no-unsafe-negation": "error",
53+
"no-unsafe-optional-chaining": "error",
54+
"no-unused-labels": "error",
55+
"no-unused-private-class-members": "error",
56+
"no-unused-vars": [
57+
"error",
58+
{
59+
"varsIgnorePattern": "^_",
60+
"argsIgnorePattern": "^_"
61+
}
62+
],
63+
"no-useless-backreference": "error",
64+
"no-useless-catch": "error",
65+
"no-useless-escape": "error",
66+
"no-with": "error",
67+
"use-isnan": "error",
68+
"valid-typeof": "error",
69+
"no-array-constructor": "error",
70+
"no-unused-expressions": "error",
71+
"no-console": [
72+
"error",
73+
{
74+
"allow": ["warn", "error", "group", "groupCollapsed", "groupEnd"]
75+
}
76+
],
77+
"typescript/no-duplicate-enum-values": "error",
78+
"typescript/no-extra-non-null-assertion": "error",
79+
"typescript/no-misused-new": "error",
80+
"typescript/no-namespace": [
81+
"error",
82+
{
83+
"allowDeclarations": true
84+
}
85+
],
86+
"typescript/no-non-null-asserted-optional-chain": "error",
87+
"typescript/no-require-imports": "error",
88+
"typescript/no-this-alias": "error",
89+
"typescript/no-unnecessary-type-constraint": "error",
90+
"typescript/no-unsafe-declaration-merging": "error",
91+
"typescript/no-unsafe-function-type": "error",
92+
"typescript/no-wrapper-object-types": "error",
93+
"typescript/prefer-as-const": "error",
94+
"typescript/prefer-namespace-keyword": "error",
95+
"typescript/triple-slash-reference": "error",
96+
"typescript/prefer-ts-expect-error": "error"
97+
},
98+
"overrides": [
99+
{
100+
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
101+
"rules": {
102+
"constructor-super": "off",
103+
"no-class-assign": "off",
104+
"no-const-assign": "off",
105+
"no-dupe-class-members": "off",
106+
"no-dupe-keys": "off",
107+
"no-func-assign": "off",
108+
"no-import-assign": "off",
109+
"no-new-native-nonconstructor": "off",
110+
"no-obj-calls": "off",
111+
"no-redeclare": "off",
112+
"no-setter-return": "off",
113+
"no-this-before-super": "off",
114+
"no-unsafe-negation": "off",
115+
"no-var": "error",
116+
"no-with": "off",
117+
"prefer-const": "error",
118+
"prefer-rest-params": "error",
119+
"prefer-spread": "error"
120+
}
121+
},
122+
{
123+
"files": [
124+
"**/*.test.ts",
125+
"**/*.test-d.ts",
126+
"**/*.mocks.ts",
127+
"**/*.setup.ts",
128+
"**/*.config.ts",
129+
"**/*.fixture.js",
130+
"**/*.fixture.ts"
131+
],
132+
"rules": {
133+
"no-console": "off",
134+
"no-unused-vars": "off",
135+
"typescript/prefer-ts-expect-error": "off"
136+
}
137+
},
138+
{
139+
"files": ["**/*.test-d.ts"],
140+
"rules": {
141+
"no-unused-expressions": "off"
142+
}
143+
}
144+
]
145+
}

cli/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,5 +222,5 @@ function promptWorkerDirectoryUpdate(message, packageJsonPath, publicDir) {
222222
* @returns {string}
223223
*/
224224
function normalizePath(input) {
225-
return input.replace(/[\\|\/]+/g, path.sep)
225+
return input.replace(/[\\|/]+/g, path.sep)
226226
}

eslint.config.mjs

Lines changed: 0 additions & 74 deletions
This file was deleted.

package.json

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "msw",
3-
"version": "2.12.14",
3+
"version": "2.13.4",
44
"description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
55
"type": "commonjs",
66
"main": "./lib/core/index.js",
@@ -179,7 +179,7 @@
179179
"scripts": {
180180
"start": "tsup --watch",
181181
"clean": "rimraf ./lib",
182-
"lint": "eslint \"{cli,src,test}/**/*.ts\"",
182+
"lint": "oxlint ./cli ./src ./test",
183183
"build": "pnpm clean && cross-env NODE_ENV=production tsup && pnpm patch:dts",
184184
"patch:dts": "node \"./config/scripts/patch-ts.js\"",
185185
"publint": "publint",
@@ -200,7 +200,7 @@
200200
},
201201
"lint-staged": {
202202
"**/*.ts": [
203-
"eslint --fix"
203+
"oxlint --fix"
204204
],
205205
"**/*.{ts,json}": [
206206
"prettier --write"
@@ -245,77 +245,70 @@
245245
],
246246
"sideEffects": false,
247247
"dependencies": {
248-
"@inquirer/confirm": "^5.0.0",
248+
"@inquirer/confirm": "^6.0.11",
249249
"@msw/url": "^0.1.0",
250-
"@mswjs/interceptors": "^0.41.2",
251-
"@open-draft/deferred-promise": "^2.2.0",
250+
"@mswjs/interceptors": "^0.41.3",
251+
"@open-draft/deferred-promise": "^3.0.0",
252252
"@types/statuses": "^2.0.6",
253-
"cookie": "^1.0.2",
254-
"graphql": "^16.12.0",
255-
"headers-polyfill": "^4.0.2",
253+
"cookie": "^1.1.1",
254+
"graphql": "^16.13.2",
255+
"headers-polyfill": "^5.0.1",
256256
"is-node-process": "^1.2.0",
257257
"outvariant": "^1.4.3",
258258
"picocolors": "^1.1.1",
259-
"rettime": "^0.10.1",
259+
"rettime": "^0.11.7",
260260
"statuses": "^2.0.2",
261261
"strict-event-emitter": "^0.5.1",
262-
"tough-cookie": "^6.0.0",
263-
"type-fest": "^5.2.0",
262+
"tough-cookie": "^6.0.1",
263+
"type-fest": "^5.5.0",
264264
"until-async": "^3.0.2",
265265
"yargs": "^17.7.2"
266266
},
267267
"devDependencies": {
268-
"@commitlint/cli": "^20.1.0",
269-
"@commitlint/config-conventional": "^20.0.0",
268+
"@commitlint/cli": "^20.5.0",
269+
"@commitlint/config-conventional": "^20.5.0",
270270
"@epic-web/test-server": "^0.1.6",
271-
"@eslint/eslintrc": "^3.3.1",
272-
"@eslint/js": "^9.39.1",
273271
"@fastify/websocket": "^11.2.0",
274272
"@graphql-typed-document-node/core": "^3.2.0",
275273
"@open-draft/test-server": "^0.4.2",
276274
"@ossjs/release": "^0.10.1",
277-
"@playwright/test": "^1.50.1",
278-
"@types/express": "^5.0.5",
275+
"@playwright/test": "^1.59.1",
276+
"@types/express": "^5.0.6",
279277
"@types/json-bigint": "^1.0.4",
280-
"@types/node": "~20.19.25",
281-
"@types/serviceworker": "^0.0.167",
282-
"@typescript-eslint/eslint-plugin": "^8.47.0",
283-
"@typescript-eslint/parser": "^8.47.0",
278+
"@types/node": "~22.19.17",
279+
"@types/serviceworker": "^0.0.194",
284280
"@web/dev-server": "^0.4.6",
285-
"axios": "^1.13.5",
281+
"axios": "^1.15.0",
286282
"babel-minify": "^0.5.1",
287283
"commitizen": "^4.3.1",
288284
"cross-env": "^10.1.0",
289285
"cross-fetch": "^4.1.0",
290286
"cz-conventional-changelog": "3.3.0",
291-
"esbuild": "^0.27.0",
292-
"esbuild-loader": "^4.4.0",
293-
"eslint": "^9.39.1",
294-
"eslint-config-prettier": "^10.1.8",
295-
"eslint-plugin-prettier": "^5.5.4",
296-
"express": "^5.1.0",
297-
"fastify": "^5.6.2",
287+
"esbuild": "^0.28.0",
288+
"esbuild-loader": "^4.4.3",
289+
"express": "^5.2.1",
290+
"fastify": "^5.8.5",
298291
"fs-teardown": "^0.3.0",
299-
"glob": "^13.0.0",
292+
"glob": "^13.0.6",
300293
"jsdom": "^25.0.1",
301294
"json-bigint": "^1.0.0",
302-
"knip": "^5.70.1",
303-
"lint-staged": "^15.2.10",
304-
"msw": "workspace:*",
295+
"knip": "^6.4.1",
296+
"lint-staged": "^16.4.0",
297+
"msw": "workspace:^",
298+
"oxlint": "^1.0.0",
305299
"page-with": "^0.6.1",
306-
"prettier": "^3.6.2",
307-
"publint": "^0.3.15",
300+
"prettier": "^3.8.3",
301+
"publint": "^0.3.18",
308302
"regenerator-runtime": "^0.14.1",
309-
"rimraf": "^6.1.2",
303+
"rimraf": "^6.1.3",
310304
"simple-git-hooks": "^2.13.1",
311305
"tsup": "^8.5.1",
312306
"typescript": "^5.9.3",
313-
"typescript-eslint": "^8.47.0",
314-
"undici": "^7.16.0",
307+
"undici": "^8.1.0",
315308
"url-loader": "^4.1.1",
316-
"vitest": "^4.0.13",
309+
"vitest": "^4.1.4",
317310
"vitest-environment-miniflare": "^2.14.4",
318-
"webpack": "^5.95.0",
311+
"webpack": "^5.106.2",
319312
"webpack-http-server": "^0.5.0"
320313
},
321314
"peerDependencies": {

0 commit comments

Comments
 (0)