mirror of
https://github.com/hanzoai/msw.git
synced 2026-09-24 17:00:34 +00:00
fix: update dependencies (#2719)
This commit is contained in:
committed by
GitHub
parent
936ed250fd
commit
f125c652af
+145
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["unicorn", "typescript"],
|
||||
"categories": {
|
||||
"correctness": "off"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true
|
||||
},
|
||||
"ignorePatterns": ["/lib", "/node", "/native", "/config"],
|
||||
"rules": {
|
||||
"constructor-super": "error",
|
||||
"for-direction": "error",
|
||||
"no-case-declarations": "error",
|
||||
"no-class-assign": "error",
|
||||
"no-compare-neg-zero": "error",
|
||||
"no-cond-assign": "error",
|
||||
"no-const-assign": "error",
|
||||
"no-constant-binary-expression": "error",
|
||||
"no-constant-condition": "error",
|
||||
"no-debugger": "error",
|
||||
"no-delete-var": "error",
|
||||
"no-dupe-class-members": "error",
|
||||
"no-dupe-else-if": "error",
|
||||
"no-dupe-keys": "error",
|
||||
"no-duplicate-case": "error",
|
||||
"no-empty": "error",
|
||||
"no-empty-character-class": "error",
|
||||
"no-empty-static-block": "error",
|
||||
"no-ex-assign": "error",
|
||||
"no-extra-boolean-cast": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-func-assign": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-import-assign": "error",
|
||||
"no-invalid-regexp": "error",
|
||||
"no-irregular-whitespace": "error",
|
||||
"no-loss-of-precision": "error",
|
||||
"no-misleading-character-class": "error",
|
||||
"no-new-native-nonconstructor": "error",
|
||||
"no-nonoctal-decimal-escape": "error",
|
||||
"no-obj-calls": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-redeclare": "error",
|
||||
"no-regex-spaces": "error",
|
||||
"no-self-assign": "error",
|
||||
"no-setter-return": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-sparse-arrays": "error",
|
||||
"no-this-before-super": "error",
|
||||
"no-unsafe-finally": "error",
|
||||
"no-unsafe-negation": "error",
|
||||
"no-unsafe-optional-chaining": "error",
|
||||
"no-unused-labels": "error",
|
||||
"no-unused-private-class-members": "error",
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"varsIgnorePattern": "^_",
|
||||
"argsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"no-useless-backreference": "error",
|
||||
"no-useless-catch": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-with": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": ["warn", "error", "group", "groupCollapsed", "groupEnd"]
|
||||
}
|
||||
],
|
||||
"typescript/no-duplicate-enum-values": "error",
|
||||
"typescript/no-extra-non-null-assertion": "error",
|
||||
"typescript/no-misused-new": "error",
|
||||
"typescript/no-namespace": [
|
||||
"error",
|
||||
{
|
||||
"allowDeclarations": true
|
||||
}
|
||||
],
|
||||
"typescript/no-non-null-asserted-optional-chain": "error",
|
||||
"typescript/no-require-imports": "error",
|
||||
"typescript/no-this-alias": "error",
|
||||
"typescript/no-unnecessary-type-constraint": "error",
|
||||
"typescript/no-unsafe-declaration-merging": "error",
|
||||
"typescript/no-unsafe-function-type": "error",
|
||||
"typescript/no-wrapper-object-types": "error",
|
||||
"typescript/prefer-as-const": "error",
|
||||
"typescript/prefer-namespace-keyword": "error",
|
||||
"typescript/triple-slash-reference": "error",
|
||||
"typescript/prefer-ts-expect-error": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
|
||||
"rules": {
|
||||
"constructor-super": "off",
|
||||
"no-class-assign": "off",
|
||||
"no-const-assign": "off",
|
||||
"no-dupe-class-members": "off",
|
||||
"no-dupe-keys": "off",
|
||||
"no-func-assign": "off",
|
||||
"no-import-assign": "off",
|
||||
"no-new-native-nonconstructor": "off",
|
||||
"no-obj-calls": "off",
|
||||
"no-redeclare": "off",
|
||||
"no-setter-return": "off",
|
||||
"no-this-before-super": "off",
|
||||
"no-unsafe-negation": "off",
|
||||
"no-var": "error",
|
||||
"no-with": "off",
|
||||
"prefer-const": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"**/*.test.ts",
|
||||
"**/*.test-d.ts",
|
||||
"**/*.mocks.ts",
|
||||
"**/*.setup.ts",
|
||||
"**/*.config.ts",
|
||||
"**/*.fixture.js",
|
||||
"**/*.fixture.ts"
|
||||
],
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"no-unused-vars": "off",
|
||||
"typescript/prefer-ts-expect-error": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["**/*.test-d.ts"],
|
||||
"rules": {
|
||||
"no-unused-expressions": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
-1
@@ -222,5 +222,5 @@ function promptWorkerDirectoryUpdate(message, packageJsonPath, publicDir) {
|
||||
* @returns {string}
|
||||
*/
|
||||
function normalizePath(input) {
|
||||
return input.replace(/[\\|\/]+/g, path.sep)
|
||||
return input.replace(/[\\|/]+/g, path.sep)
|
||||
}
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
// @ts-check
|
||||
|
||||
import eslint from '@eslint/js'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import eslintConfigPrettier from 'eslint-config-prettier'
|
||||
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended'
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
},
|
||||
},
|
||||
ignores: ['/lib', '/node', '/native', '/config', '/test'],
|
||||
rules: {
|
||||
'no-console': [
|
||||
'error',
|
||||
{
|
||||
allow: ['warn', 'error', 'group', 'groupCollapsed', 'groupEnd'],
|
||||
},
|
||||
],
|
||||
'no-async-promise-executor': 'off',
|
||||
'require-yield': 'off',
|
||||
'no-empty-pattern': 'off',
|
||||
'no-control-regex': 'off',
|
||||
'@typescript-eslint/no-empty-object-type': 'off',
|
||||
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/no-namespace': [
|
||||
'error',
|
||||
{
|
||||
allowDeclarations: true,
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
varsIgnorePattern: '^_',
|
||||
argsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// Unused variables are useful in test files, and type test files
|
||||
{
|
||||
files: [
|
||||
'**/*.test.ts',
|
||||
'**/*.test-d.ts',
|
||||
'**/*.mocks.ts',
|
||||
'**/*.setup.ts',
|
||||
'**/*.config.ts',
|
||||
],
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'@typescript-eslint/prefer-ts-expect-error': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.test-d.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-expressions': 'off',
|
||||
},
|
||||
},
|
||||
eslintPluginPrettier,
|
||||
)
|
||||
+32
-39
@@ -179,7 +179,7 @@
|
||||
"scripts": {
|
||||
"start": "tsup --watch",
|
||||
"clean": "rimraf ./lib",
|
||||
"lint": "eslint \"{cli,src,test}/**/*.ts\"",
|
||||
"lint": "oxlint ./cli ./src ./test",
|
||||
"build": "pnpm clean && cross-env NODE_ENV=production tsup && pnpm patch:dts",
|
||||
"patch:dts": "node \"./config/scripts/patch-ts.js\"",
|
||||
"publint": "publint",
|
||||
@@ -200,7 +200,7 @@
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.ts": [
|
||||
"eslint --fix"
|
||||
"oxlint --fix"
|
||||
],
|
||||
"**/*.{ts,json}": [
|
||||
"prettier --write"
|
||||
@@ -245,13 +245,13 @@
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@inquirer/confirm": "^5.0.0",
|
||||
"@mswjs/interceptors": "^0.41.2",
|
||||
"@open-draft/deferred-promise": "^2.2.0",
|
||||
"@inquirer/confirm": "^6.0.11",
|
||||
"@mswjs/interceptors": "^0.41.3",
|
||||
"@open-draft/deferred-promise": "^3.0.0",
|
||||
"@types/statuses": "^2.0.6",
|
||||
"cookie": "^1.0.2",
|
||||
"graphql": "^16.12.0",
|
||||
"headers-polyfill": "^4.0.2",
|
||||
"cookie": "^1.1.1",
|
||||
"graphql": "^16.13.2",
|
||||
"headers-polyfill": "^5.0.1",
|
||||
"is-node-process": "^1.2.0",
|
||||
"outvariant": "^1.4.3",
|
||||
"path-to-regexp": "^6.3.0",
|
||||
@@ -259,63 +259,56 @@
|
||||
"rettime": "^0.11.7",
|
||||
"statuses": "^2.0.2",
|
||||
"strict-event-emitter": "^0.5.1",
|
||||
"tough-cookie": "^6.0.0",
|
||||
"type-fest": "^5.2.0",
|
||||
"tough-cookie": "^6.0.1",
|
||||
"type-fest": "^5.5.0",
|
||||
"until-async": "^3.0.2",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^20.1.0",
|
||||
"@commitlint/config-conventional": "^20.0.0",
|
||||
"@commitlint/cli": "^20.5.0",
|
||||
"@commitlint/config-conventional": "^20.5.0",
|
||||
"@epic-web/test-server": "^0.1.6",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@fastify/websocket": "^11.2.0",
|
||||
"@graphql-typed-document-node/core": "^3.2.0",
|
||||
"@open-draft/test-server": "^0.4.2",
|
||||
"@ossjs/release": "^0.10.1",
|
||||
"@playwright/test": "^1.50.1",
|
||||
"@types/express": "^5.0.5",
|
||||
"@playwright/test": "^1.59.1",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/json-bigint": "^1.0.4",
|
||||
"@types/node": "~20.19.25",
|
||||
"@types/serviceworker": "^0.0.167",
|
||||
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
||||
"@typescript-eslint/parser": "^8.47.0",
|
||||
"@types/node": "~22.19.17",
|
||||
"@types/serviceworker": "^0.0.194",
|
||||
"@web/dev-server": "^0.4.6",
|
||||
"axios": "^1.13.5",
|
||||
"axios": "^1.15.0",
|
||||
"babel-minify": "^0.5.1",
|
||||
"commitizen": "^4.3.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"cross-fetch": "^4.1.0",
|
||||
"cz-conventional-changelog": "3.3.0",
|
||||
"esbuild": "^0.27.0",
|
||||
"esbuild-loader": "^4.4.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"express": "^5.1.0",
|
||||
"fastify": "^5.6.2",
|
||||
"esbuild": "^0.28.0",
|
||||
"esbuild-loader": "^4.4.3",
|
||||
"express": "^5.2.1",
|
||||
"fastify": "^5.8.5",
|
||||
"fs-teardown": "^0.3.0",
|
||||
"glob": "^13.0.0",
|
||||
"glob": "^13.0.6",
|
||||
"jsdom": "^25.0.1",
|
||||
"json-bigint": "^1.0.0",
|
||||
"knip": "^5.70.1",
|
||||
"lint-staged": "^15.2.10",
|
||||
"msw": "workspace:*",
|
||||
"knip": "^6.4.1",
|
||||
"lint-staged": "^16.4.0",
|
||||
"msw": "workspace:^",
|
||||
"oxlint": "^1.0.0",
|
||||
"page-with": "^0.6.1",
|
||||
"prettier": "^3.6.2",
|
||||
"publint": "^0.3.15",
|
||||
"prettier": "^3.8.3",
|
||||
"publint": "^0.3.18",
|
||||
"regenerator-runtime": "^0.14.1",
|
||||
"rimraf": "^6.1.2",
|
||||
"rimraf": "^6.1.3",
|
||||
"simple-git-hooks": "^2.13.1",
|
||||
"tsup": "^8.5.1",
|
||||
"typescript": "^5.9.3",
|
||||
"typescript-eslint": "^8.47.0",
|
||||
"undici": "^7.16.0",
|
||||
"undici": "^8.1.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"vitest": "^4.0.13",
|
||||
"vitest": "^4.1.4",
|
||||
"vitest-environment-miniflare": "^2.14.4",
|
||||
"webpack": "^5.95.0",
|
||||
"webpack": "^5.106.2",
|
||||
"webpack-http-server": "^0.5.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
Generated
+2025
-1667
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ export abstract class HandlersController {
|
||||
invariant(
|
||||
this.#validateHandlers(initialHandlers),
|
||||
devUtils.formatMessage(
|
||||
'[MSW] Failed to apply given request handlers: invalid input. Did you forget to spread the request handlers Array?',
|
||||
'Failed to apply given request handlers: invalid input. Did you forget to spread the request handlers Array?',
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ test('intercepts a request from a deeply nested iframe', async ({
|
||||
},
|
||||
})
|
||||
|
||||
// Wait for the nested iframe chain to fully load
|
||||
// (main frame + 2 nested iframes).
|
||||
await expect.poll(() => page.frames().length).toBeGreaterThanOrEqual(3)
|
||||
|
||||
const deepFrame = page
|
||||
.mainFrame()
|
||||
.childFrames()
|
||||
|
||||
@@ -9,12 +9,12 @@ const fsMock = createTeardown({
|
||||
},
|
||||
})
|
||||
|
||||
beforeAll(async () => {
|
||||
test.beforeAll(async () => {
|
||||
await fsMock.prepare()
|
||||
await installLibrary(fsMock.resolve('.'))
|
||||
})
|
||||
|
||||
afterAll(async ({ result }) => {
|
||||
test.afterAll(async ({}, { result }) => {
|
||||
if (result?.state === 'fail') {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { delay, HttpResponse, http } from 'msw'
|
||||
import { delay, http } from 'msw'
|
||||
import { setupServer } from 'msw/node'
|
||||
|
||||
const server = setupServer(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Node.js environment superset that has a global WebSocket API.
|
||||
*/
|
||||
import { builtinEnvironments, Environment } from 'vitest/environments'
|
||||
import { builtinEnvironments, Environment } from 'vitest/runtime'
|
||||
import { WebSocket } from 'undici'
|
||||
|
||||
export default <Environment>{
|
||||
|
||||
Reference in New Issue
Block a user