@angular-devkit/build-angular 12.0.0-rc.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -13
- package/package.json +24 -24
- package/plugins/karma.d.ts +1 -1
- package/plugins/karma.js +1 -1
- package/src/app-shell/index.d.ts +7 -0
- package/src/app-shell/index.js +9 -7
- package/src/app-shell/schema.json +1 -4
- package/src/babel/babel-loader.d.ts +2 -1
- package/src/babel/presets/application.d.ts +7 -0
- package/src/babel/presets/application.js +3 -3
- package/src/babel/webpack-loader.d.ts +7 -0
- package/src/babel/webpack-loader.js +6 -5
- package/src/babel-bazel.d.ts +2 -1
- package/src/browser/index.d.ts +1 -1
- package/src/browser/index.js +34 -33
- package/src/browser/schema.d.ts +1 -5
- package/src/browser/schema.json +11 -57
- package/src/browser/tests/setup.d.ts +1 -1
- package/src/browser/tests/setup.js +7 -0
- package/src/dev-server/index.d.ts +1 -1
- package/src/dev-server/index.js +22 -15
- package/src/dev-server/schema.json +1 -3
- package/src/dev-server/tests/execute-fetch.d.ts +1 -1
- package/src/dev-server/tests/execute-fetch.js +4 -4
- package/src/dev-server/tests/setup.d.ts +7 -0
- package/src/dev-server/tests/setup.js +7 -0
- package/src/extract-i18n/index.d.ts +1 -1
- package/src/extract-i18n/index.js +10 -12
- package/src/extract-i18n/ivy-extract-loader.d.ts +7 -0
- package/src/extract-i18n/ivy-extract-loader.js +7 -6
- package/src/extract-i18n/schema.json +2 -14
- package/src/index.d.ts +6 -6
- package/src/index.js +1 -1
- package/src/karma/find-tests.d.ts +7 -0
- package/src/karma/find-tests.js +4 -4
- package/src/karma/index.d.ts +1 -1
- package/src/karma/index.js +21 -13
- package/src/karma/schema.json +7 -28
- package/src/ng-packagr/index.d.ts +1 -1
- package/src/ng-packagr/index.js +4 -4
- package/src/ng-packagr/schema.json +1 -3
- package/src/protractor/index.d.ts +1 -1
- package/src/protractor/index.js +8 -8
- package/src/protractor/schema.json +1 -3
- package/src/server/index.d.ts +1 -1
- package/src/server/index.js +6 -6
- package/src/server/schema.d.ts +1 -5
- package/src/server/schema.json +7 -35
- package/src/test-utils.d.ts +1 -1
- package/src/test-utils.js +4 -4
- package/src/testing/builder-harness.d.ts +2 -2
- package/src/testing/builder-harness.js +10 -8
- package/src/testing/file-watching.d.ts +1 -1
- package/src/testing/file-watching.js +7 -0
- package/src/testing/index.d.ts +1 -1
- package/src/testing/index.js +7 -0
- package/src/testing/jasmine-helpers.d.ts +2 -2
- package/src/testing/jasmine-helpers.js +7 -0
- package/src/transforms.d.ts +1 -1
- package/src/transforms.js +7 -0
- package/src/tslint/index.d.ts +7 -0
- package/src/tslint/index.js +10 -12
- package/src/tslint/schema.json +1 -1
- package/src/typings.d.ts +2 -1
- package/src/utils/action-cache.d.ts +7 -0
- package/src/utils/action-cache.js +6 -8
- package/src/utils/action-executor.d.ts +7 -0
- package/src/utils/action-executor.js +13 -28
- package/src/utils/build-browser-features.d.ts +1 -1
- package/src/utils/build-browser-features.js +3 -7
- package/src/utils/build-options.d.ts +1 -2
- package/src/utils/build-options.js +1 -1
- package/src/utils/bundle-calculator.d.ts +7 -0
- package/src/utils/bundle-calculator.js +32 -31
- package/src/utils/cache-path.d.ts +7 -0
- package/src/utils/cache-path.js +3 -3
- package/src/utils/check-port.d.ts +7 -0
- package/src/utils/check-port.js +4 -4
- package/src/utils/color.d.ts +1 -1
- package/src/utils/color.js +3 -3
- package/src/utils/copy-assets.d.ts +7 -0
- package/src/utils/copy-assets.js +3 -3
- package/src/utils/copy-file.d.ts +2 -2
- package/src/utils/copy-file.js +4 -4
- package/src/utils/default-progress.d.ts +1 -1
- package/src/utils/default-progress.js +1 -1
- package/src/utils/delete-output-dir.d.ts +7 -0
- package/src/utils/delete-output-dir.js +3 -3
- package/src/utils/empty.js +0 -1
- package/src/utils/environment-options.d.ts +7 -0
- package/src/utils/environment-options.js +3 -3
- package/src/utils/find-up.d.ts +7 -0
- package/src/utils/find-up.js +3 -3
- package/src/utils/i18n-inlining.d.ts +1 -1
- package/src/utils/i18n-inlining.js +8 -1
- package/src/utils/i18n-options.d.ts +1 -1
- package/src/utils/i18n-options.js +11 -3
- package/src/utils/index-file/augment-index-html.d.ts +1 -1
- package/src/utils/index-file/augment-index-html.js +6 -11
- package/src/utils/index-file/html-rewriting-stream.d.ts +1 -1
- package/src/utils/index-file/html-rewriting-stream.js +2 -2
- package/src/utils/index-file/index-html-generator.d.ts +1 -1
- package/src/utils/index-file/index-html-generator.js +7 -11
- package/src/utils/index-file/inline-critical-css.d.ts +1 -1
- package/src/utils/index-file/inline-critical-css.js +1 -1
- package/src/utils/index-file/inline-fonts.d.ts +1 -1
- package/src/utils/index-file/inline-fonts.js +18 -19
- package/src/utils/index.d.ts +1 -1
- package/src/utils/index.js +1 -1
- package/src/utils/is-directory.d.ts +1 -1
- package/src/utils/is-directory.js +2 -3
- package/src/utils/load-translations.d.ts +7 -0
- package/src/utils/load-translations.js +9 -19
- package/src/utils/normalize-asset-patterns.d.ts +1 -1
- package/src/utils/normalize-asset-patterns.js +6 -7
- package/src/utils/normalize-builder-schema.d.ts +1 -1
- package/src/utils/normalize-builder-schema.js +5 -6
- package/src/utils/normalize-file-replacements.d.ts +1 -1
- package/src/utils/normalize-file-replacements.js +2 -3
- package/src/utils/normalize-optimization.d.ts +1 -1
- package/src/utils/normalize-optimization.js +12 -8
- package/src/utils/normalize-source-maps.d.ts +1 -1
- package/src/utils/normalize-source-maps.js +3 -3
- package/src/utils/output-paths.d.ts +7 -0
- package/src/utils/output-paths.js +7 -4
- package/src/utils/package-chunk-sort.d.ts +1 -1
- package/src/utils/package-chunk-sort.js +10 -3
- package/src/utils/process-bundle-bootstrap.js +3 -2
- package/src/utils/process-bundle.d.ts +2 -2
- package/src/utils/process-bundle.js +31 -40
- package/src/utils/read-tsconfig.d.ts +1 -1
- package/src/utils/read-tsconfig.js +2 -4
- package/src/utils/run-module-as-observable-fork.d.ts +1 -1
- package/src/utils/run-module-as-observable-fork.js +9 -2
- package/src/utils/run-module-worker.js +1 -3
- package/src/utils/service-worker.d.ts +1 -1
- package/src/utils/service-worker.js +3 -3
- package/src/utils/spinner.d.ts +1 -1
- package/src/utils/spinner.js +1 -1
- package/src/utils/strip-bom.d.ts +1 -1
- package/src/utils/strip-bom.js +2 -3
- package/src/utils/tty.d.ts +1 -1
- package/src/utils/tty.js +1 -1
- package/src/utils/url.d.ts +1 -1
- package/src/utils/url.js +1 -1
- package/src/utils/version.d.ts +1 -1
- package/src/utils/version.js +3 -3
- package/src/utils/webpack-browser-config.d.ts +1 -1
- package/src/utils/webpack-browser-config.js +9 -2
- package/src/utils/webpack-diagnostics.d.ts +2 -2
- package/src/utils/webpack-diagnostics.js +4 -4
- package/src/utils/workers.d.ts +1 -1
- package/src/utils/workers.js +1 -1
- package/src/webpack/configs/browser.d.ts +7 -0
- package/src/webpack/configs/browser.js +3 -3
- package/src/webpack/configs/common.d.ts +7 -0
- package/src/webpack/configs/common.js +16 -19
- package/src/webpack/configs/dev-server.d.ts +1 -1
- package/src/webpack/configs/dev-server.js +7 -6
- package/src/webpack/configs/index.d.ts +1 -1
- package/src/webpack/configs/index.js +7 -7
- package/src/webpack/configs/server.d.ts +7 -0
- package/src/webpack/configs/server.js +4 -4
- package/src/webpack/configs/stats.d.ts +1 -1
- package/src/webpack/configs/stats.js +1 -1
- package/src/webpack/configs/styles.d.ts +7 -0
- package/src/webpack/configs/styles.js +6 -10
- package/src/webpack/configs/test.d.ts +1 -1
- package/src/webpack/configs/test.js +2 -5
- package/src/webpack/configs/typescript.d.ts +7 -0
- package/src/webpack/configs/typescript.js +4 -6
- package/src/webpack/configs/worker.d.ts +7 -0
- package/src/webpack/configs/worker.js +3 -3
- package/src/webpack/es5-jit-polyfills.js +2 -1
- package/src/webpack/es5-polyfills.js +2 -3
- package/src/webpack/jit-polyfills.js +2 -1
- package/src/webpack/plugins/analytics.d.ts +2 -2
- package/src/webpack/plugins/analytics.js +9 -9
- package/src/webpack/plugins/any-component-style-budget-checker.d.ts +1 -1
- package/src/webpack/plugins/any-component-style-budget-checker.js +3 -9
- package/src/webpack/plugins/builder-watch-plugin.d.ts +1 -1
- package/src/webpack/plugins/builder-watch-plugin.js +7 -0
- package/src/webpack/plugins/common-js-usage-warn-plugin.d.ts +1 -1
- package/src/webpack/plugins/common-js-usage-warn-plugin.js +10 -10
- package/src/webpack/plugins/dedupe-module-resolve-plugin.d.ts +1 -1
- package/src/webpack/plugins/dedupe-module-resolve-plugin.js +9 -2
- package/src/webpack/plugins/hmr/hmr-accept.d.ts +1 -1
- package/src/webpack/plugins/hmr/hmr-accept.js +6 -9
- package/src/webpack/plugins/hmr/hmr-loader.d.ts +1 -1
- package/src/webpack/plugins/hmr/hmr-loader.js +2 -2
- package/src/webpack/plugins/index-html-webpack-plugin.d.ts +7 -0
- package/src/webpack/plugins/index-html-webpack-plugin.js +6 -6
- package/src/webpack/plugins/index.d.ts +2 -2
- package/src/webpack/plugins/index.js +1 -1
- package/src/webpack/plugins/karma/karma-context.html +31 -30
- package/src/webpack/plugins/karma/karma-debug.html +34 -33
- package/src/webpack/plugins/karma/karma.d.ts +7 -0
- package/src/webpack/plugins/karma/karma.js +13 -11
- package/src/webpack/plugins/optimize-css-webpack-plugin.d.ts +7 -0
- package/src/webpack/plugins/optimize-css-webpack-plugin.js +18 -11
- package/src/webpack/plugins/postcss-cli-resources.d.ts +7 -0
- package/src/webpack/plugins/postcss-cli-resources.js +11 -9
- package/src/webpack/plugins/remove-hash-plugin.d.ts +1 -1
- package/src/webpack/plugins/remove-hash-plugin.js +9 -4
- package/src/webpack/plugins/scripts-webpack-plugin.d.ts +1 -1
- package/src/webpack/plugins/scripts-webpack-plugin.js +11 -10
- package/src/webpack/plugins/single-test-transform.d.ts +1 -1
- package/src/webpack/plugins/single-test-transform.js +5 -5
- package/src/webpack/plugins/suppress-entry-chunks-webpack-plugin.d.ts +1 -1
- package/src/webpack/plugins/suppress-entry-chunks-webpack-plugin.js +1 -1
- package/src/webpack/utils/async-chunks.d.ts +1 -1
- package/src/webpack/utils/async-chunks.js +9 -1
- package/src/webpack/utils/helpers.d.ts +1 -1
- package/src/webpack/utils/helpers.js +2 -2
- package/src/webpack/utils/stats.d.ts +1 -1
- package/src/webpack/utils/stats.js +39 -33
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.webpackStatsLogger = exports.createWebpackLoggingCallback = exports.statsHasWarnings = exports.statsHasErrors = exports.statsErrorsToString = exports.statsWarningsToString = exports.IGNORE_WARNINGS = exports.generateBundleStats = exports.formatSize = void 0;
|
|
4
11
|
const core_1 = require("@angular-devkit/core");
|
|
@@ -20,7 +27,7 @@ exports.formatSize = formatSize;
|
|
|
20
27
|
function generateBundleStats(info) {
|
|
21
28
|
var _a, _b, _c;
|
|
22
29
|
const size = typeof info.size === 'number' ? info.size : '-';
|
|
23
|
-
const files = (_b = (_a = info.files) === null || _a === void 0 ? void 0 : _a.filter(f => !f.endsWith('.map')).map(f => path.basename(f)).join(', ')) !== null && _b !== void 0 ? _b : '';
|
|
30
|
+
const files = (_b = (_a = info.files) === null || _a === void 0 ? void 0 : _a.filter((f) => !f.endsWith('.map')).map((f) => path.basename(f)).join(', ')) !== null && _b !== void 0 ? _b : '';
|
|
24
31
|
const names = ((_c = info.names) === null || _c === void 0 ? void 0 : _c.length) ? info.names.join(', ') : '-';
|
|
25
32
|
const initial = !!(info.entry || info.initial);
|
|
26
33
|
const chunkType = info.chunkType || 'unknown';
|
|
@@ -32,10 +39,10 @@ function generateBundleStats(info) {
|
|
|
32
39
|
}
|
|
33
40
|
exports.generateBundleStats = generateBundleStats;
|
|
34
41
|
function generateBuildStatsTable(data, colors, showTotalSize) {
|
|
35
|
-
const g = (x) => colors ? color_1.colors.greenBright(x) : x;
|
|
36
|
-
const c = (x) => colors ? color_1.colors.cyanBright(x) : x;
|
|
37
|
-
const bold = (x) => colors ? color_1.colors.bold(x) : x;
|
|
38
|
-
const dim = (x) => colors ? color_1.colors.dim(x) : x;
|
|
42
|
+
const g = (x) => (colors ? color_1.colors.greenBright(x) : x);
|
|
43
|
+
const c = (x) => (colors ? color_1.colors.cyanBright(x) : x);
|
|
44
|
+
const bold = (x) => (colors ? color_1.colors.bold(x) : x);
|
|
45
|
+
const dim = (x) => (colors ? color_1.colors.dim(x) : x);
|
|
39
46
|
const changedEntryChunksStats = [];
|
|
40
47
|
const changedLazyChunksStats = [];
|
|
41
48
|
let initialModernTotalSize = 0;
|
|
@@ -97,22 +104,23 @@ function generateBuildStatsTable(data, colors, showTotalSize) {
|
|
|
97
104
|
}
|
|
98
105
|
return textTable(bundleInfo, {
|
|
99
106
|
hsep: dim(' | '),
|
|
100
|
-
stringLength: s => color_1.removeColor(s).length,
|
|
107
|
+
stringLength: (s) => color_1.removeColor(s).length,
|
|
101
108
|
align: ['l', 'l', 'r'],
|
|
102
109
|
});
|
|
103
110
|
}
|
|
104
111
|
function generateBuildStats(hash, time, colors) {
|
|
105
|
-
const w = (x) => colors ? color_1.colors.bold.white(x) : x;
|
|
112
|
+
const w = (x) => (colors ? color_1.colors.bold.white(x) : x);
|
|
106
113
|
return `Build at: ${w(new Date().toISOString())} - Hash: ${w(hash)} - Time: ${w('' + time)}ms`;
|
|
107
114
|
}
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
function statsToString(json,
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
|
+
statsConfig, bundleState) {
|
|
110
118
|
var _a, _b;
|
|
111
119
|
if (!((_a = json.chunks) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
112
120
|
return '';
|
|
113
121
|
}
|
|
114
122
|
const colors = statsConfig.colors;
|
|
115
|
-
const rs = (x) => colors ? color_1.colors.reset(x) : x;
|
|
123
|
+
const rs = (x) => (colors ? color_1.colors.reset(x) : x);
|
|
116
124
|
const changedChunksStats = bundleState !== null && bundleState !== void 0 ? bundleState : [];
|
|
117
125
|
let unchangedChunkNumber = 0;
|
|
118
126
|
if (!(bundleState === null || bundleState === void 0 ? void 0 : bundleState.length)) {
|
|
@@ -120,8 +128,8 @@ function statsToString(json, statsConfig, bundleState) {
|
|
|
120
128
|
if (!chunk.rendered) {
|
|
121
129
|
continue;
|
|
122
130
|
}
|
|
123
|
-
const assets = (_b = json.assets) === null || _b === void 0 ? void 0 : _b.filter(asset => { var _a; return (_a = chunk.files) === null || _a === void 0 ? void 0 : _a.includes(asset.name); });
|
|
124
|
-
const summedSize = assets === null || assets === void 0 ? void 0 : assets.filter(asset => !asset.name.endsWith('.map')).reduce((total, asset) => total + asset.size, 0);
|
|
131
|
+
const assets = (_b = json.assets) === null || _b === void 0 ? void 0 : _b.filter((asset) => { var _a; return (_a = chunk.files) === null || _a === void 0 ? void 0 : _a.includes(asset.name); });
|
|
132
|
+
const summedSize = assets === null || assets === void 0 ? void 0 : assets.filter((asset) => !asset.name.endsWith('.map')).reduce((total, asset) => total + asset.size, 0);
|
|
125
133
|
changedChunksStats.push(generateBundleStats({ ...chunk, size: summedSize }));
|
|
126
134
|
}
|
|
127
135
|
unchangedChunkNumber = json.chunks.length - changedChunksStats.length;
|
|
@@ -142,23 +150,25 @@ function statsToString(json, statsConfig, bundleState) {
|
|
|
142
150
|
// This will correct the time and include these.
|
|
143
151
|
let time = 0;
|
|
144
152
|
if (json.builtAt !== undefined && json.time !== undefined) {
|
|
145
|
-
time =
|
|
153
|
+
time = Date.now() - json.builtAt + json.time;
|
|
146
154
|
}
|
|
147
155
|
if (unchangedChunkNumber > 0) {
|
|
148
|
-
return '\n' +
|
|
156
|
+
return ('\n' +
|
|
157
|
+
rs(core_1.tags.stripIndents `
|
|
149
158
|
${statsTable}
|
|
150
159
|
|
|
151
160
|
${unchangedChunkNumber} unchanged chunks
|
|
152
161
|
|
|
153
162
|
${generateBuildStats(json.hash || '', time, colors)}
|
|
154
|
-
`);
|
|
163
|
+
`));
|
|
155
164
|
}
|
|
156
165
|
else {
|
|
157
|
-
return '\n' +
|
|
166
|
+
return ('\n' +
|
|
167
|
+
rs(core_1.tags.stripIndents `
|
|
158
168
|
${statsTable}
|
|
159
169
|
|
|
160
170
|
${generateBuildStats(json.hash || '', time, colors)}
|
|
161
|
-
`);
|
|
171
|
+
`));
|
|
162
172
|
}
|
|
163
173
|
}
|
|
164
174
|
exports.IGNORE_WARNINGS = [
|
|
@@ -168,17 +178,15 @@ exports.IGNORE_WARNINGS = [
|
|
|
168
178
|
// https://github.com/webpack-contrib/source-map-loader/blob/b2de4249c7431dd8432da607e08f0f65e9d64219/src/index.js#L83
|
|
169
179
|
/Failed to parse source map from/,
|
|
170
180
|
];
|
|
171
|
-
//
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
172
182
|
function statsWarningsToString(json, statsConfig) {
|
|
173
183
|
const colors = statsConfig.colors;
|
|
174
|
-
const c = (x) => colors ? color_1.colors.reset.cyan(x) : x;
|
|
175
|
-
const y = (x) => colors ? color_1.colors.reset.yellow(x) : x;
|
|
176
|
-
const yb = (x) => colors ? color_1.colors.reset.yellowBright(x) : x;
|
|
184
|
+
const c = (x) => (colors ? color_1.colors.reset.cyan(x) : x);
|
|
185
|
+
const y = (x) => (colors ? color_1.colors.reset.yellow(x) : x);
|
|
186
|
+
const yb = (x) => (colors ? color_1.colors.reset.yellowBright(x) : x);
|
|
177
187
|
const warnings = json.warnings ? [...json.warnings] : [];
|
|
178
188
|
if (json.children) {
|
|
179
|
-
warnings.push(...json.children
|
|
180
|
-
.map(c => { var _a; return (_a = c.warnings) !== null && _a !== void 0 ? _a : []; })
|
|
181
|
-
.reduce((a, b) => [...a, ...b], []));
|
|
189
|
+
warnings.push(...json.children.map((c) => { var _a; return (_a = c.warnings) !== null && _a !== void 0 ? _a : []; }).reduce((a, b) => [...a, ...b], []));
|
|
182
190
|
}
|
|
183
191
|
let output = '';
|
|
184
192
|
for (const warning of warnings) {
|
|
@@ -203,17 +211,15 @@ function statsWarningsToString(json, statsConfig) {
|
|
|
203
211
|
return output ? '\n' + output : output;
|
|
204
212
|
}
|
|
205
213
|
exports.statsWarningsToString = statsWarningsToString;
|
|
206
|
-
//
|
|
214
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
207
215
|
function statsErrorsToString(json, statsConfig) {
|
|
208
216
|
const colors = statsConfig.colors;
|
|
209
|
-
const c = (x) => colors ? color_1.colors.reset.cyan(x) : x;
|
|
210
|
-
const yb = (x) => colors ? color_1.colors.reset.yellowBright(x) : x;
|
|
211
|
-
const r = (x) => colors ? color_1.colors.reset.redBright(x) : x;
|
|
217
|
+
const c = (x) => (colors ? color_1.colors.reset.cyan(x) : x);
|
|
218
|
+
const yb = (x) => (colors ? color_1.colors.reset.yellowBright(x) : x);
|
|
219
|
+
const r = (x) => (colors ? color_1.colors.reset.redBright(x) : x);
|
|
212
220
|
const errors = json.errors ? [...json.errors] : [];
|
|
213
221
|
if (json.children) {
|
|
214
|
-
errors.push(...json.children
|
|
215
|
-
.map(c => (c === null || c === void 0 ? void 0 : c.errors) || [])
|
|
216
|
-
.reduce((a, b) => [...a, ...b], []));
|
|
222
|
+
errors.push(...json.children.map((c) => (c === null || c === void 0 ? void 0 : c.errors) || []).reduce((a, b) => [...a, ...b], []));
|
|
217
223
|
}
|
|
218
224
|
let output = '';
|
|
219
225
|
for (const error of errors) {
|
|
@@ -240,12 +246,12 @@ function statsErrorsToString(json, statsConfig) {
|
|
|
240
246
|
exports.statsErrorsToString = statsErrorsToString;
|
|
241
247
|
function statsHasErrors(json) {
|
|
242
248
|
var _a, _b;
|
|
243
|
-
return !!(((_a = json.errors) === null || _a === void 0 ? void 0 : _a.length) || ((_b = json.children) === null || _b === void 0 ? void 0 : _b.some(c => { var _a; return (_a = c.errors) === null || _a === void 0 ? void 0 : _a.length; })));
|
|
249
|
+
return !!(((_a = json.errors) === null || _a === void 0 ? void 0 : _a.length) || ((_b = json.children) === null || _b === void 0 ? void 0 : _b.some((c) => { var _a; return (_a = c.errors) === null || _a === void 0 ? void 0 : _a.length; })));
|
|
244
250
|
}
|
|
245
251
|
exports.statsHasErrors = statsHasErrors;
|
|
246
252
|
function statsHasWarnings(json) {
|
|
247
253
|
var _a, _b;
|
|
248
|
-
return !!(((_a = json.warnings) === null || _a === void 0 ? void 0 : _a.length) || ((_b = json.children) === null || _b === void 0 ? void 0 : _b.some(c => { var _a; return (_a = c.warnings) === null || _a === void 0 ? void 0 : _a.length; })));
|
|
254
|
+
return !!(((_a = json.warnings) === null || _a === void 0 ? void 0 : _a.length) || ((_b = json.children) === null || _b === void 0 ? void 0 : _b.some((c) => { var _a; return (_a = c.warnings) === null || _a === void 0 ? void 0 : _a.length; })));
|
|
249
255
|
}
|
|
250
256
|
exports.statsHasWarnings = statsHasWarnings;
|
|
251
257
|
function createWebpackLoggingCallback(verbose, logger) {
|