mediawiki-extensions-Popups/package.json

78 lines
3 KiB
JSON
Raw Normal View History

{
"name": "Popups",
"private": true,
"scripts": {
"storybook": "./.storybook/storybook-resources.sh && start-storybook --config-dir=.storybook -p 6006 -s .storybook/static",
"build-storybook": "./.storybook/storybook-resources.sh && build-storybook --config-dir=.storybook -o docs/ui -s .storybook/static",
"start": "webpack -w --mode=development",
"build": "webpack --mode=production",
"test": "npm -s run check-built-assets && npm run test:lint && bash ./dev-scripts/svg_check.sh && npm -s run coverage && npm -s run doc && bundlesize",
"test:unit": "mw-node-qunit \"tests/node-qunit/**/*.test.js\" --require \"$PWD/tests/node-qunit/run.js\" | tap-mocha-reporter dot",
"test:lint": "npm -s run test:lint:styles && npm -s run test:lint:js && npm -s run test:lint:i18n",
"test:lint:js": "npm -s run linter:js",
"test:lint:styles": "npm -s run linter:styles",
"test:lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
"check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITTED OR STAGED' && npm -s run build && git diff --exit-code resources/dist || { npm run node-debug; false; }",
"coverage": "nyc --reporter=lcov npm -s run test:unit",
"doc": "jsdoc -c jsdoc.json # SKIPPED! && npm run build-storybook",
"linter:js": "eslint --cache .",
"linter:styles": "stylelint \"src/**/*.less\"",
"minify-svg": "svgo --config=.svgo.config.js --quiet --recursive --folder resources/ext.popups.images/",
"node-debug": "node -v && npm -v && echo 'Please ensure you are running the correct version of nvm before running this command.'",
"precommit": "npm -s t",
"selenium-daily": "npm run selenium-test",
"selenium-test": "wdio tests/selenium/wdio.conf.js"
},
"engines": {
"node": "18.17.0"
},
"devDependencies": {
"@babel/core": "7.22.20",
"@babel/plugin-transform-private-property-in-object": "7.23.4",
"@babel/plugin-transform-runtime": "7.15.0",
"@babel/preset-env": "7.2.0",
"@babel/register": "7.0.0",
"@types/jquery": "3.3.29",
"@wdio/cli": "7.30.1",
"@wdio/junit-reporter": "7.29.1",
"@wdio/local-runner": "7.30.1",
"@wdio/mocha-framework": "7.26.0",
"@wdio/spec-reporter": "7.29.1",
"@wikimedia/codex": "0.14.0",
"@wikimedia/codex-icons": "0.14.0",
"@wikimedia/mw-node-qunit": "7.0.0",
"babel-loader": "9.1.3",
"browserslist-config-wikimedia": "0.5.1",
"bundlesize": "0.18.1",
"clean-webpack-plugin": "3.0.0",
"cssjanus": "1.3.1",
"eslint-config-wikimedia": "0.26.0",
"eslint-plugin-no-jquery": "2.7.0",
"expose-loader": "4.1.0",
"grunt-banana-checker": "0.11.1",
"jquery": "3.7.1",
"jsdoc": "3.6.10",
"less": "3.13.1",
"less-loader": "11.1.4",
"nyc": "15.0.0",
"postcss-less": "6.0.0",
"pre-commit": "1.2.2",
"redux": "4.0.1",
"redux-thunk": "2.3.0",
"stylelint-config-wikimedia": "0.16.1",
"svg-inline-loader": "0.8.2",
"svgo": "3.0.2",
"tap-mocha-reporter": "5.0.1",
"url-loader": "4.1.1",
"wdio-mediawiki": "2.3.0",
"webpack": "5.89.0",
"webpack-cli": "5.1.4"
},
"bundlesize": [
{
"path": "resources/dist/index.js",
Generalize settings code (attempt 2) This reverts commit a6a65204c69399b8332c1894ee7ad7cece0fbeb5. to restore custom preview types. -- Changes since revert The previous patch accidentally removed the syncUserSettings changeListener. This has now been restored with several modifications: * We have a migrate script which rewrites existing localStorage settings to the new system * The existing save functions are generalized. The changes since this patch are captured in Ia73467799a9b535f7a3cf7268727c9fab7af0d7e -- More information A new REGISTER_SETTING action replaces the BOOT action for registering settings. This allows custom preview types to be associated with a setting. They do this by adding the enabled property to the module they provide to mw.popups.register Every time the new action is called, we refresh the settings dialog UI with the new settings. Previously the settings dialog was hardcoded, but now it is generated from the registered preview types by deriving associated messages and checking they exist, so by default custom types will not show up in the settings. Benefits: * This change empowers us to add a setting for Math previews to allow them to be enabled or disabled. * Allows us to separate references as its own module Additional notes: * The syncUserSettings.js changeListener is no longer needed as the logic for this is handled inside the "userSettings" change listener in response to the "settings" reducer which is responding to SETTINGS_CHANGE and REGISTER_SETTING actions. Upon merging: * https://www.mediawiki.org/wiki/Extension:Popups#Extensibility will be updated to detail how a setting can be registered. Bug: T334261 Bug: T326692 Change-Id: Ie17d622870511ac9730fc9fa525698fc3aa0d5b6
2023-10-19 21:12:09 +00:00
"maxSize": "15.1kB"
}
]
}