forked from Xunnamius/next-test-api-route-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
244 lines (244 loc) · 9.24 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
{
"name": "next-test-api-route-handler",
"version": "1.2.6",
"description": "Confidently unit test your Next.js API routes/handlers in an isolated Next.js-like environment",
"keywords": [
"api",
"route",
"next",
"unit",
"test",
"endpoint",
"testing",
"nextjs",
"next.js",
"handler",
"request",
"response",
"jest"
],
"repository": {
"type": "git",
"url": "https://github.com/Xunnamius/next-test-api-route-handler"
},
"license": "Unlicense",
"author": "Xunnamius",
"sideEffects": false,
"type": "commonjs",
"exports": {
".": {
"import": "./dist/lib/index.mjs",
"require": "./dist/lib/index.js",
"default": "./dist/lib/index.js"
},
"./package": "./package.json",
"./package.json": "./package.json"
},
"main": "./dist/lib/index",
"module": "./dist/lib/index.mjs",
"types": "./dist/lib/index.d.ts",
"files": [
"/dist",
"/LICENSE",
"/package.json",
"/README.md"
],
"env-expect": {
"errorMessage": "\nCopy the \".env.example\" file to \".env\" or define the appropriate repository secrets",
"rules": [
{
"name": "^MONGODB_URI$",
"value": "^.*:\\/\\/.*\\/.*$",
"required": false,
"errorMessage": "expected MONGODB_URI to be a valid Mongo connect URI with database name"
},
{
"name": "^GH_TOKEN$",
"value": "^[a-f0-9]*$",
"required": false,
"errorMessage": "expected GH_TOKEN to be undefined or a valid GitHub Personal Access Token"
}
]
},
"scripts": {
"build": "npm run build-dist --",
"build-changelog": "conventional-changelog --outfile CHANGELOG.md --preset angular --config .changelogrc.js --release-count 0 --skip-unstable && (if [ \"$CHANGELOG_SKIP_TITLE\" != 'true' ]; then { node -e 'console.log(require(\"./.changelogrc.js\").changelogTitle)'; cat CHANGELOG.md; } > CHANGELOG.md.tmp && mv CHANGELOG.md.tmp CHANGELOG.md; fi) && remark -o --use reference-links --use gfm --use frontmatter CHANGELOG.md && prettier --write CHANGELOG.md",
"build-dist": "npm run clean && NODE_ENV=production tsc --project tsconfig.types.json && NODE_ENV=production webpack --config-name main && NODE_ENV=esm babel src --extensions .ts --out-dir dist/lib --out-file-extension .mjs && { echo -n '\"undefined\"!=typeof window&&(window.global=window);'; cat dist/lib/index.js; } > dist/lib/index.js-tmp && mv -f dist/lib/index.js-tmp dist/lib/index.js",
"build-docs": "typedoc --plugin typedoc-plugin-markdown --out docs --readme none src/index.ts && find docs -name '*.md' -exec sed -i -e 's/`__namedParameters`: //g' {} + && find docs -name '*.md' -exec sed -i -e 's/__namedParameters/\\(destructured\\)/g' {} + && find docs -name '*.md' -exec sed -i -e 's/Project: //g' {} + && sed -i -e 1,4d docs/README.md",
"build-externals": "NODE_ENV=external webpack --config-name externals",
"build-stats": "NODE_ENV=production webpack --config-name main --json > bundle-stats.json",
"clean": "rm -rf dist coverage external-scripts/bin",
"format": "sort-package-json && remark -o --use reference-links --use gfm --use frontmatter . && prettier --write .",
"lint": "stdbuf -i0 -o0 -e0 tsc --project tsconfig.lint.json; X=$?; stdbuf -i0 -o0 -e0 eslint --parser-options=project:tsconfig.lint.json src; Y=$?; remark --quiet --frail --use gfm --use frontmatter --use lint-final-newline --use lint-no-auto-link-without-protocol --use lint-no-blockquote-without-marker --use lint-ordered-list-marker-style --use lint-hard-break-spaces --use lint-no-duplicate-definitions --use lint-no-heading-content-indent --use lint-no-inline-padding --use lint-no-undefined-references --use lint-no-unused-definitions .; Z=$?; [ $X -eq 0 ] && [ $Y -eq 0 ] && [ $Z -eq 0 ]",
"list-tasks": "node -e 'console.log(Object.keys(require(\"./package.json\").scripts).join(\"\\n\"))'",
"prepare": "if [ -z \"$CI\" ]; then npx husky install; else echo 'skipped installing husky git hooks'; fi",
"test": "npm run test-unit --",
"test-integration": "npm run list-tasks | grep -e '^test-integration-' | xargs -n1 npm run",
"test-integration-externals": "BABEL_ENV=test jest test/integration-externals*.test.ts",
"test-integration-node": "BABEL_ENV=test jest test/integration-node*.test.ts",
"test-integration-webpack": "BABEL_ENV=test jest test/integration-webpack*.test.ts",
"test-unit": "if ! [ -z \"$INCLUDE_EXTERNALS\" ]; then X=; Y='--collectCoverageFrom'; Z='external-scripts/**/*.ts'; else X='test/unit-external*.test.ts'; Y=; Z=; fi; BABEL_ENV=test jest --coverage --collectCoverageFrom 'src/**/*.ts' --collectCoverageFrom 'lib/**/*.ts' $Y $Z --testPathIgnorePatterns test/integration-*.test.ts $X"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"body-leading-blank": [
2,
"always"
],
"footer-leading-blank": [
2,
"always"
],
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"test",
"revert",
"debug",
"build",
"chore"
]
]
}
},
"lint-staged": {
"*.md": "remark -o --use reference-links --use gfm --use frontmatter",
"package.json": "sort-package-json",
"*": "prettier --write --ignore-unknown"
},
"prettier": {
"endOfLine": "lf",
"printWidth": 80,
"proseWrap": "always",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"overrides": [
{
"files": "**/*.@(ts|?(@(c|m))js)?(x)",
"options": {
"parser": "babel-ts",
"printWidth": 90
}
}
]
},
"jest": {
"setupFilesAfterEnv": [
"./test/setup.ts"
],
"testEnvironment": "node",
"testPathIgnorePatterns": [
"/node_modules/"
],
"testRunner": "jest-circus/runner",
"testTimeout": 20000,
"verbose": false
},
"dependencies": {
"isomorphic-unfetch": "^3.1.0",
"test-listen": "^1.1.0"
},
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
"@babel/plugin-proposal-function-bind": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@ergodark/types": "^1.0.16",
"@octokit/rest": "^18.0.12",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@types/confusing-browser-globals": "^1.0.0",
"@types/debug": "^4.1.5",
"@types/edit-json-file": "^1.4.0",
"@types/find-package-json": "^1.1.1",
"@types/jest": "^26.0.19",
"@types/mongodb": "^3.6.3",
"@types/node": "^14.14.20",
"@types/semver": "^7.3.4",
"@types/shelljs": "^0.8.8",
"@types/test-listen": "^1.1.0",
"@types/webpack": "^4.41.25",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-plugin-source-map-support": "^2.1.3",
"babel-plugin-transform-mjs-imports": "^1.0.1",
"confusing-browser-globals": "^1.0.10",
"conventional-changelog-angular": "^5.0.12",
"conventional-changelog-cli": "^2.1.1",
"debug": "^4.3.1",
"del": "^6.0.0",
"dotenv": "^8.2.0",
"edit-json-file": "^1.5.0",
"escape-string-regexp": "^4.0.0",
"eslint": "^7.17.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"find-package-json": "^1.2.0",
"husky": "^5.0.4",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"jest-extended": "^0.11.5",
"lint-staged": "^10.5.3",
"mongodb": "^3.6.3",
"prettier": "^2.2.1",
"remark-cli": "^9.0.0",
"remark-frontmatter": "^3.0.0",
"remark-gfm": "^1.0.0",
"remark-lint-final-newline": "^1.0.5",
"remark-lint-hard-break-spaces": "^2.0.1",
"remark-lint-no-auto-link-without-protocol": "^2.0.1",
"remark-lint-no-blockquote-without-marker": "^4.0.0",
"remark-lint-no-duplicate-definitions": "^2.0.1",
"remark-lint-no-heading-content-indent": "^3.0.0",
"remark-lint-no-inline-padding": "^3.0.0",
"remark-lint-no-undefined-references": "^3.0.0",
"remark-lint-no-unused-definitions": "^2.0.1",
"remark-lint-ordered-list-marker-style": "^2.0.1",
"remark-reference-links": "^5.0.0",
"semantic-release": "Xunnamius/semantic-release#contrib-holistic",
"semver": "^7.3.4",
"shelljs": "^0.8.4",
"sort-package-json": "Xunnamius/sort-package-json#contrib-env-expect",
"source-map-support": "^0.5.19",
"spellchecker": "^3.7.1",
"text-extensions": "^2.3.0",
"typedoc": "0.20.13",
"typedoc-plugin-markdown": "3.3.0",
"typescript": "^4.1.3",
"unique-filename": "^1.1.1",
"webpack": "^5.11.1",
"webpack-cli": "^4.3.1",
"webpack-node-externals": "^2.5.2",
"webpack-node-module-types": "^1.0.4"
},
"peerDependencies": {
"next": ">=9.5.x"
},
"engines": {
"node": ">=10.x"
},
"publishConfig": {
"access": "public"
}
}