-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
183 lines (183 loc) · 7.64 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
{
"name": "@xunnamius/do-not-install",
"version": "3.0.0-canary.2",
"description": "A dummy package used for testing workflow pipelines. Not to be installed!",
"repository": {
"type": "git",
"url": "https://github.com/Xunnamius/workflow-playground"
},
"license": "Unlicense",
"author": "Xunnamius",
"sideEffects": false,
"type": "commonjs",
"exports": {
".": {
"default": "./dist/lib/index.js",
"import": "./dist/lib/index.mjs",
"require": "./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"
],
"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) && prettier --write CHANGELOG.md --loglevel warn",
"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": "rm -rf tmp-docs tmp-docs-diff docs-diff && typedoc --plugin typedoc-plugin-markdown --out tmp-docs --readme none --mode library src/index.ts && find tmp-docs -name '*.md' -exec sed -i -e 's/`__namedParameters`: //g' {} + && find tmp-docs -name '*.md' -exec sed -i -e 's/__namedParameters/\\(destructured\\)/g' {} + && sed -i -e 1,4d tmp-docs/README.md && if [ ! -d docs ]; then mv tmp-docs docs; exit $?; fi && cp -rf tmp-docs tmp-docs-diff && cp -rf docs docs-diff && find docs-diff -name '*.md' -exec sed -i '/^\\*Defined in \\[.*\\]\\(.*\\)\\*$/d' {} + && find tmp-docs-diff -name '*.md' -exec sed -i '/^\\*Defined in \\[.*\\]\\(.*\\)\\*$/d' {} +; [ $? -ne 0 ] && echo 'build failed (try `npm run lint`)' && rm -rf tmp-docs tmp-docs-diff docs-diff && exit 1; if [ \"$(find ./docs-diff -type f -print0 | xargs -0 sha1sum | awk '{print $1}' | sha1sum)\" = \"$(find ./tmp-docs-diff -type f -print0 | xargs -0 sha1sum | awk '{print $1}' | sha1sum)\" ]; then echo 'no rebuild necessary'; else rm -r docs && mv tmp-docs docs && echo 'build successful'; fi; rm -rf tmp-docs tmp-docs-diff docs-diff",
"build-stats": "NODE_ENV=production webpack --config-name main --json > bundle-stats.json",
"clean": "rm -rf dist npm.pipe coverage external-scripts/bin",
"format": "sort-package-json && prettier --write .",
"postinstall": "if [ -z \"$CI\" ]; then husky install; else echo 'skipped installing husky git hooks'; fi",
"lint": "rm -f npm.pipe; touch npm.pipe; command -v unbuffer >/dev/null; X=$?; [ $X -eq 0 ] && unbuffer tsc --project tsconfig.lint.json >> npm.pipe; Y=$?; [ $Y -eq 0 ] && echo >> npm.pipe; unbuffer eslint --parser-options=project:tsconfig.lint.json src >> npm.pipe; Z=$?; [ $X -ne 0 ] && tsc --project tsconfig.lint.json >> npm.pipe && eslint --parser-options=project:tsconfig.lint.json src >> npm.pipe; W=$?; cat npm.pipe | less -R -FX; rm npm.pipe; ([ $W -eq 0 ] && [ $X -ne 0 ]) || ([ $X -eq 0 ] && [ $Y -eq 0 ] && [ $Z -eq 0 ])",
"list-tasks": "node -e 'console.log(Object.keys(require(\"./package.json\").scripts).join(\"\\n\"))' && echo '\n(no gulp tasks defined for this project)'",
"test": "npm run test-unit --",
"test-integration": "npm run list-tasks | grep -e '^test-integration-' | xargs -n1 npm run",
"test-integration-browser": "BABEL_ENV=test jest test/integration-browser*.test.ts",
"test-integration-node": "BABEL_ENV=test jest test/integration-node*.test.ts",
"test-unit": "BABEL_ENV=test jest --coverage --collectCoverageFrom 'src/**/*.ts' --collectCoverageFrom 'lib/**/*.ts' --testPathIgnorePatterns test/integration-*.test.ts"
},
"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": {
"**": [
"prettier --loglevel warn --write --ignore-unknown"
]
},
"prettier": {
"endOfLine": "lf",
"printWidth": 80,
"proseWrap": "always",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"overrides": [
{
"files": "**/*.@(ts|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": {
"chalk": "^4.1.0"
},
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
"@babel/plugin-proposal-function-bind": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@babel/preset-typescript": "^7.12.7",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@ergodark/types": "^1.0.16",
"@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/expect-puppeteer": "^4.4.5",
"@types/jest": "^26.0.16",
"@types/node": "^14.14.10",
"@types/puppeteer": "^5.4.0",
"@types/test-listen": "^1.1.0",
"@types/webpack": "^4.41.25",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.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",
"eslint": "^7.15.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",
"husky": "^5.0.4",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"jest-extended": "^0.11.5",
"lint-staged": "^10.5.3",
"prettier": "^2.2.1",
"puppeteer": "5.4.0",
"semantic-release": "Xunnamius/semantic-release#contrib",
"shelljs": "^0.8.4",
"sort-package-json": "^1.48.0",
"source-map-support": "^0.5.19",
"spellchecker": "^3.7.1",
"test-listen": "^1.1.0",
"text-extensions": "^2.3.0",
"typedoc": "0.17.0-3",
"typedoc-plugin-markdown": "3.0.11",
"typescript": "^4.1.2",
"webpack": "^5.10.0",
"webpack-cli": "^4.2.0",
"webpack-node-module-types": "^1.0.4"
},
"engines": {
"node": ">=10.x"
},
"publishConfig": {
"access": "public"
},
"env-expect": {
"errorMessage": "\nCopy the \".env.example\" file to \".env\" and/or define only the appropriate environment variables",
"rules": []
}
}