-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
231 lines (231 loc) · 8.99 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
{
"name": "rex-web",
"version": "0.1.0",
"private": true,
"engines": {
"node": "14.x"
},
"dependencies": {
"@craco/craco": "<7",
"@formatjs/intl-pluralrules": "^5.2.3",
"@openstax/event-capture-client": "^2.0.2",
"@openstax/highlighter": "https://github.com/openstax/highlighter#release-1.14.3",
"@openstax/open-search-client": "0.1.0-build.7",
"@openstax/ts-utils": "1.6.0",
"@openstax/ui-components": "openstax/ui-components#1.6.4",
"@sentry/integrations": "^7.54.0",
"@sentry/react": "^7.54.0",
"color": "^3.1.2",
"details-element-polyfill": "^2.4.0",
"flat": "~5.0",
"focus-within-polyfill": "^5.2.1",
"history": "4.7.2",
"html-entities": "^2.3.5",
"js-cookie": "~2.2",
"lodash": "^4.17.21",
"mdn-polyfills": "^5.20.0",
"mime": "^3.0.0",
"path-to-regexp": "<4",
"prop-types": "^15.8.1",
"query-string": "~6.2",
"quick-lru": "^4.0.1",
"rangy": "^1.3.1",
"react": "^16",
"react-dom": "^16",
"react-intl": "<5.13",
"react-loadable": "~5.5",
"react-redux": "~7.1",
"redux": "4.0.1",
"reselect": "4.0.0",
"scroll-to-element": "^2.0.3",
"stacktrace-js": "~2.0",
"styled-components": "^4",
"styled-icons": "^9",
"typesafe-actions": "^4.4.2",
"typescript": "^4",
"url": "^0.11.0",
"uuid": "~7.0",
"weak-map": "^1.0.8",
"workbox-core": "^7.0.0",
"workbox-expiration": "^7.0.0",
"workbox-precaching": "^7.0.0",
"workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0"
},
"scripts": {
"trust-localhost": "./script/trust-localhost.bash",
"lint": "npm run-script lint:bash && npm run-script lint:css && npm run-script lint:typescript",
"lint:typescript": "tslint -p ./tsconfig.json && tsc",
"lint:exports": "ts-unused-exports ./tsconfig.json",
"lint:css": "stylelint 'src/**/*.tsx'",
"lint:bash": "shellcheck $(find . -type f \\( -iname '*\\.sh' -or -iname '*\\.bash' \\) | grep -v 'node_modules' )",
"prestart": "npm run-script build:css",
"start": "./script/start.bash",
"start:static": "export REACT_APP_ENV=${REACT_APP_ENV:-test} && npm run-script build && npm run-script prerender:local && npm run-script server",
"clean": "rm -rf ./build",
"build": "export DISABLE_NEW_JSX_TRANSFORM=true && npm run-script build:css && npm run-script build:js",
"build:css": "lessc --source-map --source-map-include-source ./generic-styles/index.less ./src/content.css",
"build:js": "export REACT_APP_ENV=${REACT_APP_ENV:-production} && GENERATE_SOURCEMAP=${GENERATE_SOURCEMAP:-true} craco build",
"build:clean": "npm run-script clean && npm run-script build",
"prerender:local": "REACT_APP_ENV=${REACT_APP_ENV:-production} node ./script/entry prerender/local",
"prerender:fleet": "REACT_APP_ENV=${REACT_APP_ENV:-production} node ./script/entry prerender/fleet",
"prerender:work": "REACT_APP_ENV=${REACT_APP_ENV:-production} node ./script/entry prerender/work",
"server": "REACT_APP_ENV=${REACT_APP_ENV:-development} node ./script/entry server/cli",
"codecov": "codecov -f ./coverage/lcov.info",
"coverage-report": "open coverage/index.html",
"pretest:sims": "./script/build-simulations.bash",
"pretest": "npm run-script build:css",
"ci:test:unit": "CI=true npm run-script test:unit && npm run-script codecov",
"ci:test:build": "CI=true npm run-script test:build",
"test": "npm run-script test:unit && npm run-script test:browser && npm run-script test:build",
"test:unit": "REACT_APP_ENV=test jest --coverage --testPathPattern=\"(\\.|/)spec\\.tsx?\"",
"test:browser": "npm run-script pretest:sims && REACT_APP_ENV=test jest --testPathPattern=\"(\\.|/)browserspec\\.tsx?\" --config jest-puppeteer.config.json -i",
"test:screenshots": "npm run-script pretest:sims && REACT_APP_ENV=test jest --testPathPattern=\"(\\.|/)screenshotspec\\.tsx?\" --config jest-puppeteer.config.json -i",
"test:build": "REACT_APP_ENV=test npm run-script build:clean && npm run-script test:sourcemap && npm run-script test:prerender",
"test:sourcemap": "REACT_APP_ENV=test node ./script/verifySourcemaps.js",
"test:prerender": "npm run-script test:prerender:setup && npm run-script test:prerender:specs && npm run-script test:prerender:browser",
"test:prerender:setup": "REACT_APP_ENV=test npm run-script prerender:local && npm run-script pretest:sims",
"test:prerender:specs": "REACT_APP_ENV=test SERVER_MODE=built jest --testPathPattern=\"(\\.|/)prerenderspec\\.tsx?\" --config jest-puppeteer.config.json",
"test:prerender:browser": "REACT_APP_ENV=test SERVER_MODE=built jest --testPathPattern=\"(\\.|/)browserspec\\.tsx?\" --config jest-puppeteer.config.json -i",
"test:prerender:screenshots": "REACT_APP_ENV=test SERVER_MODE=built jest --testPathPattern=\"(\\.|/)screenshotspec\\.tsx?\" --config jest-puppeteer.config.json",
"test:lighthouse:manual": "REACT_APP_ENV=test lighthouse --view --config-path=./src/test/audits/index.js",
"analyze:bundle": "craco build && source-map-explorer 'build/static/js/*.js' -m",
"analyze:dom": "node ./script/entry.js domVisitor",
"heroku-postbuild": "npm run-script build:clean"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"@aws-sdk/client-cloudformation": "<3.567.0",
"@aws-sdk/client-s3": "<3.567.0",
"@aws-sdk/client-sqs": "<3.567.0",
"@aws-sdk/credential-providers": "<3.567.0",
"@babel/core": "^7.22.5",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@babel/plugin-transform-runtime": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/register": "^7.22.5",
"@openstax/types": "^3.1.0",
"@types/color": "^3.0.3",
"@types/express": "~4.17",
"@types/flat": "~5.0",
"@types/gtag.js": "0.0.12",
"@types/history": "4.7.2",
"@types/ignore-styles": "~5.0",
"@types/jest": "^26",
"@types/jest-image-snapshot": "^6",
"@types/js-cookie": "~2.2",
"@types/lodash": "4.14.160",
"@types/node": "^14.0.0",
"@types/node-fetch": "~2.6",
"@types/pretty": "^2.0.0",
"@types/progress": "^2.0.3",
"@types/puppeteer": "~5.4",
"@types/query-string": "~6.2",
"@types/react": "^16",
"@types/react-dom": "^16",
"@types/react-loadable": "~5.5",
"@types/react-redux": "~7.1",
"@types/react-test-renderer": "~16.9",
"@types/semver-sort": "~0.0",
"@types/serve-static": "~1.15",
"@types/stacktrace-js": "~2.0",
"@types/styled-components": "~4.1",
"@types/tiny-async-pool": "~1.0",
"@types/uuid": "~7.0",
"@types/yargs": "~13.0",
"babel-core": "7.0.0-bridge.0",
"babel-plugin-transform-dynamic-import": "^2.1.0",
"codecov": "^3.8.3",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.0",
"express": "~4.20",
"glob": "<9",
"http-proxy-middleware": "<1",
"ignore-styles": "~5.0",
"jest-image-snapshot": "^6",
"jest-puppeteer": "^5",
"jest-styled-components": "^6",
"less": "^4.1.3",
"lighthouse": "^9",
"node-fetch": "~2.6",
"pify": "^4.0.1",
"portfinder": "^1.0.32",
"prettier": "1.19.1",
"pretty": "^2.0.0",
"progress": "^2.0.3",
"puppeteer": "^5",
"react-scripts": "^4.0.3",
"react-test-renderer": "~16.9",
"resize-observer-polyfill": "^1.5.1",
"semver-sort": "~0.0",
"serve-static": "~1.16",
"sitemap": "<4",
"source-map-explorer": "^2.5.3",
"stylelint": "<14",
"stylelint-config-standard": "<23",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.5.2",
"tiny-async-pool": "~1.0",
"ts-unused-exports": "<7",
"tslint": "6.1.3",
"yargs": "~13.2"
},
"jest": {
"testEnvironment": "jsdom",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json"
],
"moduleNameMapper": {
"//comment//": "remove this when CRA upgrades jest above 28",
"(.*)@openstax/ts-utils(.*)": "$1@openstax/ts-utils/dist/cjs$2"
},
"setupFilesAfterEnv": [
"<rootDir>/src/test/setup.ts"
],
"setupFiles": [
"react-app-polyfill/jsdom"
],
"testRegex": "(\\.|/)(screenshot|browser|prerender)?spec\\.tsx?$",
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/react-scripts/config/jest/babelTransform.js",
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/node_modules/react-scripts/config/jest/fileTransform.js"
},
"collectCoverageFrom": [
"src/{app,helpers,gateways}/**/*.{ts,tsx}"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"coverageReporters": [
"text-summary",
"html",
"lcovonly"
]
},
"babelMacros": {
"styledComponents": {
"pure": true
}
}
}