@angular-devkit/build-angular 0.901.5 → 0.901.9
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,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "0.901.
|
|
3
|
+
"version": "0.901.9",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"experimental": true,
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"typings": "src/index.d.ts",
|
|
8
8
|
"builders": "builders.json",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@angular-devkit/architect": "0.901.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.901.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.901.
|
|
13
|
-
"@angular-devkit/core": "9.1.
|
|
10
|
+
"@angular-devkit/architect": "0.901.9",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.901.9",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.901.9",
|
|
13
|
+
"@angular-devkit/core": "9.1.9",
|
|
14
14
|
"@babel/core": "7.9.0",
|
|
15
15
|
"@babel/generator": "7.9.3",
|
|
16
16
|
"@babel/preset-env": "7.9.0",
|
|
17
17
|
"@babel/template": "7.8.6",
|
|
18
18
|
"@jsdevtools/coverage-istanbul-loader": "3.0.3",
|
|
19
|
-
"@ngtools/webpack": "9.1.
|
|
19
|
+
"@ngtools/webpack": "9.1.9",
|
|
20
20
|
"ajv": "6.12.0",
|
|
21
21
|
"autoprefixer": "9.7.4",
|
|
22
22
|
"babel-loader": "8.0.6",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"cacache": "15.0.0",
|
|
25
25
|
"caniuse-lite": "^1.0.30001032",
|
|
26
26
|
"circular-dependency-plugin": "5.2.0",
|
|
27
|
-
"copy-webpack-plugin": "
|
|
27
|
+
"copy-webpack-plugin": "6.0.2",
|
|
28
28
|
"core-js": "3.6.4",
|
|
29
29
|
"css-loader": "3.5.1",
|
|
30
30
|
"cssnano": "4.1.10",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"glob": "7.1.6",
|
|
34
34
|
"jest-worker": "25.1.0",
|
|
35
35
|
"karma-source-map-support": "1.4.0",
|
|
36
|
-
"less": "3.11.
|
|
36
|
+
"less": "3.11.3",
|
|
37
37
|
"less-loader": "5.0.0",
|
|
38
38
|
"license-webpack-plugin": "2.1.4",
|
|
39
39
|
"loader-utils": "2.0.0",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"stylus-loader": "3.0.2",
|
|
61
61
|
"tree-kill": "1.2.2",
|
|
62
62
|
"terser": "4.6.10",
|
|
63
|
-
"terser-webpack-plugin": "
|
|
63
|
+
"terser-webpack-plugin": "3.0.3",
|
|
64
64
|
"webpack": "4.42.0",
|
|
65
65
|
"webpack-dev-middleware": "3.7.2",
|
|
66
|
-
"webpack-dev-server": "3.
|
|
66
|
+
"webpack-dev-server": "3.11.0",
|
|
67
67
|
"webpack-merge": "4.2.2",
|
|
68
68
|
"webpack-sources": "1.4.3",
|
|
69
69
|
"webpack-subresource-integrity": "1.4.0",
|
|
@@ -185,27 +185,37 @@ function getCommonConfig(wco) {
|
|
|
185
185
|
if (buildOptions.assets.length) {
|
|
186
186
|
const copyWebpackPluginPatterns = buildOptions.assets.map((asset) => {
|
|
187
187
|
// Resolve input paths relative to workspace root and add slash at the end.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
// tslint:disable-next-line: prefer-const
|
|
189
|
+
let { input, output, ignore = [], glob } = asset;
|
|
190
|
+
input = path.resolve(root, input).replace(/\\/g, '/');
|
|
191
|
+
input = input.endsWith('/') ? input : input + '/';
|
|
192
|
+
output = output.endsWith('/') ? output : output + '/';
|
|
193
|
+
if (output.startsWith('..')) {
|
|
194
|
+
throw new Error('An asset cannot be written to a location outside of the output path.');
|
|
194
195
|
}
|
|
195
196
|
return {
|
|
196
|
-
context:
|
|
197
|
+
context: input,
|
|
197
198
|
// Now we remove starting slash to make Webpack place it from the output root.
|
|
198
|
-
to:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
to: output.replace(/^\//, ''),
|
|
200
|
+
from: glob,
|
|
201
|
+
noErrorOnMissing: true,
|
|
202
|
+
globOptions: {
|
|
202
203
|
dot: true,
|
|
204
|
+
ignore: [
|
|
205
|
+
'.gitkeep',
|
|
206
|
+
'**/.DS_Store',
|
|
207
|
+
'**/Thumbs.db',
|
|
208
|
+
// Negate patterns needs to be absolute because copy-webpack-plugin uses absolute globs which
|
|
209
|
+
// causes negate patterns not to match.
|
|
210
|
+
// See: https://github.com/webpack-contrib/copy-webpack-plugin/issues/498#issuecomment-639327909
|
|
211
|
+
...ignore,
|
|
212
|
+
].map(i => path.posix.join(input, i)),
|
|
203
213
|
},
|
|
204
214
|
};
|
|
205
215
|
});
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
216
|
+
extraPlugins.push(new CopyWebpackPlugin({
|
|
217
|
+
patterns: copyWebpackPluginPatterns,
|
|
218
|
+
}));
|
|
209
219
|
}
|
|
210
220
|
if (buildOptions.progress) {
|
|
211
221
|
extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose }));
|
|
@@ -331,12 +341,13 @@ function getCommonConfig(wco) {
|
|
|
331
341
|
// Name mangling is handled within the browser builder
|
|
332
342
|
mangle: environment_options_1.allowMangle && buildOptions.platform !== 'server' && !differentialLoadingMode,
|
|
333
343
|
};
|
|
344
|
+
const globalScriptsNames = globalScriptsByBundleName.map(s => s.bundleName);
|
|
334
345
|
extraMinimizers.push(new TerserPlugin({
|
|
335
346
|
sourceMap: scriptsSourceMap,
|
|
336
347
|
parallel: utils_1.maxWorkers,
|
|
337
348
|
cache: !environment_options_1.cachingDisabled && cache_path_1.findCachePath('terser-webpack'),
|
|
338
349
|
extractComments: false,
|
|
339
|
-
|
|
350
|
+
exclude: globalScriptsNames,
|
|
340
351
|
terserOptions,
|
|
341
352
|
}),
|
|
342
353
|
// Script bundles are fully optimized here in one step since they are never downleveled.
|
|
@@ -346,7 +357,7 @@ function getCommonConfig(wco) {
|
|
|
346
357
|
parallel: utils_1.maxWorkers,
|
|
347
358
|
cache: !environment_options_1.cachingDisabled && cache_path_1.findCachePath('terser-webpack'),
|
|
348
359
|
extractComments: false,
|
|
349
|
-
|
|
360
|
+
include: globalScriptsNames,
|
|
350
361
|
terserOptions: {
|
|
351
362
|
...terserOptions,
|
|
352
363
|
compress: environment_options_1.allowMinify && {
|
package/src/protractor/index.js
CHANGED
|
@@ -14,7 +14,6 @@ const url = require("url");
|
|
|
14
14
|
const utils_1 = require("../utils");
|
|
15
15
|
function runProtractor(root, options) {
|
|
16
16
|
const additionalProtractorConfig = {
|
|
17
|
-
elementExplorer: options.elementExplorer,
|
|
18
17
|
baseUrl: options.baseUrl,
|
|
19
18
|
specs: options.specs && options.specs.length ? options.specs : undefined,
|
|
20
19
|
suite: options.suite,
|
|
@@ -12,6 +12,9 @@ export interface Schema {
|
|
|
12
12
|
devServerTarget?: string;
|
|
13
13
|
/**
|
|
14
14
|
* Start Protractor's Element Explorer for debugging.
|
|
15
|
+
* @deprecated This option has no effect. See:
|
|
16
|
+
* https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow
|
|
17
|
+
* for alternative methods.
|
|
15
18
|
*/
|
|
16
19
|
elementExplorer?: boolean;
|
|
17
20
|
/**
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"elementExplorer": {
|
|
39
39
|
"type": "boolean",
|
|
40
40
|
"description": "Start Protractor's Element Explorer for debugging.",
|
|
41
|
-
"default": false
|
|
41
|
+
"default": false,
|
|
42
|
+
"x-deprecated": "This option has no effect. See: https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow for alternative methods."
|
|
42
43
|
},
|
|
43
44
|
"webdriverUpdate": {
|
|
44
45
|
"type": "boolean",
|
|
@@ -420,7 +420,7 @@ async function inlineLocales(options) {
|
|
|
420
420
|
// If locale data is provided, load it and prepend to file
|
|
421
421
|
const localeDataPath = (_a = i18n.locales[locale]) === null || _a === void 0 ? void 0 : _a.dataPath;
|
|
422
422
|
if (localeDataPath) {
|
|
423
|
-
localeDataContent = await loadLocaleData(localeDataPath, true);
|
|
423
|
+
localeDataContent = await loadLocaleData(localeDataPath, true, options.es5);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
const { diagnostics: localeDiagnostics, plugins } = await createI18nPlugins(locale, translations, isSourceLocale ? 'ignore' : options.missingTranslation || 'warning', localeDataContent);
|
|
@@ -492,7 +492,7 @@ async function inlineLocalesDirect(ast, options) {
|
|
|
492
492
|
let localeDataSource = null;
|
|
493
493
|
const localeDataPath = i18n.locales[locale] && i18n.locales[locale].dataPath;
|
|
494
494
|
if (localeDataPath) {
|
|
495
|
-
const localeDataContent = await loadLocaleData(localeDataPath, true);
|
|
495
|
+
const localeDataContent = await loadLocaleData(localeDataPath, true, options.es5);
|
|
496
496
|
localeDataSource = new webpack_sources_1.OriginalSource(localeDataContent, path.basename(localeDataPath));
|
|
497
497
|
}
|
|
498
498
|
outputSource = localeDataSource
|
|
@@ -571,16 +571,33 @@ utils) {
|
|
|
571
571
|
}
|
|
572
572
|
return positions;
|
|
573
573
|
}
|
|
574
|
-
async function loadLocaleData(path, optimize) {
|
|
574
|
+
async function loadLocaleData(path, optimize, es5) {
|
|
575
575
|
// The path is validated during option processing before the build starts
|
|
576
576
|
const content = fs.readFileSync(path, 'utf8');
|
|
577
|
-
//
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
577
|
+
// Downlevel and optimize the data
|
|
578
|
+
const transformResult = await core_1.transformAsync(content, {
|
|
579
|
+
filename: path,
|
|
580
|
+
// The types do not include the false option even though it is valid
|
|
581
|
+
// tslint:disable-next-line: no-any
|
|
582
|
+
inputSourceMap: false,
|
|
583
|
+
babelrc: false,
|
|
584
|
+
configFile: false,
|
|
585
|
+
presets: [
|
|
586
|
+
[
|
|
587
|
+
require.resolve('@babel/preset-env'),
|
|
588
|
+
{
|
|
589
|
+
bugfixes: true,
|
|
590
|
+
// IE 9 is the oldest supported browser
|
|
591
|
+
targets: es5 ? { ie: '9' } : { esmodules: true },
|
|
592
|
+
},
|
|
593
|
+
],
|
|
594
|
+
],
|
|
595
|
+
minified: environment_options_1.allowMinify && optimize,
|
|
596
|
+
compact: !environment_options_1.shouldBeautify && optimize,
|
|
597
|
+
comments: !optimize,
|
|
598
|
+
});
|
|
599
|
+
if (!transformResult || !transformResult.code) {
|
|
600
|
+
throw new Error(`Unknown error occurred processing bundle for "${path}".`);
|
|
584
601
|
}
|
|
585
|
-
return
|
|
602
|
+
return transformResult.code;
|
|
586
603
|
}
|