-
Notifications
You must be signed in to change notification settings - Fork 14
/
package.json
378 lines (378 loc) · 15.9 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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
{
"name": "newskit",
"version": "7.7.3",
"description": "A React Component library implementing the News design language",
"keywords": [
"react",
"newsuk"
],
"license": "BSD-3-Clause",
"main": "index.js",
"types": "index.d.ts",
"repository": "https://github.com/newscorp-ghfb/newskit.git",
"sideEffects": false,
"engines": {
"node": ">=16.10.0"
},
"scripts": {
"clear:cache": "nx reset",
"dev": "concurrently --names \"src,storybook,docs\" \"yarn build:ts --watch\" \"yarn dev:storybook\" \"next site -p 8081\"",
"dev:docs": "yarn build:icons && concurrently --names \"comps,docs\" \"yarn build:ts --watch\" \"next site -p 8081\"",
"dev:storybook": "yarn build:icons && start-storybook --ci -p 6006",
"percy:run": "percy storybook http://localhost:6006 --config=percy.config.js",
"fetch-external-fonts": "node ./scripts/fetch-external-fonts.js",
"lint:code:base": "eslint --ext=.js,.ts,.jsx,.tsx --cache",
"lint:code:comps": "npx nx lint newskit-ui --ext=.js,.ts,.jsx,.tsx --cache",
"lint:code:docs": "npx nx lint site --ext=.js,.ts,.jsx,.tsx --cache",
"lint:code": "scripts/assert-files-and-folders.js && concurrently --names \"comps,docs\" \"yarn lint:code:comps\" \"yarn lint:code:docs\"",
"lint:code:fix": "scripts/assert-files-and-folders.js && concurrently --names \"comps,docs\" \"yarn lint:code:comps --fix\" \"yarn lint:code:docs --fix\"",
"lint:markdown": "nx exec -- markdownlint -c ./.markdownlint.json *.md **/*.md",
"lint:next": "nx exec -- next lint site",
"lint:packages": "npx nx report",
"lint:legacy": "concurrently --names \"code,markdown,next\" \"scripts/assert-files-and-folders.js && yarn lint:code:base .\" \"yarn markdownlint -c ./.markdownlint.json *.md **/*.md\" \"yarn next lint site\"",
"lint": "scripts/assert-files-and-folders.js && concurrently --names \"markdown,next,comps,docs\" \"yarn lint:markdown\" \"yarn lint:next\" \"yarn lint:code:comps\" \"yarn lint:code:docs\"",
"test": "yarn lint && yarn test:unit:dev --forceExit",
"test:legacy": "yarn lint:legacy && yarn test:unit:dev:legacy",
"test:unit:node": "node --max-old-space-size=8192 --expose-gc ./node_modules/.bin/jest --logHeapUsage --coverage --coverageReporters=lcov --coverageReporters=text",
"test:unit:watch": "yarn test:unit:node --maxWorkers=50% --watch",
"test:unit:run": "NODE_OPTIONS=\"--max-old-space-size=8192\" nx exec -- jest --logHeapUsage --coverage --coverageReporters=lcov --coverageReporters=text",
"test:unit:run:local": "yarn test:unit:run --maxWorkers=50% --coveragePathIgnorePatterns=/src/icons/",
"test:unit:dev": "yarn build:icons && concurrently --names \"docs,comps\" \"yarn test:unit:docs\" \"yarn test:unit:comps\"",
"test:unit:dev:legacy": "yarn build:icons && yarn test:unit:node --maxWorkers=50% --coveragePathIgnorePatterns=/src/icons/",
"test:unit:ci": "yarn test:unit:node --maxWorkers=2 --ci --reporters=default --reporters=jest-junit",
"test:unit:comps": "yarn test:unit:run:local --maxWorkers=50% --projects=src",
"test:unit:comps:experimental": "NODE_OPTIONS=\"--max-old-space-size=8192\" npx nx test newskit-ui --codeCoverage --logHeapUsage --coverage --coverageReporters=lcov --coverageReporters=text",
"test:unit:docs": "yarn test:unit:run:local --maxWorkers=50% --projects=site",
"test:unit:docs:experimental": "NODE_OPTIONS=\"--max-old-space-size=8192\" npx nx test site --codeCoverage --logHeapUsage --coverage --coverageReporters=lcov --coverageReporters=text",
"test:unit:comps:ci": "yarn test:unit:node --forceExit --maxWorkers=4 --projects=src --ci --reporters=default --reporters=jest-junit",
"test:unit:docs:ci": "yarn test:unit:node --forceExit --maxWorkers=3 --projects=site --ci --reporters=default --reporters=jest-junit",
"test:comp-statuses": "node scripts/component-status.js",
"test:visual:comps:ci:percy": "STORYBOOK_IS_VISUAL_TEST=true start-server-and-test dev:storybook 6006 'percy:run'",
"test:visual:comps:ci:percy:skip": "PERCY_PARTIAL_BUILD=1 STORYBOOK_SKIP_PERCY_CHECK=true start-server-and-test dev:storybook 6006 percy:run",
"test:visual:comps:local:percy": "sh ./scripts/percy_local.sh comps",
"prepublish": "yarn build:sync-version-number",
"build:clean": "rm -rf dist && rm -rf dist-storybook && rm -rf public",
"build:ts:cjs": "NODE_ENV=production tsc --outDir dist/cjs",
"build:ts": "NODE_ENV=production tsc -m es2020 --outDir dist/esm ",
"build:copy-files": "cp README_COMPONENTS.md dist/README.md; cp .npmignore dist/.npmignore",
"build:package-json": "node ./scripts/build-package-json.js",
"build:sync-version-number": "node ./scripts/sync-version-number.js",
"build:comps:clean-icons": "sh ./scripts/reduce-file-count.sh",
"build:comps": "concurrently \"yarn build:ts\" \"yarn build:ts:cjs\" && yarn build:comps:clean-icons && yarn build:copy-files && yarn build:package-json",
"build:storybook": "build-storybook -c .storybook -o dist-storybook",
"build:docs": "yarn build:comps:clean-icons && next build site && next export site -o public",
"postbuild:docs": "node ./scripts/post-build",
"build:icons": "node ./scripts/generate-icons",
"build": "yarn build:clean && yarn build:icons && yarn build:comps && yarn build:storybook && yarn build:docs && yarn postbuild:docs",
"e2e:build": "yarn e2e:generate:a11ytests:comps && webpack --config webpack.e2e.config.js --mode=production",
"e2e:serve": "http-server e2e/dist -p 8080",
"e2e:comps:run": "cypress run --config-file cypress.components.config.ts",
"e2e:comps:open": "cypress open --config-file cypress.components.config.ts",
"e2e:comps:parallel": "yarn e2e:comps:run --spec $(circleci tests glob \"cypress/components/**/*.cy.{js,jsx,ts,tsx}\" | circleci tests split | paste -sd ',')",
"e2e:docs:run": "cypress run --config-file cypress.docs.config.ts",
"e2e:docs:open": "cypress open --config-file cypress.docs.config.ts",
"e2e:docs:parallel": "yarn e2e:docs:run --spec $(circleci tests glob \"cypress/site/functional/**/*.cy.{js,jsx,ts,tsx}\" | circleci tests split | paste -sd ',')",
"e2e:comps:ci": "start-server-and-test e2e:serve 8080 'TZ=UTC yarn e2e:comps:parallel'",
"e2e:docs:ci": "yarn e2e:generate:a11ytests:web && start-server-and-test serve:docs 8081 'TZ=UTC && yarn e2e:docs:parallel'",
"e2e:visual:docs:ci:percy": "start-server-and-test serve:docs 8081 'TZ=UTC percy exec -- cypress run --config-file cypress.docs.percy.config.ts'",
"e2e:visual:docs:ci:percy:skip": "PERCY_PARTIAL_BUILD=1 percy exec -- cypress run --config-file cypress.docs.percy.skip.config.ts",
"e2e:visual:docs:local:percy": "sh ./scripts/percy_local.sh docsite",
"e2e:generate:a11ytests:comps": "node scripts/generate-a11y-tests-comps.js",
"e2e:generate:a11ytests:web": "ts-node ./scripts/generate-a11y-tests-web.ts",
"e2e:findbrokenlinks": "linkinator http://localhost:8081 --recurse --skip '^(?!http://localhost:8081)'",
"e2e:findbrokenlinks:ci": "start-server-and-test serve:docs 8081 e2e:findbrokenlinks",
"postinstall": "yarn fetch-external-fonts",
"prepare": "node -e 'if(!/yarn\\.js$/.test(process.env.npm_execpath))throw new Error(\"Use yarn\")'",
"serve:docs": "http-server public -p 8081 -c300",
"serve:storybook": "http-server dist-storybook -p 6006",
"dependencies:check": "package-change-checker --install-cmd=\"yarn install --pure-lockfile\" HEAD@{1} HEAD",
"storybook": "start-storybook -c .storybook -p 6006"
},
"devDependencies": {
"@babel/core": "^7.13.15",
"@babel/parser": "^7.14.6",
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@commitlint/format": "8.0.0",
"@commitlint/lint": "8.0.0",
"@commitlint/load": "8.0.0",
"@commitlint/parse": "8.0.0",
"@commitlint/read": "8.0.0",
"@docsearch/css": "^3.0.0",
"@docsearch/react": "^3.0.0",
"@emotion/jest": "^11.2.1",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^11.10.4",
"@hookform/resolvers": "^2.5.0",
"@mapbox/rehype-prism": "^0.3.1",
"@mdx-js/loader": "^1.5.8",
"@mdx-js/react": "^1.5.8",
"@next/mdx": "^13.0.7",
"@nrwl/eslint-plugin-nx": "15.9.2",
"@nrwl/jest": "15.9.2",
"@nrwl/js": "15.9.2",
"@nrwl/linter": "15.9.2",
"@nrwl/next": "^15.9.2",
"@nrwl/react": "15.9.2",
"@nrwl/rspack": "^15.9.6",
"@percy/cli": "1.10.2",
"@percy/cypress": "3.1.2",
"@percy/storybook": "4.3.3",
"@rspack/core": "~0.1.0",
"@rspack/dev-server": "~0.1.0",
"@rspack/plugin-minify": "~0.1.0",
"@storybook/addon-a11y": "^6.5.16",
"@storybook/addon-actions": "^6.5.16",
"@storybook/addon-docs": "^6.5.16",
"@storybook/addon-essentials": "^6.5.16",
"@storybook/addon-links": "^6.5.16",
"@storybook/addon-storysource": "^6.5.16",
"@storybook/addons": "^6.5.16",
"@storybook/builder-webpack5": "^6.5.16",
"@storybook/components": "^6.5.16",
"@storybook/manager-webpack5": "^6.5.16",
"@storybook/theming": "^6.5.16",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "14.3.0",
"@types/card-validator": "^4.1.0",
"@types/date-fns": "^2.6.0",
"@types/debounce": "^1.2.0",
"@types/dompurify": "^2.2.3",
"@types/file-saver": "^2.0.3",
"@types/fs-extra": "^11.0.1",
"@types/isomorphic-fetch": "^0.0.35",
"@types/jest": "^29.2.6",
"@types/jest-matcher-utils": "^25.1.0",
"@types/jscodeshift": "^0.6.1",
"@types/just-extend": "^1.1.0",
"@types/memoize-one": "^4.1.1",
"@types/mkdirp": "^0.5.2",
"@types/node": "16.11.7",
"@types/popper.js": "^1.11.0",
"@types/prettier": "^1.16.4",
"@types/react": "18",
"@types/react-dom": "18",
"@types/react-dropzone": "^4.2.2",
"@types/react-helmet": "^5.0.15",
"@types/react-input-mask": "^2.0.1",
"@types/react-is": "17.0.3",
"@types/react-syntax-highlighter": "^11.0.4",
"@types/react-transition-group": "^4.4.1",
"@types/react-virtualized": "^9.21.2",
"@types/resize-observer-browser": "^0.1.5",
"@types/semver": "^7.3.10",
"@types/smoothscroll-polyfill": "^0.3.1",
"@types/webpack": "^5.28.1",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"axe-core": "^4.7.0",
"babel-loader": "^8.0.6",
"chalk": "2.4.1",
"concurrently": "^4.1.1",
"copy-webpack-plugin": "^11.0.0",
"csstype": "2",
"cypress": "^12.11.0",
"cypress-axe": "^1.2.0",
"cypress-multi-reporters": "^1.6.3",
"eslint": "^8.3.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-next": "^13.0.7",
"eslint-config-prettier": "8.3.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-cup": "^2.0.1",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-storybook": "^0.6.10",
"fast-glob": "^3.2.5",
"fs-extra": "^9.0.1",
"http-server": "^0.12.3",
"husky": "^2.7.0",
"ignore": "^5.1.4",
"import-glob": "^1.5.0",
"inquirer": "6.0.0",
"isomorphic-fetch": "^2.2.1",
"jest": "^29.3.1",
"jest-dom": "^4.0.0",
"jest-environment-jsdom": "^29.3.1",
"jest-fail-on-console": "^2.2.1",
"jest-junit": "^11.1.0",
"jest-matcher-utils": "^29.3.1",
"jest-matchmedia-mock": "^1.1.0",
"jest-mock": "^29.3.1",
"jest-slow-test-reporter": "^1.0.0",
"jscodeshift": "^0.6.4",
"linkinator": "^2.14.4",
"lint-staged": "^9.1.0",
"markdownlint-cli": "^0.17.0",
"mdast-util-to-string": "^1.0.7",
"mkdirp": "^0.5.1",
"next": "^13.0.7",
"next-router-mock": "^0.8.0",
"npm-run-all": "^4.1.5",
"nx": "15.9.2",
"package-change-checker": "^1.2.4",
"prettier": "2.2.1",
"pretty-proptypes": "^0.6.0",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
"react": "18",
"react-codesandboxer": "^3.1.1",
"react-dom": "18",
"react-helmet": "^5.2.1",
"react-markdown": "^6.0.0",
"react-phone-number-input": "^3.2.19",
"react-syntax-highlighter": "^13.0.0",
"react-test-renderer": "18",
"start-server-and-test": "^1.14.0",
"storybook-addon-performance": "0.16.1",
"tar": "^4.4.8",
"ts-jest": "^29.0.5",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"typescript": "4.5.5",
"unist-builder": "^2.0.2",
"unist-util-find": "^1.0.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"yo": "^3.1.1",
"yup": "^0.32.9"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.20.13",
"@capsizecss/core": "^3.0.0",
"@capsizecss/metrics": "^1.1.1",
"@emotion-icons/emotion-icon": "4.1.0",
"@emotion-icons/material": "3.9.0",
"@emotion-icons/material-outlined": "3.8.0",
"@floating-ui/react-dom-interactions": "^0.6.0",
"@newskit-themes/dow-jones": "0.0.0-b863651f4",
"@newskit-themes/market-watch": "^0.0.0",
"@newskit-themes/newskit-website": "1.0.2",
"@newskit-themes/the-sun": "^0.2.0",
"@newskit-themes/the-times": "^0.1.1",
"@newskit-themes/wall-street-journal": "^0.0.0",
"@seznam/compose-react-refs": "^1.0.5",
"@storybook/react": "^6.5.16",
"@types/blob-to-buffer": "^1.2.0",
"@types/fontkit": "2",
"aria-hidden": "^1.1.3",
"blob-to-buffer": "^1.2.9",
"cross-fetch": "3.0.4",
"date-fns": "^2.6.0",
"debounce": "^1.2.0",
"dequal": "^1.0.0",
"detect-font": "^0.1.5",
"dotenv": "^16.0.3",
"downshift": "^6.1.7",
"file-saver": "^2.0.5",
"fontkit": "2.0.2",
"glob": "^8.0.3",
"globby": "^13.1.2",
"googleapis": "^109.0.1",
"isomorphic-dompurify": "^0.24.0",
"jszip": "^3.7.1",
"match-sorter": "^4.2.1",
"next-seo": "^4.28.1",
"react-focus-lock": "^2.5.0",
"react-hook-form": "^7.43.1",
"react-hot-toast": "^1.0.2",
"react-range": "^1.8.12",
"react-transition-group": "^4.4.1",
"react-virtual": "^2.10.4",
"semver": "^7.3.7"
},
"resolutions": {
"@types/react": "18",
"minimist": "^0.2.1",
"kind-of": "^6.0.3"
},
"peerDependencies": {
"@emotion/react": ">= 11.1.5 <= 11.9.3",
"@emotion/styled": ">= 11.1.5 <= 11.9.3",
"react": ">= 16.8.0 <= 18",
"react-dom": ">= 16.8.0 <= 18",
"react-is": ">= 16.8.0 <= 18"
},
"husky": {
"hooks": {
"prepare-commit-msg": "node githooks/preparecommitmsg",
"commit-msg": "node githooks/commitmsg",
"pre-commit": "lint-staged && node githooks/update-readme-node-version.js",
"post-merge": "yarn dependencies:check",
"post-checkout": "yarn dependencies:check"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"yarn lint:code:base . --fix",
"git add"
]
},
"nx": {
"targets": {
"build": {
"executor": "@nrwl/rspack:rspack",
"options": {
"rspackConfig": "rspack.config.js"
},
"configurations": {}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": [
"./src/**/*.{ts,tsx,js,jsx}"
]
}
},
"lint:code:comps": {
"outputs": [
"{projectRoot}/dist"
]
},
"lint:code:docs": {
"outputs": [
"{projectRoot}/dist"
]
},
"lint:code": {
"outputs": [
"{projectRoot}/dist"
]
},
"lint:markdown": {
"outputs": [
"{projectRoot}/dist"
]
},
"lint:next": {
"outputs": [
"{projectRoot}/dist"
]
},
"test:unit:run": {
"outputs": [
"{projectRoot}/dist"
]
},
"test:unit:comps": {
"outputs": [
"{projectRoot}/dist"
]
},
"test:unit:docs": {
"outputs": [
"{projectRoot}/dist"
]
}
}
}
}