@angular-devkit/build-angular 12.2.2 → 12.2.6
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,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.6",
|
|
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
9
|
"@ampproject/remapping": "1.0.1",
|
|
10
|
-
"@angular-devkit/architect": "0.1202.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.1202.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.1202.
|
|
13
|
-
"@angular-devkit/core": "12.2.
|
|
10
|
+
"@angular-devkit/architect": "0.1202.6",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.1202.6",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.1202.6",
|
|
13
|
+
"@angular-devkit/core": "12.2.6",
|
|
14
14
|
"@babel/core": "7.14.8",
|
|
15
15
|
"@babel/generator": "7.14.8",
|
|
16
16
|
"@babel/helper-annotate-as-pure": "7.14.5",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@babel/template": "7.14.5",
|
|
23
23
|
"@discoveryjs/json-ext": "0.5.3",
|
|
24
24
|
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
|
|
25
|
-
"@ngtools/webpack": "12.2.
|
|
25
|
+
"@ngtools/webpack": "12.2.6",
|
|
26
26
|
"ansi-colors": "4.1.1",
|
|
27
27
|
"babel-loader": "8.2.2",
|
|
28
28
|
"browserslist": "^4.9.1",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"critters": "0.0.10",
|
|
35
35
|
"css-loader": "6.2.0",
|
|
36
36
|
"css-minimizer-webpack-plugin": "3.0.2",
|
|
37
|
-
"esbuild": "0.12.
|
|
37
|
+
"esbuild": "0.12.24",
|
|
38
38
|
"find-cache-dir": "3.3.1",
|
|
39
39
|
"glob": "7.1.7",
|
|
40
40
|
"https-proxy-agent": "5.0.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"less-loader": "10.0.1",
|
|
45
45
|
"license-webpack-plugin": "2.3.20",
|
|
46
46
|
"loader-utils": "2.0.0",
|
|
47
|
-
"mini-css-extract-plugin": "2.1
|
|
47
|
+
"mini-css-extract-plugin": "2.2.1",
|
|
48
48
|
"minimatch": "3.0.4",
|
|
49
49
|
"open": "8.2.1",
|
|
50
50
|
"ora": "5.4.1",
|
package/src/utils/color.js
CHANGED
|
@@ -29,7 +29,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.colors = exports.removeColor = void 0;
|
|
30
30
|
const ansiColors = __importStar(require("ansi-colors"));
|
|
31
31
|
const tty_1 = require("tty");
|
|
32
|
-
|
|
32
|
+
function supportColor() {
|
|
33
|
+
if (process.env.FORCE_COLOR !== undefined) {
|
|
34
|
+
// 2 colors: FORCE_COLOR = 0 (Disables colors), depth 1
|
|
35
|
+
// 16 colors: FORCE_COLOR = 1, depth 4
|
|
36
|
+
// 256 colors: FORCE_COLOR = 2, depth 8
|
|
37
|
+
// 16,777,216 colors: FORCE_COLOR = 3, depth 16
|
|
38
|
+
// See: https://nodejs.org/dist/latest-v12.x/docs/api/tty.html#tty_writestream_getcolordepth_env
|
|
39
|
+
// and https://github.com/nodejs/node/blob/b9f36062d7b5c5039498e98d2f2c180dca2a7065/lib/internal/tty.js#L106;
|
|
40
|
+
switch (process.env.FORCE_COLOR) {
|
|
41
|
+
case '':
|
|
42
|
+
case 'true':
|
|
43
|
+
case '1':
|
|
44
|
+
case '2':
|
|
45
|
+
case '3':
|
|
46
|
+
return true;
|
|
47
|
+
default:
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (process.stdout instanceof tty_1.WriteStream) {
|
|
52
|
+
return process.stdout.getColorDepth() > 1;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
33
56
|
function removeColor(text) {
|
|
34
57
|
// This has been created because when colors.enabled is false unstyle doesn't work
|
|
35
58
|
// see: https://github.com/doowb/ansi-colors/blob/a4794363369d7b4d1872d248fc43a12761640d8e/index.js#L38
|
|
@@ -40,4 +63,4 @@ exports.removeColor = removeColor;
|
|
|
40
63
|
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
|
41
64
|
const colors = ansiColors.create();
|
|
42
65
|
exports.colors = colors;
|
|
43
|
-
colors.enabled =
|
|
66
|
+
colors.enabled = supportColor();
|
|
@@ -98,7 +98,7 @@ function getDevServerConfig(wco) {
|
|
|
98
98
|
},
|
|
99
99
|
sockPath: path_1.posix.join(servePath, 'sockjs-node'),
|
|
100
100
|
stats: false,
|
|
101
|
-
compress:
|
|
101
|
+
compress: false,
|
|
102
102
|
watchOptions: helpers_1.getWatchOptions(poll),
|
|
103
103
|
https: getSslConfig(root, wco.buildOptions),
|
|
104
104
|
overlay: {
|
|
@@ -439,8 +439,23 @@ function transformSupportedBrowsersToTargets(supportedBrowsers) {
|
|
|
439
439
|
// https://esbuild.github.io/api/#target
|
|
440
440
|
const esBuildSupportedBrowsers = new Set(['safari', 'firefox', 'edge', 'chrome', 'ios']);
|
|
441
441
|
for (const browser of supportedBrowsers) {
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
let [browserName, version] = browser.split(' ');
|
|
443
|
+
// browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
|
|
444
|
+
if (browserName === 'ios_saf') {
|
|
445
|
+
browserName = 'ios';
|
|
446
|
+
// browserslist also uses ranges for iOS Safari versions but only the lowest is required
|
|
447
|
+
// to perform minimum supported feature checks. esbuild also expects a single version.
|
|
448
|
+
[version] = version.split('-');
|
|
449
|
+
}
|
|
450
|
+
if (browserName === 'ie') {
|
|
451
|
+
transformed.push('edge12');
|
|
452
|
+
}
|
|
453
|
+
else if (esBuildSupportedBrowsers.has(browserName)) {
|
|
454
|
+
if (browserName === 'safari' && version === 'TP') {
|
|
455
|
+
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since
|
|
456
|
+
// a Technology Preview (TP) of Safari is assumed to support all currently known features.
|
|
457
|
+
version = '999';
|
|
458
|
+
}
|
|
444
459
|
transformed.push(browserName + version);
|
|
445
460
|
}
|
|
446
461
|
}
|