msw

Форк
0
/
package.json 
224 строки · 6.4 Кб
1
{
2
  "name": "msw",
3
  "version": "2.4.2",
4
  "description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
5
  "main": "./lib/core/index.js",
6
  "module": "./lib/core/index.mjs",
7
  "types": "./lib/core/index.d.ts",
8
  "packageManager": "pnpm@8.15.6",
9
  "exports": {
10
    ".": {
11
      "types": "./lib/core/index.d.ts",
12
      "require": "./lib/core/index.js",
13
      "import": "./lib/core/index.mjs",
14
      "default": "./lib/core/index.js"
15
    },
16
    "./browser": {
17
      "types": "./lib/browser/index.d.ts",
18
      "browser": {
19
        "require": "./lib/browser/index.js",
20
        "import": "./lib/browser/index.mjs"
21
      },
22
      "node": null,
23
      "require": "./lib/browser/index.js",
24
      "import": "./lib/browser/index.mjs",
25
      "default": "./lib/browser/index.js"
26
    },
27
    "./node": {
28
      "types": "./lib/node/index.d.ts",
29
      "node": {
30
        "require": "./lib/node/index.js",
31
        "import": "./lib/node/index.mjs"
32
      },
33
      "browser": null,
34
      "require": "./lib/node/index.js",
35
      "import": "./lib/node/index.mjs",
36
      "default": "./lib/node/index.mjs"
37
    },
38
    "./native": {
39
      "types": "./lib/native/index.d.ts",
40
      "react-native": {
41
        "require": "./lib/native/index.js",
42
        "import": "./lib/native/index.mjs"
43
      },
44
      "browser": null,
45
      "require": "./lib/native/index.js",
46
      "import": "./lib/native/index.mjs",
47
      "default": "./lib/native/index.js"
48
    },
49
    "./core/http": {
50
      "types": "./lib/core/http.d.ts",
51
      "require": "./lib/core/http.js",
52
      "import": "./lib/core/http.mjs",
53
      "default": "./lib/core/http.js"
54
    },
55
    "./core/graphql": {
56
      "types": "./lib/core/graphql.d.ts",
57
      "require": "./lib/core/graphql.js",
58
      "import": "./lib/core/graphql.mjs",
59
      "default": "./lib/core/graphql.js"
60
    },
61
    "./mockServiceWorker.js": "./lib/mockServiceWorker.js",
62
    "./package.json": "./package.json"
63
  },
64
  "bin": {
65
    "msw": "cli/index.js"
66
  },
67
  "engines": {
68
    "node": ">=18"
69
  },
70
  "scripts": {
71
    "start": "tsup --watch",
72
    "clean": "rimraf ./lib",
73
    "lint": "eslint \"{cli,src}/**/*.ts\"",
74
    "build": "pnpm clean && cross-env NODE_ENV=production tsup && pnpm patch:dts",
75
    "patch:dts": "node \"./config/scripts/patch-ts.js\"",
76
    "check:exports": "node \"./config/scripts/validate-esm.js\"",
77
    "test": "pnpm test:unit && pnpm test:node && pnpm test:browser && pnpm test:native",
78
    "test:unit": "vitest",
79
    "test:node": "vitest run --config=./test/node/vitest.config.mts",
80
    "test:native": "vitest --config=./test/native/vitest.config.mts",
81
    "test:browser": "playwright test -c ./test/browser/playwright.config.ts",
82
    "test:modules:node": "vitest --config=./test/modules/node/vitest.config.mts",
83
    "test:modules:browser": "playwright test -c ./test/modules/browser/playwright.config.ts",
84
    "test:ts": "vitest --typecheck --config=./test/typings/vitest.config.mts",
85
    "prepare": "pnpm simple-git-hooks init",
86
    "prepack": "pnpm build",
87
    "release": "release publish",
88
    "postinstall": "node -e \"try{require('./config/scripts/postinstall')}catch(e){}\""
89
  },
90
  "lint-staged": {
91
    "**/*.ts": [
92
      "eslint --fix"
93
    ],
94
    "**/*.{ts,json}": [
95
      "prettier --write"
96
    ]
97
  },
98
  "homepage": "https://mswjs.io",
99
  "repository": {
100
    "type": "git",
101
    "url": "https://github.com/mswjs/msw"
102
  },
103
  "author": {
104
    "name": "Artem Zakharchenko",
105
    "url": "https://github.com/kettanaito"
106
  },
107
  "license": "MIT",
108
  "funding": "https://github.com/sponsors/mswjs",
109
  "files": [
110
    "config/constants.js",
111
    "config/scripts/postinstall.js",
112
    "cli",
113
    "lib",
114
    "src",
115
    "browser",
116
    "node",
117
    "native",
118
    "LICENSE.md",
119
    "README.md"
120
  ],
121
  "keywords": [
122
    "api",
123
    "mock",
124
    "mocking",
125
    "worker",
126
    "prototype",
127
    "server",
128
    "service",
129
    "handler",
130
    "testing",
131
    "front-end",
132
    "back-end"
133
  ],
134
  "sideEffects": false,
135
  "dependencies": {
136
    "@bundled-es-modules/cookie": "^2.0.0",
137
    "@bundled-es-modules/statuses": "^1.0.1",
138
    "@bundled-es-modules/tough-cookie": "^0.1.6",
139
    "@inquirer/confirm": "^3.0.0",
140
    "@mswjs/interceptors": "^0.29.0",
141
    "@open-draft/until": "^2.1.0",
142
    "@types/cookie": "^0.6.0",
143
    "@types/statuses": "^2.0.4",
144
    "chalk": "^4.1.2",
145
    "headers-polyfill": "^4.0.2",
146
    "is-node-process": "^1.2.0",
147
    "outvariant": "^1.4.2",
148
    "path-to-regexp": "^6.2.0",
149
    "strict-event-emitter": "^0.5.1",
150
    "type-fest": "^4.9.0",
151
    "yargs": "^17.7.2"
152
  },
153
  "devDependencies": {
154
    "@commitlint/cli": "^18.4.4",
155
    "@commitlint/config-conventional": "^18.4.4",
156
    "@open-draft/test-server": "^0.4.2",
157
    "@ossjs/release": "^0.8.1",
158
    "@playwright/test": "^1.40.1",
159
    "@swc/core": "^1.3.102",
160
    "@types/express": "^4.17.21",
161
    "@types/fs-extra": "^11.0.4",
162
    "@types/glob": "^8.1.0",
163
    "@types/json-bigint": "^1.0.4",
164
    "@types/node": "18.x",
165
    "@typescript-eslint/eslint-plugin": "^8.3.0",
166
    "@typescript-eslint/parser": "^8.3.0",
167
    "@web/dev-server": "^0.1.38",
168
    "axios": "^1.6.5",
169
    "babel-minify": "^0.5.1",
170
    "commitizen": "^4.2.4",
171
    "cross-env": "^7.0.3",
172
    "cross-fetch": "^4.0.0",
173
    "cz-conventional-changelog": "3.3.0",
174
    "esbuild": "^0.19.11",
175
    "esbuild-loader": "^4.0.2",
176
    "eslint": "^8.57.0",
177
    "eslint-config-prettier": "^9.1.0",
178
    "eslint-plugin-prettier": "^5.1.3",
179
    "express": "^4.18.2",
180
    "fs-extra": "^11.2.0",
181
    "fs-teardown": "^0.3.0",
182
    "glob": "^10.3.10",
183
    "graphql": "^16.8.1",
184
    "jsdom": "^23.2.0",
185
    "json-bigint": "^1.0.0",
186
    "lint-staged": "^15.2.0",
187
    "page-with": "^0.6.1",
188
    "prettier": "^3.2.2",
189
    "regenerator-runtime": "^0.14.1",
190
    "rimraf": "^5.0.5",
191
    "simple-git-hooks": "^2.9.0",
192
    "ts-node": "^10.9.2",
193
    "tsup": "^8.0.1",
194
    "typescript": "^5.5.2",
195
    "undici": "^5.20.0",
196
    "url-loader": "^4.1.1",
197
    "vitest": "^1.2.2",
198
    "vitest-environment-miniflare": "^2.14.1",
199
    "webpack": "^5.89.0",
200
    "webpack-http-server": "^0.5.0"
201
  },
202
  "peerDependencies": {
203
    "graphql": ">= 16.8.x",
204
    "typescript": ">= 4.8.x"
205
  },
206
  "peerDependenciesMeta": {
207
    "graphql": {
208
      "optional": true
209
    },
210
    "typescript": {
211
      "optional": true
212
    }
213
  },
214
  "config": {
215
    "commitizen": {
216
      "path": "./node_modules/cz-conventional-changelog"
217
    }
218
  },
219
  "simple-git-hooks": {
220
    "pre-commit": "pnpm lint-staged",
221
    "prepare-commit-msg": "grep -qE '^[^#]' .git/COMMIT_EDITMSG || (exec < /dev/tty && pnpm cz --hook || true)",
222
    "commit-msg": "pnpm commitlint --edit $1"
223
  }
224
}
225

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.