@angular-devkit/build-angular 14.0.0-next.0 → 14.0.0-next.3
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/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "14.0.0-next.
|
|
3
|
+
"version": "14.0.0-next.3",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
7
7
|
"builders": "builders.json",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@ampproject/remapping": "2.
|
|
10
|
-
"@angular-devkit/architect": "0.1400.0-next.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1400.0-next.
|
|
12
|
-
"@angular-devkit/core": "14.0.0-next.
|
|
13
|
-
"@babel/core": "7.
|
|
14
|
-
"@babel/generator": "7.
|
|
9
|
+
"@ampproject/remapping": "2.1.2",
|
|
10
|
+
"@angular-devkit/architect": "0.1400.0-next.3",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1400.0-next.3",
|
|
12
|
+
"@angular-devkit/core": "14.0.0-next.3",
|
|
13
|
+
"@babel/core": "7.17.5",
|
|
14
|
+
"@babel/generator": "7.17.3",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.16.7",
|
|
16
16
|
"@babel/plugin-proposal-async-generator-functions": "7.16.8",
|
|
17
17
|
"@babel/plugin-transform-async-to-generator": "7.16.8",
|
|
18
|
-
"@babel/plugin-transform-runtime": "7.
|
|
18
|
+
"@babel/plugin-transform-runtime": "7.17.0",
|
|
19
19
|
"@babel/preset-env": "7.16.11",
|
|
20
|
-
"@babel/runtime": "7.
|
|
20
|
+
"@babel/runtime": "7.17.2",
|
|
21
21
|
"@babel/template": "7.16.7",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.6",
|
|
23
|
-
"@ngtools/webpack": "14.0.0-next.
|
|
23
|
+
"@ngtools/webpack": "14.0.0-next.3",
|
|
24
24
|
"ansi-colors": "4.1.1",
|
|
25
25
|
"babel-loader": "8.2.3",
|
|
26
26
|
"babel-plugin-istanbul": "6.1.1",
|
|
27
27
|
"browserslist": "^4.9.1",
|
|
28
28
|
"cacache": "15.3.0",
|
|
29
29
|
"copy-webpack-plugin": "10.2.4",
|
|
30
|
-
"core-js": "3.21.
|
|
30
|
+
"core-js": "3.21.1",
|
|
31
31
|
"critters": "0.0.16",
|
|
32
32
|
"css-loader": "6.6.0",
|
|
33
|
-
"esbuild-wasm": "0.14.
|
|
33
|
+
"esbuild-wasm": "0.14.23",
|
|
34
34
|
"glob": "7.2.0",
|
|
35
35
|
"https-proxy-agent": "5.0.0",
|
|
36
36
|
"inquirer": "8.2.0",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"karma-source-map-support": "1.4.0",
|
|
39
39
|
"less": "4.1.2",
|
|
40
40
|
"less-loader": "10.2.0",
|
|
41
|
-
"license-webpack-plugin": "4.0.
|
|
41
|
+
"license-webpack-plugin": "4.0.2",
|
|
42
42
|
"loader-utils": "3.2.0",
|
|
43
43
|
"mini-css-extract-plugin": "2.5.3",
|
|
44
|
-
"minimatch": "
|
|
44
|
+
"minimatch": "5.0.0",
|
|
45
45
|
"open": "8.4.0",
|
|
46
46
|
"ora": "5.4.1",
|
|
47
47
|
"parse5-html-rewriting-stream": "6.0.1",
|
|
@@ -49,29 +49,29 @@
|
|
|
49
49
|
"postcss": "8.4.6",
|
|
50
50
|
"postcss-import": "14.0.2",
|
|
51
51
|
"postcss-loader": "6.2.1",
|
|
52
|
-
"postcss-preset-env": "7.
|
|
52
|
+
"postcss-preset-env": "7.4.1",
|
|
53
53
|
"regenerator-runtime": "0.13.9",
|
|
54
54
|
"resolve-url-loader": "5.0.0",
|
|
55
55
|
"rxjs": "6.6.7",
|
|
56
|
-
"sass": "1.49.
|
|
57
|
-
"sass-loader": "12.
|
|
56
|
+
"sass": "1.49.8",
|
|
57
|
+
"sass-loader": "12.6.0",
|
|
58
58
|
"semver": "7.3.5",
|
|
59
59
|
"source-map-loader": "3.0.1",
|
|
60
60
|
"source-map-support": "0.5.21",
|
|
61
61
|
"stylus": "0.56.0",
|
|
62
62
|
"stylus-loader": "6.2.0",
|
|
63
|
-
"terser": "5.
|
|
63
|
+
"terser": "5.11.0",
|
|
64
64
|
"text-table": "0.2.0",
|
|
65
65
|
"tree-kill": "1.2.2",
|
|
66
66
|
"tslib": "2.3.1",
|
|
67
|
-
"webpack": "5.
|
|
67
|
+
"webpack": "5.69.1",
|
|
68
68
|
"webpack-dev-middleware": "5.3.1",
|
|
69
69
|
"webpack-dev-server": "4.7.4",
|
|
70
70
|
"webpack-merge": "5.8.0",
|
|
71
71
|
"webpack-subresource-integrity": "5.1.0"
|
|
72
72
|
},
|
|
73
73
|
"optionalDependencies": {
|
|
74
|
-
"esbuild": "0.14.
|
|
74
|
+
"esbuild": "0.14.23"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@angular/compiler-cli": "^14.0.0 || ^14.0.0-next",
|
|
@@ -6,11 +6,7 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const remapping_1 = __importDefault(require("@ampproject/remapping"));
|
|
14
10
|
const babel_loader_1 = require("babel-loader");
|
|
15
11
|
const typescript_1 = require("typescript");
|
|
16
12
|
const load_esm_1 = require("../utils/load-esm");
|
|
@@ -166,12 +162,13 @@ exports.default = (0, babel_loader_1.custom)(() => {
|
|
|
166
162
|
return { custom: customOptions, loader: loaderOptions };
|
|
167
163
|
},
|
|
168
164
|
config(configuration, { customOptions }) {
|
|
165
|
+
var _a;
|
|
169
166
|
return {
|
|
170
167
|
...configuration.options,
|
|
171
168
|
// Using `false` disables babel from attempting to locate sourcemaps or process any inline maps.
|
|
172
169
|
// The babel types do not include the false option even though it is valid
|
|
173
170
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
174
|
-
inputSourceMap: false,
|
|
171
|
+
inputSourceMap: (_a = configuration.options.inputSourceMap) !== null && _a !== void 0 ? _a : false,
|
|
175
172
|
presets: [
|
|
176
173
|
...(configuration.options.presets || []),
|
|
177
174
|
[
|
|
@@ -195,22 +192,5 @@ exports.default = (0, babel_loader_1.custom)(() => {
|
|
|
195
192
|
],
|
|
196
193
|
};
|
|
197
194
|
},
|
|
198
|
-
result(result, { map: inputSourceMap }) {
|
|
199
|
-
if (result.map && inputSourceMap) {
|
|
200
|
-
// Merge the intermediate sourcemap generated by babel with the input source map.
|
|
201
|
-
// The casting is required due to slight differences in the types for babel and
|
|
202
|
-
// `@ampproject/remapping` source map objects but both are compatible with Webpack.
|
|
203
|
-
// This method for merging is used because it provides more accurate output
|
|
204
|
-
// and is faster while using less memory.
|
|
205
|
-
result.map = {
|
|
206
|
-
// Convert the SourceMap back to simple plain object.
|
|
207
|
-
// This is needed because otherwise code-coverage will fail with `don't know how to turn this value into a node`
|
|
208
|
-
// Which is thrown by Babel if it is invoked again from `istanbul-lib-instrument`.
|
|
209
|
-
// https://github.com/babel/babel/blob/780aa48d2a34dc55f556843074b6aed45e7eabeb/packages/babel-types/src/converters/valueToNode.ts#L115-L130
|
|
210
|
-
...(0, remapping_1.default)([result.map, inputSourceMap], () => null),
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
return result;
|
|
214
|
-
},
|
|
215
195
|
};
|
|
216
196
|
});
|
|
@@ -155,27 +155,38 @@ const init = (config, emitter) => {
|
|
|
155
155
|
compiler.hooks.invalid.tap('karma', () => handler());
|
|
156
156
|
compiler.hooks.watchRun.tapAsync('karma', (_, callback) => handler(callback));
|
|
157
157
|
compiler.hooks.run.tapAsync('karma', (_, callback) => handler(callback));
|
|
158
|
+
webpackMiddleware = (0, webpack_dev_middleware_1.default)(compiler, webpackMiddlewareConfig);
|
|
159
|
+
emitter.on('exit', (done) => {
|
|
160
|
+
webpackMiddleware.close();
|
|
161
|
+
done();
|
|
162
|
+
});
|
|
158
163
|
function unblock() {
|
|
159
164
|
isBlocked = false;
|
|
160
165
|
blocked.forEach((cb) => cb());
|
|
161
166
|
blocked = [];
|
|
162
167
|
}
|
|
163
168
|
let lastCompilationHash;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
169
|
+
let isFirstRun = true;
|
|
170
|
+
return new Promise((resolve) => {
|
|
171
|
+
compiler.hooks.done.tap('karma', (stats) => {
|
|
172
|
+
if (isFirstRun) {
|
|
173
|
+
// This is needed to block Karma from launching browsers before Webpack writes the assets in memory.
|
|
174
|
+
// See the below:
|
|
175
|
+
// https://github.com/karma-runner/karma-chrome-launcher/issues/154#issuecomment-986661937
|
|
176
|
+
// https://github.com/angular/angular-cli/issues/22495
|
|
177
|
+
isFirstRun = false;
|
|
178
|
+
resolve();
|
|
179
|
+
}
|
|
180
|
+
if (stats.hasErrors()) {
|
|
181
|
+
lastCompilationHash = undefined;
|
|
182
|
+
}
|
|
183
|
+
else if (stats.hash != lastCompilationHash) {
|
|
184
|
+
// Refresh karma only when there are no webpack errors, and if the compilation changed.
|
|
185
|
+
lastCompilationHash = stats.hash;
|
|
186
|
+
emitter.refreshFiles();
|
|
187
|
+
}
|
|
188
|
+
unblock();
|
|
189
|
+
});
|
|
179
190
|
});
|
|
180
191
|
};
|
|
181
192
|
init.$inject = ['config', 'emitter'];
|
|
@@ -37,6 +37,10 @@ class NamedChunksPlugin {
|
|
|
37
37
|
if (!(block instanceof webpack_1.AsyncDependenciesBlock)) {
|
|
38
38
|
continue;
|
|
39
39
|
}
|
|
40
|
+
if (block.groupOptions.name) {
|
|
41
|
+
// Ignore groups which have been named already.
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
40
44
|
for (const dependency of block.dependencies) {
|
|
41
45
|
if (dependency instanceof ImportDependency) {
|
|
42
46
|
return webpack_1.Template.toPath(dependency.request);
|