Merge tag 'v4.31.0' into next

4.31.0
This commit is contained in:
Tobias Koppers 2019-05-09 21:38:10 +02:00
commit e4009e7695
9 changed files with 43 additions and 23 deletions

View File

@ -387,7 +387,14 @@ export interface WebpackOptions {
stats?:
| StatsOptions
| boolean
| ("none" | "errors-only" | "minimal" | "normal" | "detailed" | "verbose");
| (
| "none"
| "errors-only"
| "minimal"
| "normal"
| "detailed"
| "verbose"
| "errors-warnings");
/**
* Environment to build for
*/

View File

@ -17,7 +17,7 @@ module.exports = class NoModeWarning extends WebpackError {
"The 'mode' option has not been set, webpack will fallback to 'production' for this value. " +
"Set 'mode' option to 'development' or 'production' to enable defaults for each environment.\n" +
"You can also set it to 'none' to disable any default behavior. " +
"Learn more: https://webpack.js.org/concepts/mode/";
"Learn more: https://webpack.js.org/configuration/mode/";
Error.captureStackTrace(this, this.constructor);
}

View File

@ -72,6 +72,11 @@ const NAMED_PRESETS = {
errors: true,
moduleTrace: true
},
"errors-warnings": {
all: false,
errors: true,
warnings: true
},
none: {
all: false
}

View File

@ -2297,7 +2297,8 @@
"minimal",
"normal",
"detailed",
"verbose"
"verbose",
"errors-warnings"
]
}
]

View File

@ -1607,7 +1607,7 @@ Entrypoint entry = entry.js
`;
exports[`StatsTestCases should print correct stats for no-emit-on-errors-plugin-with-child-error 1`] = `
"Hash: 7f9d32f2adc8ce1b4119
"Hash: 181c7c6a6c7397755ac2
Time: Xms
Built at: Thu Jan 01 1970 00:00:00 GMT
Asset Size Chunks Chunk Names
@ -1618,7 +1618,7 @@ Entrypoint main = bundle.js
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
Child child:
Time: Xms
@ -2042,6 +2042,8 @@ Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/preset-errors-o
"
`;
exports[`StatsTestCases should print correct stats for preset-errors-warnings 1`] = `""`;
exports[`StatsTestCases should print correct stats for preset-minimal 1`] = `" 10 modules"`;
exports[`StatsTestCases should print correct stats for preset-minimal-simple 1`] = `" 1 module"`;

2
test/fixtures/b.js vendored
View File

@ -3,4 +3,4 @@ module.exports = function b() {
};
// Test CJS top-level return
return;
return;

View File

@ -0,0 +1,5 @@
module.exports = {
mode: "production",
entry: "./index",
stats: "errors-warnings"
};

View File

@ -1722,9 +1722,9 @@ escodegen@^1.9.1:
source-map "~0.6.1"
eslint-config-prettier@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.1.0.tgz#181364895899fff9fd3605fecb5c4f20e7d5f395"
integrity sha512-zILwX9/Ocz4SV2vX7ox85AsrAgXV3f2o2gpIicdMIOra48WYqgUnWNH/cR/iHtmD2Vb3dLSC3LiEJnS05Gkw7w==
version "4.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.2.0.tgz#70b946b629cd0e3e98233fd9ecde4cb9778de96c"
integrity sha512-y0uWc/FRfrHhpPZCYflWC8aE0KRJRY04rdZVfl8cL3sEZmOYyaBdhdlQPjKZBnuRMyLVK+JUZr7HaZFClQiH4w==
dependencies:
get-stdin "^6.0.0"
@ -1737,9 +1737,9 @@ eslint-plugin-es@^1.3.1:
regexpp "^2.0.1"
eslint-plugin-jest@^22.2.2:
version "22.4.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.4.1.tgz#a5fd6f7a2a41388d16f527073b778013c5189a9c"
integrity sha512-gcLfn6P2PrFAVx3AobaOzlIEevpAEf9chTpFZz7bYfc7pz8XRv7vuKTIE4hxPKZSha6XWKKplDQ0x9Pq8xX2mg==
version "22.5.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.5.1.tgz#a31dfe9f9513c6af7c17ece4c65535a1370f060b"
integrity sha512-c3WjZR/HBoi4GedJRwo2OGHa8Pzo1EbSVwQ2HFzJ+4t2OoYM7Alx646EH/aaxZ+9eGcPiq0FT0UGkRuFFx2FHg==
eslint-plugin-node@^8.0.0:
version "8.0.1"
@ -2243,9 +2243,9 @@ glob@^5.0.15:
path-is-absolute "^1.0.0"
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
@ -4604,14 +4604,14 @@ raw-loader@~0.5.1:
integrity sha1-DD0L6u2KAclm2Xh793goElKpeao=
react-dom@^16.8.0:
version "16.8.5"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.5.tgz#b3e37d152b49e07faaa8de41fdf562be3463335e"
integrity sha512-VIEIvZLpFafsfu4kgmftP5L8j7P1f0YThfVTrANMhZUFMDOsA6e0kfR6wxw/8xxKs4NB59TZYbxNdPCDW34x4w==
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.13.5"
scheduler "^0.13.6"
react-is@^16.8.1:
version "16.8.3"
@ -4905,7 +4905,7 @@ sax@^1.2.4:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
scheduler@^0.13.5, scheduler@^0.13.6:
scheduler@^0.13.6:
version "0.13.6"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889"
integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==
@ -5000,9 +5000,9 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
simple-git@^1.65.0, simple-git@^1.85.0:
version "1.110.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.110.0.tgz#54eb179089d055a7783d32399246cebc9d9933e9"
integrity sha512-UYY0rQkknk0P5eb+KW+03F4TevZ9ou0H+LoGaj7iiVgpnZH4wdj/HTViy/1tNNkmIPcmtxuBqXWiYt2YwlRKOQ==
version "1.113.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.113.0.tgz#668989728a1e9cf4ec6c72b69ea2eecc93489bea"
integrity sha512-i9WVsrK2u0G/cASI9nh7voxOk9mhanWY9eGtWBDSYql6m49Yk5/Fan6uZsDr/xmzv8n+eQ8ahKCoEr8cvU3h+g==
dependencies:
debug "^4.0.1"