Issue #3233491 by hooroomoo, xjm, lauriii, nod_, justafish, droplet, effulgentsia: Create process for reviewing changes in 3rd party JavaScript dependencies

merge-requests/2135/head
Alex Pott 2022-04-15 13:12:47 +01:00
parent 435dc2011d
commit b825f91084
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
2 changed files with 19 additions and 3 deletions

View File

@ -10,7 +10,9 @@ function getDirectories(srcpath) {
.filter((item) => fs.statSync(path.join(srcpath, item)).isDirectory()); .filter((item) => fs.statSync(path.join(srcpath, item)).isDirectory());
} }
module.exports = []; const prodPluginBuilds = [];
const devPluginBuilds = [];
// Loop through every subdirectory in ckeditor5_plugins, which should be a different // Loop through every subdirectory in ckeditor5_plugins, which should be a different
// plugin, and build them all in ./build. // plugin, and build them all in ./build.
getDirectories(path.resolve(__dirname, './js/ckeditor5_plugins')).forEach((dir) => { getDirectories(path.resolve(__dirname, './js/ckeditor5_plugins')).forEach((dir) => {
@ -59,5 +61,17 @@ getDirectories(path.resolve(__dirname, './js/ckeditor5_plugins')).forEach((dir)
}, },
}; };
module.exports.push(bc); const dev = {...bc, mode: 'development', optimization: {...bc.optimization, minimize: false}, devtool: false};
prodPluginBuilds.push(bc);
devPluginBuilds.push(dev);
}); });
module.exports = (env, argv) => {
// Files aren't minified in build with the development flag.
if (argv.mode === 'development') {
return devPluginBuilds;
} else {
return prodPluginBuilds;
}
}

View File

@ -31,7 +31,9 @@
"watch:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js --watch", "watch:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js --watch",
"build:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js", "build:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js",
"check:ckeditor5": "node ./scripts/js/ckeditor5-check-plugins.js", "check:ckeditor5": "node ./scripts/js/ckeditor5-check-plugins.js",
"build:ckeditor5-types": "node ./scripts/js/ckeditor5-types-documentation.js" "build:ckeditor5-types": "node ./scripts/js/ckeditor5-types-documentation.js",
"build:ckeditor5-dev": "yarn build:ckeditor5 --mode=development",
"watch:ckeditor5-dev": "yarn watch:ckeditor5 --mode=development"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.0.0", "@babel/core": "^7.0.0",