Merge commit 'dc4a850cacecb8c57923803363dac9bb61221bba' into v2.x

isekai-main
Misty Release Bot 2 years ago
commit a5357812c6

@ -1,3 +1,28 @@
#### v2.5.6 (2022-10-13)
##### Chores
* incrementing version number - v2.5.5 (3509ed94)
* update changelog for v2.5.5 (e7d0040d)
* incrementing version number - v2.5.4 (e83260ca)
* incrementing version number - v2.5.3 (7e922936)
* incrementing version number - v2.5.2 (babcd17e)
* incrementing version number - v2.5.1 (ce3aa950)
* incrementing version number - v2.5.0 (01d276cb)
* incrementing version number - v2.4.5 (dd3e1a28)
* incrementing version number - v2.4.4 (d5525c87)
* incrementing version number - v2.4.3 (9c647c6c)
* incrementing version number - v2.4.2 (3aa7b855)
* incrementing version number - v2.4.1 (60cbd148)
* incrementing version number - v2.4.0 (4834cde3)
* incrementing version number - v2.3.1 (d2425942)
* incrementing version number - v2.3.0 (046ea120)
##### Bug Fixes
* use admin:groups priv for groups (#10960) (b879b6a0)
* https://github.com/NodeBB/NodeBB/issues/10525 (e35b0a86)
#### v2.5.5 (2022-10-11) #### v2.5.5 (2022-10-11)
##### Chores ##### Chores

@ -138,10 +138,9 @@ module.exports = function (grunt) {
}); });
const build = require('./src/meta/build'); const build = require('./src/meta/build');
if (!grunt.option('skip')) { if (!grunt.option('skip')) {
await build.build(true, { webpack: false }); await build.build(true, { watch: true });
} }
run(); run();
await build.webpack({ watch: true });
done(); done();
}); });

@ -58,6 +58,7 @@
"csurf": "1.11.0", "csurf": "1.11.0",
"daemon": "1.1.0", "daemon": "1.1.0",
"diff": "5.1.0", "diff": "5.1.0",
"esbuild": "0.15.10",
"express": "4.18.1", "express": "4.18.1",
"express-session": "1.17.3", "express-session": "1.17.3",
"express-useragent": "1.0.15", "express-useragent": "1.0.15",
@ -111,6 +112,7 @@
"pg-cursor": "2.7.3", "pg-cursor": "2.7.3",
"postcss": "8.4.14", "postcss": "8.4.14",
"postcss-clean": "1.2.0", "postcss-clean": "1.2.0",
"progress-webpack-plugin": "1.0.16",
"prompt": "1.3.0", "prompt": "1.3.0",
"ioredis": "5.2.2", "ioredis": "5.2.2",
"request": "2.88.2", "request": "2.88.2",
@ -129,6 +131,7 @@
"sortablejs": "1.15.0", "sortablejs": "1.15.0",
"spdx-license-list": "6.6.0", "spdx-license-list": "6.6.0",
"spider-detector": "2.0.0", "spider-detector": "2.0.0",
"terser-webpack-plugin": "5.3.6",
"textcomplete": "0.18.2", "textcomplete": "0.18.2",
"textcomplete.contenteditable": "0.1.1", "textcomplete.contenteditable": "0.1.1",
"timeago": "1.6.7", "timeago": "1.6.7",

@ -77,20 +77,36 @@ async function beforeBuild(targets) {
const allTargets = Object.keys(targetHandlers).filter(name => typeof targetHandlers[name] === 'function'); const allTargets = Object.keys(targetHandlers).filter(name => typeof targetHandlers[name] === 'function');
async function buildTargets(targets, parallel) { async function buildTargets(targets, parallel, options) {
const length = Math.max(...targets.map(name => name.length)); const length = Math.max(...targets.map(name => name.length));
const jsTargets = targets.filter(target => targetHandlers.javascript.includes(target));
if (parallel) { const otherTargets = targets.filter(target => !targetHandlers.javascript.includes(target));
async function buildJSTargets() {
await Promise.all( await Promise.all(
targets.map( jsTargets.map(
target => step(target, parallel, `${_.padStart(target, length)} `) target => step(target, parallel, `${_.padStart(target, length)} `)
) )
); );
// run webpack after jstargets are done, no need to wait for css/templates etc.
if (options.webpack || options.watch) {
await exports.webpack(options);
}
}
if (parallel) {
await Promise.all([
buildJSTargets(),
...otherTargets.map(
target => step(target, parallel, `${_.padStart(target, length)} `)
),
]);
} else { } else {
for (const target of targets) { for (const target of targets) {
// eslint-disable-next-line no-await-in-loop // eslint-disable-next-line no-await-in-loop
await step(target, parallel, `${_.padStart(target, length)} `); await step(target, parallel, `${_.padStart(target, length)} `);
} }
if (options.webpack || options.watch) {
await exports.webpack(options);
}
} }
} }
@ -175,11 +191,7 @@ exports.build = async function (targets, options) {
} }
const startTime = Date.now(); const startTime = Date.now();
await buildTargets(targets, !series); await buildTargets(targets, !series, options);
if (options.webpack) {
await exports.webpack(options);
}
const totalTime = (Date.now() - startTime) / 1000; const totalTime = (Date.now() - startTime) / 1000;
await cacheBuster.write(); await cacheBuster.write();

@ -1,8 +1,23 @@
'use strict'; 'use strict';
const { merge } = require('webpack-merge'); const { merge } = require('webpack-merge');
const TerserPlugin = require('terser-webpack-plugin');
const ProgressPlugin = require('progress-webpack-plugin');
const common = require('./webpack.common'); const common = require('./webpack.common');
module.exports = merge(common, { module.exports = merge(common, {
mode: 'production', mode: 'production',
plugins: [
new ProgressPlugin(true),
],
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
minify: TerserPlugin.esbuildMinify,
terserOptions: {},
}),
],
},
}); });

Loading…
Cancel
Save