msw
Version:
221 lines • 5.88 kB
JSON
{
"name": "msw",
"version": "3.0.1",
"description": "The industry standard for API mocking in JavaScript.",
"type": "module",
"main": "./lib/core/index.js",
"types": "./lib/core/index.d.ts",
"exports": {
".": {
"types": "./lib/core/index.d.ts",
"default": "./lib/core/index.js"
},
"./browser": {
"types": "./lib/browser/index.d.ts",
"node": null,
"default": "./lib/browser/index.js"
},
"./node": {
"types": "./lib/node/index.d.ts",
"browser": null,
"default": "./lib/node/index.js"
},
"./vite": {
"types": "./lib/vite/index.d.ts",
"default": "./lib/vite/index.js"
},
"./vite/client": {
"types": "./src/vite/client.d.ts"
},
"./http": {
"types": "./lib/http/index.d.ts",
"default": "./lib/http/index.js"
},
"./graphql": {
"types": "./lib/graphql/index.d.ts",
"default": "./lib/graphql/index.js"
},
"./ws": {
"types": "./lib/ws/index.d.ts",
"default": "./lib/ws/index.js"
},
"./sse": {
"types": "./lib/sse/index.d.ts",
"default": "./lib/sse/index.js"
},
"./utils/*": {
"types": "./lib/utils/*.d.ts",
"default": "./lib/utils/*.js"
},
"./experimental": {
"types": "./lib/core/experimental/index.d.ts",
"default": "./lib/core/experimental/index.js"
},
"./mockServiceWorker.js": "./lib/mockServiceWorker.js",
"./package.json": "./package.json"
},
"imports": {
"#core": "./src/core/index.ts",
"#core/*": "./src/core/*.ts",
"#http": "./src/http/index.ts",
"#http/*": "./src/http/*.ts",
"#graphql": "./src/graphql/index.ts",
"#graphql/*": "./src/graphql/*.ts",
"#ws": "./src/ws/index.ts",
"#ws/*": "./src/ws/*.ts",
"#sse": "./src/sse/index.ts",
"#sse/*": "./src/sse/*.ts",
"#utils/*": "./src/utils/*.ts"
},
"bin": {
"msw": "cli/index.js"
},
"engines": {
"node": ">=22.12.0"
},
"lint-staged": {
"**/*.ts": [
"oxlint --fix --no-error-on-unmatched-pattern"
],
"**/*.{ts,json}": [
"prettier --write"
]
},
"homepage": "https://mswjs.io",
"repository": {
"type": "git",
"url": "git+https://github.com/mswjs/msw.git"
},
"author": {
"name": "Artem Zakharchenko",
"url": "https://github.com/kettanaito"
},
"license": "MIT",
"funding": "https://github.com/sponsors/mswjs",
"files": [
"config/constants.js",
"config/scripts/postinstall.js",
"cli",
"lib",
"src",
"LICENSE.md",
"README.md"
],
"keywords": [
"api",
"mock",
"mocking",
"worker",
"prototype",
"server",
"service",
"handler",
"testing",
"front-end",
"back-end"
],
"sideEffects": false,
"dependencies": {
"@inquirer/confirm": "^6.0.11",
"@msw/url": "^0.1.2",
"@mswjs/interceptors": "^0.45.6",
"cookie": "^2.0.1",
"headers-polyfill": "^5.0.1",
"is-node-process": "^1.2.0",
"outvariant": "^1.4.3",
"rettime": "^0.11.12",
"tough-cookie": "^6.0.2",
"type-fest": "^5.5.0",
"until-async": "^3.0.2",
"yargs": "^18.2.0"
},
"devDependencies": {
"@commitlint/cli": "^21.2.1",
"@commitlint/config-conventional": "^21.2.0",
"@epic-web/test-server": "^0.1.6",
"@fastify/websocket": "^11.3.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@ossjs/release": "^0.11.1",
"@playwright/test": "^1.59.1",
"@types/express": "^5.0.6",
"@types/json-bigint": "^1.0.4",
"@types/node": "~24.19.0",
"@types/serviceworker": "^0.0.202",
"@types/ws": "^8.18.1",
"@vitest/browser-playwright": "5.0.2",
"@web/dev-server": "^1.0.0",
"axios": "^1.15.0",
"commitizen": "^4.3.1",
"cross-env": "^10.1.0",
"cz-conventional-changelog": "3.3.0",
"esbuild": "^0.28.0",
"express": "^5.2.1",
"fastify": "^5.8.5",
"fs-teardown": "^0.3.0",
"glob": "^13.0.6",
"graphql": "^17.0.2",
"graphql-ws": "^6.1.1",
"graphql-yoga": "^5.21.2",
"jsdom": "^30.1.1",
"json-bigint": "^1.0.0",
"knip": "^6.34.0",
"lint-staged": "^17.1.1",
"msw": "^3.0.1",
"oxlint": "^1.75.0",
"page-with": "^0.6.1",
"prettier": "^3.9.6",
"publint": "^0.3.22",
"rimraf": "^6.1.3",
"simple-git-hooks": "^2.13.1",
"tsdown": "^0.23.0",
"typescript": "^7.0.2",
"vite": "^8.1.5",
"vitest": "^5.0.2",
"ws": "^8.21.3"
},
"peerDependencies": {
"graphql": ">=16",
"typescript": ">=5.9.x",
"vite": ">=6"
},
"peerDependenciesMeta": {
"graphql": {
"optional": true
},
"typescript": {
"optional": true
},
"vite": {
"optional": true
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",
"prepare-commit-msg": "grep -qE '^[^#]' .git/COMMIT_EDITMSG || (exec < /dev/tty && pnpm cz --hook || true)",
"commit-msg": "pnpm commitlint --edit $1"
},
"scripts": {
"dev": "tsdown --watch",
"clean": "rimraf ./lib",
"lint": "oxlint ./cli ./src ./test",
"build": "pnpm clean && cross-env NODE_ENV=production tsdown",
"publint": "publint",
"test": "vitest",
"test:unit": "vitest --project=unit",
"test:node": "vitest --project=node",
"test:browser": "vitest --project=browser",
"test:memory": "vitest --project=memory --project=memory-browser",
"test:playwright": "playwright test -c ./test/playwright.config.ts",
"test:modules:node": "vitest run --config=./test/modules/node/vitest.config.ts",
"test:modules:browser": "playwright test -c ./test/modules/browser/playwright.config.ts",
"test:e2e": "vitest --project=e2e",
"test:ts": "vitest --project=types",
"release": "release publish",
"knip": "knip"
}
}