@angular-devkit/build-angular 0.1001.0-rc.0 → 0.1001.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 +9 -9
- package/plugins/webpack/analytics.js +4 -0
- package/src/angular-cli-files/models/webpack-configs/stats.js +2 -1
- package/src/browser/schema.d.ts +1 -1
- package/src/browser/schema.json +1 -1
- package/src/dev-server/schema.d.ts +1 -1
- package/src/dev-server/schema.json +1 -1
- package/src/extract-i18n/ivy-extract-loader.js +10 -5
- package/src/karma/schema.d.ts +1 -1
- package/src/karma/schema.json +1 -1
- package/src/server/schema.d.ts +1 -1
- package/src/server/schema.json +1 -1
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "0.1001.
|
|
3
|
+
"version": "0.1001.3",
|
|
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.1001.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.1001.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.1001.
|
|
13
|
-
"@angular-devkit/core": "10.1.
|
|
10
|
+
"@angular-devkit/architect": "0.1001.3",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.1001.3",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.1001.3",
|
|
13
|
+
"@angular-devkit/core": "10.1.3",
|
|
14
14
|
"@babel/core": "7.11.1",
|
|
15
15
|
"@babel/generator": "7.11.0",
|
|
16
16
|
"@babel/plugin-transform-runtime": "7.11.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@babel/runtime": "7.11.2",
|
|
19
19
|
"@babel/template": "7.10.4",
|
|
20
20
|
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
|
|
21
|
-
"@ngtools/webpack": "10.1.
|
|
21
|
+
"@ngtools/webpack": "10.1.3",
|
|
22
22
|
"autoprefixer": "9.8.6",
|
|
23
23
|
"babel-loader": "8.1.0",
|
|
24
24
|
"browserslist": "^4.9.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"style-loader": "1.2.1",
|
|
63
63
|
"stylus": "0.54.8",
|
|
64
64
|
"stylus-loader": "3.0.2",
|
|
65
|
-
"terser": "5.
|
|
65
|
+
"terser": "5.3.0",
|
|
66
66
|
"terser-webpack-plugin": "4.1.0",
|
|
67
67
|
"tree-kill": "1.2.2",
|
|
68
68
|
"webpack": "4.44.1",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"worker-plugin": "5.0.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@angular/compiler-cli": "
|
|
78
|
-
"@angular/localize": "
|
|
77
|
+
"@angular/compiler-cli": "^10.0.0",
|
|
78
|
+
"@angular/localize": "^10.0.0",
|
|
79
79
|
"ng-packagr": "^10.0.0",
|
|
80
80
|
"typescript": ">=3.9 < 4.1"
|
|
81
81
|
},
|
|
@@ -133,6 +133,8 @@ class NgBuildAnalyticsPlugin {
|
|
|
133
133
|
this._stats.numberOfComponents += countOccurrences(module._source.source(), 'Component({');
|
|
134
134
|
// For Ivy we just count ɵcmp.
|
|
135
135
|
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true);
|
|
136
|
+
// for ascii_only true
|
|
137
|
+
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.\u0275cmp', true);
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
140
|
_checkNgFactoryNormalModule(module) {
|
|
@@ -142,6 +144,8 @@ class NgBuildAnalyticsPlugin {
|
|
|
142
144
|
// Count the number of `.ɵccf(` strings (case sensitive). They're calls to components
|
|
143
145
|
// factories.
|
|
144
146
|
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵccf(');
|
|
147
|
+
// for ascii_only true
|
|
148
|
+
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.\u0275ccf(');
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
_collectErrors(stats) {
|
|
@@ -37,10 +37,11 @@ const verboseWebpackOutputOptions = {
|
|
|
37
37
|
chunkModules: true,
|
|
38
38
|
errorDetails: true,
|
|
39
39
|
moduleTrace: true,
|
|
40
|
+
logging: 'verbose',
|
|
40
41
|
};
|
|
41
42
|
function getWebpackStatsConfig(verbose = false) {
|
|
42
43
|
return verbose
|
|
43
|
-
?
|
|
44
|
+
? { ...webpackOutputOptions, ...verboseWebpackOutputOptions }
|
|
44
45
|
: webpackOutputOptions;
|
|
45
46
|
}
|
|
46
47
|
exports.getWebpackStatsConfig = getWebpackStatsConfig;
|
package/src/browser/schema.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export interface Schema {
|
|
|
56
56
|
*/
|
|
57
57
|
extractLicenses?: boolean;
|
|
58
58
|
/**
|
|
59
|
-
* Replace files with other files in the build.
|
|
59
|
+
* Replace compilation source files with other compilation source files in the build.
|
|
60
60
|
*/
|
|
61
61
|
fileReplacements?: FileReplacement[];
|
|
62
62
|
/**
|
package/src/browser/schema.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
84
|
"fileReplacements": {
|
|
85
|
-
"description": "Replace files with other files in the build.",
|
|
85
|
+
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
86
86
|
"type": "array",
|
|
87
87
|
"items": {
|
|
88
88
|
"$ref": "#/definitions/fileReplacement"
|
|
@@ -35,26 +35,31 @@ map) {
|
|
|
35
35
|
loaderContext.emitError(args.join(''));
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
|
+
let filename = loaderContext.resourcePath;
|
|
39
|
+
if (map === null || map === void 0 ? void 0 : map.file) {
|
|
40
|
+
// The extractor's internal sourcemap handling expects the filenames to match
|
|
41
|
+
filename = nodePath.join(loaderContext.context, map.file);
|
|
42
|
+
}
|
|
38
43
|
// Setup a virtual file system instance for the extractor
|
|
39
44
|
// * MessageExtractor itself uses readFile and resolve
|
|
40
45
|
// * Internal SourceFileLoader (sourcemap support) uses dirname, exists, readFile, and resolve
|
|
41
46
|
const filesystem = {
|
|
42
47
|
readFile(path) {
|
|
43
|
-
if (path ===
|
|
48
|
+
if (path === filename) {
|
|
44
49
|
return content;
|
|
45
50
|
}
|
|
46
|
-
else if (path ===
|
|
51
|
+
else if (path === filename + '.map') {
|
|
47
52
|
return typeof map === 'string' ? map : JSON.stringify(map);
|
|
48
53
|
}
|
|
49
54
|
else {
|
|
50
|
-
throw new Error('Unknown file requested
|
|
55
|
+
throw new Error('Unknown file requested: ' + path);
|
|
51
56
|
}
|
|
52
57
|
},
|
|
53
58
|
resolve(...paths) {
|
|
54
59
|
return nodePath.resolve(...paths);
|
|
55
60
|
},
|
|
56
61
|
exists(path) {
|
|
57
|
-
return path ===
|
|
62
|
+
return path === filename || path === filename + '.map';
|
|
58
63
|
},
|
|
59
64
|
dirname(path) {
|
|
60
65
|
return nodePath.dirname(path);
|
|
@@ -66,7 +71,7 @@ map) {
|
|
|
66
71
|
basePath: this.rootContext,
|
|
67
72
|
useSourceMaps: !!map,
|
|
68
73
|
});
|
|
69
|
-
const messages = extractor.extractMessages(
|
|
74
|
+
const messages = extractor.extractMessages(filename);
|
|
70
75
|
if (messages.length > 0) {
|
|
71
76
|
options === null || options === void 0 ? void 0 : options.messageHandler(messages);
|
|
72
77
|
}
|
package/src/karma/schema.d.ts
CHANGED
package/src/karma/schema.json
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"default": []
|
|
136
136
|
},
|
|
137
137
|
"fileReplacements": {
|
|
138
|
-
"description": "Replace files with other files in the build.",
|
|
138
|
+
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
139
139
|
"type": "array",
|
|
140
140
|
"items": {
|
|
141
141
|
"oneOf": [
|
package/src/server/schema.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface Schema {
|
|
|
22
22
|
*/
|
|
23
23
|
extractLicenses?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
* Replace files with other files in the build.
|
|
25
|
+
* Replace compilation source files with other compilation source files in the build.
|
|
26
26
|
*/
|
|
27
27
|
fileReplacements?: FileReplacement[];
|
|
28
28
|
/**
|
package/src/server/schema.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
56
|
"fileReplacements": {
|
|
57
|
-
"description": "Replace files with other files in the build.",
|
|
57
|
+
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
58
58
|
"type": "array",
|
|
59
59
|
"items": {
|
|
60
60
|
"$ref": "#/definitions/fileReplacement"
|