-
Notifications
You must be signed in to change notification settings - Fork 178
/
package.json
326 lines (326 loc) · 14.7 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
{
"name": "web-stories-wp",
"description": "Visual storytelling for WordPress.",
"private": true,
"author": {
"name": "Google",
"url": "https://creators.google/"
},
"license": "Apache-2.0",
"keywords": [
"amp",
"stories",
"storytelling",
"wordpress"
],
"homepage": "https://github.com/googleforcreators/web-stories-wp/",
"repository": {
"type": "git",
"url": "https://github.com/GoogleForCreators/web-stories-wp.git"
},
"bugs": {
"url": "https://github.com/googleforcreators/web-stories-wp/issues"
},
"engines": {
"node": ">= 20",
"npm": ">= 10"
},
"type": "module",
"workspaces": {
"packages": [
"packages/*"
]
},
"devDependencies": {
"@ampproject/toolbox-optimizer": "^2.10.1",
"@babel/core": "^7.26.0",
"@babel/eslint-parser": "^7.25.9",
"@babel/eslint-plugin": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
"@googleforcreators/dashboard": "*",
"@googleforcreators/design-system": "*",
"@googleforcreators/fonts": "*",
"@googleforcreators/media": "*",
"@googleforcreators/migration": "*",
"@googleforcreators/moveable": "*",
"@googleforcreators/story-editor": "*",
"@jest/types": "^29.6.3",
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@prettier/plugin-xml": "^3.4.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-dynamic-import-vars": "^2.1.3",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-url": "^8.0.2",
"@storybook/addon-a11y": "^8.4.1",
"@storybook/addon-backgrounds": "^8.4.1",
"@storybook/addon-docs": "^8.4.1",
"@storybook/addon-essentials": "^8.4.1",
"@storybook/addon-links": "^8.4.1",
"@storybook/addon-viewport": "^8.4.1",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/client-api": "^7.6.17",
"@storybook/client-logger": "^8.4.1",
"@storybook/csf": "^0.1.8",
"@storybook/csf-tools": "^8.4.1",
"@storybook/react": "^8.4.1",
"@storybook/react-webpack5": "^8.4.1",
"@stylelint/postcss-css-in-js": "^0.38.0",
"@svgr/rollup": "^8.0.1",
"@svgr/webpack": "^8.0.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^12.1.5",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.14",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.8.6",
"@types/styled-components": "^5.1.26",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@web-stories-wp/e2e-tests": "*",
"@web-stories-wp/eslint-import-resolver": "*",
"@web-stories-wp/jest-amp": "*",
"@web-stories-wp/jest-resolver": "*",
"@web-stories-wp/karma-failed-tests-reporter": "*",
"@web-stories-wp/karma-puppeteer-client": "*",
"@web-stories-wp/karma-puppeteer-launcher": "*",
"@wordpress/babel-plugin-import-jsx-pragma": "^4.33.0",
"@wordpress/dependency-extraction-webpack-plugin": "^5.1.0",
"@wordpress/eslint-plugin": "^17.7.0",
"ajv-cli": "^5.0.0",
"ajv-formats": "^3.0.1",
"babel-jest": "^29.6.1",
"babel-loader": "^9.2.1",
"babel-plugin-styled-components": "^2.1.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"browserslist": "^4.24.2",
"circular-dependency-plugin": "^5.2.2",
"core-js": "^3.38.1",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"cssnano": "^7.0.6",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-header": "^3.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jasmine": "^4.2.2",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-jest-extended": "^2.4.0",
"eslint-plugin-jsdoc": "^50.4.3",
"eslint-plugin-jsx-a11y": "^6.10.1",
"eslint-plugin-markdown": "^5.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-oxlint": "^0.10.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-styled-components-a11y": "^2.1.35",
"eslint-plugin-testing-library": "^6.4.0",
"html-webpack-plugin": "^5.6.0",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-axe": "^9.0.0",
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.6.1",
"jest-extended": "^4.0.0",
"jest-fetch-mock": "^3.0.3",
"jest-matcher-deep-close-to": "^3.0.2",
"jest-silent-reporter": "^0.6.0",
"jest-styled-components": "^7.2.0",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-parallel": "^0.3.1",
"karma-sourcemap-loader": "^0.4.0",
"karma-webpack": "^5.0.1",
"lint-staged": "^15.2.10",
"markdownlint-cli": "^0.42.0",
"mini-css-extract-plugin": "^2.9.0",
"mockdate": "^3.0.5",
"npm-package-json-lint": "^8.0.0",
"npm-run-all": "^4.1.5",
"oxlint": "^0.10.3",
"patch-package": "^8.0.0",
"postcss-jsx": "^0.36.4",
"postcss-styled-syntax": "^0.6.4",
"postcss-syntax": "^0.36.2",
"prettier": "^3.3.3",
"puppeteer": "^21.9.0",
"react-refresh": "^0.14.2",
"react-test-renderer": "^17.0.2",
"rollup": "^2.79.2",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-web-worker-loader": "^1.6.1",
"rtlcss-webpack-plugin": "^4.0.7",
"source-map-loader": "^5.0.0",
"storybook": "^8.1.5",
"styled-components": "^5.3.11",
"stylelint": "^16.10.0",
"stylelint-config-recommended": "^14.0.1",
"stylelint-prettier": "^5.0.2",
"stylis-plugin-rtl": "^1.0.0",
"terser-webpack-plugin": "^5.3.10",
"typescript": "^5.6.3",
"webpack": "^5.95.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0",
"webpackbar": "^6.0.1",
"worker-loader": "^3.0.8",
"workspaces-run": "^1.0.2"
},
"overrides": {
"@axe-core/puppeteer": {
"puppeteer": "$puppeteer"
},
"@typescript-eslint/parser": "$@typescript-eslint/parser",
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
"date-fns": "^2.30.0",
"eslint-plugin-jsdoc": "$eslint-plugin-jsdoc",
"eslint-plugin-prettier": "$eslint-plugin-prettier",
"webpack": "$webpack"
},
"scripts": {
"build": "npm-run-all build:*",
"prebuild:js": "rm -rf assets/css/* assets/js/*",
"build:js": "cross-env NODE_ENV=production webpack --config webpack.config.cjs",
"postbuild:js": "rm -rf assets/js/web-stories-list-styles* assets/js/web-stories-theme-style*",
"predev": "rm -rf assets/css/* assets/js/*",
"dev": "webpack --config webpack.config.cjs --watch",
"postdev": "rm -rf assets/js/web-stories-list-styles* assets/js/web-stories-theme-style*",
"preserve": "rm -rf assets/css/* assets/js/*",
"serve": "webpack serve --config webpack.config.cjs",
"postserve": "rm -rf assets/js/web-stories-list-styles* assets/js/web-stories-theme-style*",
"env:start": "bash ./bin/local-env/start.sh",
"env:stop": "bash ./bin/local-env/stop.sh",
"env:reset-site": "bash ./bin/local-env/install-wordpress.sh --reset-site",
"format": "npm-run-all --parallel format:*",
"format:css": "npm run lint:css:fix",
"format:js": "npm run lint:js:fix",
"format:md": "prettier --write '**/*.md'",
"format:php": "npm run lint:php:fix",
"format:xml": "prettier --write '**/*.{xml,xml.dist}'",
"format:yml": "prettier --write '**/*.yml'",
"lint": "npm-run-all --parallel lint:*",
"lint:css": "npm-run-all --parallel --continue-on-error lint:css:*",
"lint:css:js": "stylelint \"**/*.js\"",
"lint:css:js:fix": "stylelint \"**/*.js\" --fix",
"lint:css:css": "stylelint \"**/*.css\"",
"lint:css:css:fix": "stylelint \"**/*.css\" --fix",
"lint:js": "oxlint && eslint .",
"lint:js:fix": "oxlint --fix && eslint --fix .",
"lint:js:report": "oxlint && eslint --output-file build/lint-js-report.json --format json .",
"lint:package-json": "npmPkgJsonLint .",
"lint:php": "composer phpcs",
"lint:php:fix": "composer phpcbf",
"lint:phpstan": "composer phpstan",
"lint:phpmd": "composer phpmd",
"lint:md": "markdownlint .",
"postinstall": "patch-package",
"storybook": "storybook dev --quiet",
"storybook:build": "storybook build -c .storybook -o build/storybook --quiet",
"test": "npm-run-all --parallel test:*",
"pretest:js": "if [ -z $AMP_VALIDATOR_FILE ]; then curl --output-dir $TMPDIR -O -f https://cdn.ampproject.org/v0/validator_wasm.js; fi",
"test:js": "jest --config=tests/js/jest.config.js",
"test:js:coverage": "npm run test:js -- --collectCoverage; open build/logs/lcov-report/index.html",
"test:js:debug": "node --inspect-brk node_modules/.bin/jest --config=tests/js/jest.config.js",
"test:js:help": "npm run test:js -- --help",
"test:js:watch": "npm run test:js -- --watch",
"test:karma": "npm-run-all --parallel test:karma:*",
"pretest:karma:story-editor": "rm -rf build/karma-story-editor-failed-tests.txt",
"test:karma:story-editor": "karma start karma-story-editor.config.cjs --single-run",
"test:karma:story-editor:retry-failed": "karma start karma-story-editor.config.cjs --single-run --retry-failed",
"test:karma:story-editor:watch": "karma start karma-story-editor.config.cjs",
"pretest:karma:dashboard": "rm -rf build/karma-dashboard-failed-tests.txt",
"test:karma:dashboard": "karma start karma-dashboard.config.cjs --single-run",
"test:karma:dashboard:retry-failed": "karma start karma-dashboard.config.cjs --single-run --retry-failed",
"test:karma:dashboard:watch": "karma start karma-dashboard.config.cjs --debug",
"test:php": "npm-run-all test:php:*",
"test:php:unit": "vendor/bin/phpunit",
"test:php:integration": "npm-run-all test:php:integration:*",
"test:php:integration:single": "vendor/bin/phpunit -c phpunit-integration.xml.dist",
"test:php:integration:multisite": "vendor/bin/phpunit -c phpunit-integration-multisite.xml.dist",
"test:php:unit:help": "npm run test:php -- --help",
"pretest:e2e": "if [ -z $AMP_VALIDATOR_FILE ]; then curl --output-dir $TMPDIR -O -f https://cdn.ampproject.org/v0/validator_wasm.js; fi",
"test:e2e": "cross-env JEST_PUPPETEER_CONFIG=jest-puppeteer.config.cjs jest --runInBand --config=packages/e2e-tests/src/jest.config.js",
"test:e2e:help": "npm run test:e2e -- --help",
"test:e2e:percy": "percy exec --quiet --parallel --config=percy.config.yml -- npm run test:e2e",
"test:e2e:watch": "npm run test:e2e -- --watch",
"test:e2e:interactive": "cross-env PUPPETEER_HEADLESS=false PUPPETEER_SLOWMO=80 npm run test:e2e",
"test:e2e:debug": "cross-env PUPPETEER_HEADLESS=false PUPPETEER_DEVTOOLS=true JEST_PUPPETEER_CONFIG=jest-puppeteer.config.cjs node --inspect-brk node_modules/.bin/jest --runInBand --config=packages/e2e-tests/src/jest.config.js",
"test:e2e:firefox": "cross-env PUPPETEER_PRODUCT=firefox npm run test:e2e",
"test:e2e:firefox:interactive": "cross-env PUPPETEER_PRODUCT=firefox npm run test:e2e:interactive",
"test:e2e:firefox:debug": "cross-env PUPPETEER_PRODUCT=firefox PUPPETEER_HEADLESS=false PUPPETEER_DEVTOOLS=true node --inspect-brk node_modules/.bin/jest --runInBand --config=packages/e2e-tests/src/jest.config.js",
"test:schema": "npm-run-all --parallel test:schema:*",
"test:schema:templates": "ls -1 packages/templates/src/raw/*/template.json | xargs -I% npx ajv validate -s bin/schemas/story.json -d % -c ajv-formats",
"test:schema:text-sets": "ls -1 packages/text-sets/src/raw/*.json | xargs -I% npx ajv validate -s bin/schemas/story.json -d % -c ajv-formats",
"test:schema:ftue-story": "npx ajv validate -s bin/schemas/story.json -d includes/data/stories/demo.json -c ajv-formats",
"percy": "percy snapshot --config=percy.config.yml .test_artifacts/karma_snapshots/",
"local-registry:start": "bash ./bin/setup-local-npm-registry.sh",
"local-registry:stop": "bash ./bin/stop-local-npm-registry.sh",
"workflow:assets-version": "commander assets-version",
"workflow:version": "commander version",
"workflow:build-plugin": "commander build-plugin",
"workflow:bundle-packages": "npm-run-all --parallel workflow:bundle-packages:*",
"workflow:bundle-packages:code": "rollup -c",
"workflow:bundle-packages:types": "tsc --build",
"workflow:fonts": "npm run update-fonts --workspace packages/fonts",
"postworkflow:fonts": "npx prettier --write packages/fonts/src/fonts.json; cp packages/fonts/src/fonts.json includes/data/fonts/fonts.json",
"workflow:render-text-sets": "npm run render-text-sets --workspace packages/text-sets",
"workflow:render-template-posters": "npm run render-template-posters --workspace=packages/templates",
"preworkflow:migrate": "[ -f packages/migration/scripts/module.js ] || npx rollup --config packages/migration/rollup.config.js",
"workflow:migrate": "npm-run-all --parallel workflow:migrate:*",
"workflow:migrate:text-sets": "npm run migration --workspace packages/migration packages/text-sets/src/raw",
"postworkflow:migrate:text-sets": "npx prettier --write packages/text-sets/src/raw",
"workflow:migrate:templates": "npm run migration --workspace packages/migration packages/templates/src/raw",
"postworkflow:migrate:templates": "npx prettier --write packages/templates/src/raw",
"workflow:migrate:ftue-story": "npm run migration --workspace packages/migration includes/data/stories",
"postworkflow:migrate:ftue-story": "npx prettier --write includes/data/stories",
"workflow:normalize-path": "commander normalize-path"
},
"lint-staged": {
"*.(cjs|js|ts|tsx)": [
"eslint --fix"
],
"*.(js|tsx)": [
"stylelint --fix --allow-empty-input"
],
"*.json": [
"prettier --write"
],
"*.css": "stylelint --fix --allow-empty-input",
"*.md": [
"eslint --fix",
"markdownlint -f"
],
"*.php": "npm run lint:php:fix",
"*.(xml|xml.dist)": "prettier --write",
"*.yml": "prettier --write"
},
"changelog": {
"labels": {
"Type: Enhancement": "🚀 Features",
"Type: Bug": "🐛 Bug Fixes",
"Type: Infrastructure": "🧰 Maintenance",
"Type: Documentation": ":memo: Documentation"
},
"ignoreCommitters": [
"dependabot",
"github-actions"
]
}
}