@angular-devkit/build-angular 0.1001.5 → 0.1002.1
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 +7 -7
- package/src/angular-cli-files/models/webpack-configs/common.js +1 -0
- package/src/angular-cli-files/plugins/karma-debug.html +1 -0
- package/src/dev-server/index.js +3 -2
- package/src/extract-i18n/ivy-extract-loader.js +4 -1
- package/src/utils/action-cache.d.ts +1 -0
- package/src/utils/action-cache.js +13 -6
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1002.1",
|
|
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.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.
|
|
13
|
-
"@angular-devkit/core": "10.1
|
|
10
|
+
"@angular-devkit/architect": "0.1002.1",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.1002.1",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.1002.1",
|
|
13
|
+
"@angular-devkit/core": "10.2.1",
|
|
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.2.1",
|
|
22
22
|
"autoprefixer": "9.8.6",
|
|
23
23
|
"babel-loader": "8.1.0",
|
|
24
24
|
"browserslist": "^4.9.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"postcss-loader": "3.0.0",
|
|
49
49
|
"raw-loader": "4.0.1",
|
|
50
50
|
"regenerator-runtime": "0.13.7",
|
|
51
|
-
"resolve-url-loader": "3.1.
|
|
51
|
+
"resolve-url-loader": "3.1.2",
|
|
52
52
|
"rimraf": "3.0.2",
|
|
53
53
|
"rollup": "2.26.5",
|
|
54
54
|
"rxjs": "6.6.2",
|
|
@@ -9,6 +9,7 @@ just for immediate execution, without reporting to Karma server.
|
|
|
9
9
|
<head>
|
|
10
10
|
%X_UA_COMPATIBLE%
|
|
11
11
|
<title>Karma DEBUG RUNNER</title>
|
|
12
|
+
<base href="/">
|
|
12
13
|
<link href="favicon.ico" rel="icon" type="image/x-icon" />
|
|
13
14
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
14
15
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
package/src/dev-server/index.js
CHANGED
|
@@ -95,9 +95,10 @@ function serveWebpackBrowser(options, context, transforms = {}) {
|
|
|
95
95
|
webpackDevServerConfig,
|
|
96
96
|
port,
|
|
97
97
|
projectRoot,
|
|
98
|
+
locale: browserOptions.i18nLocale || (i18n.shouldInline ? [...i18n.inlineLocales][0] : undefined),
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
|
-
return rxjs_1.from(setup()).pipe(operators_1.switchMap(({ browserOptions, webpackConfig, webpackDevServerConfig, port, projectRoot }) => {
|
|
101
|
+
return rxjs_1.from(setup()).pipe(operators_1.switchMap(({ browserOptions, webpackConfig, webpackDevServerConfig, port, projectRoot, locale }) => {
|
|
101
102
|
options.port = port;
|
|
102
103
|
// Resolve public host and client address.
|
|
103
104
|
let clientAddress = url.parse(`${options.ssl ? 'https' : 'http'}://0.0.0.0:0`);
|
|
@@ -149,7 +150,7 @@ function serveWebpackBrowser(options, context, transforms = {}) {
|
|
|
149
150
|
noModuleEntrypoints: ['polyfills-es5'],
|
|
150
151
|
postTransform: transforms.indexHtml,
|
|
151
152
|
crossOrigin: browserOptions.crossOrigin,
|
|
152
|
-
lang:
|
|
153
|
+
lang: locale,
|
|
153
154
|
}));
|
|
154
155
|
}
|
|
155
156
|
const normalizedOptimization = utils_2.normalizeOptimization(browserOptions.optimization);
|
|
@@ -41,7 +41,7 @@ map) {
|
|
|
41
41
|
filename = nodePath.join(loaderContext.context, map.file);
|
|
42
42
|
}
|
|
43
43
|
// Setup a virtual file system instance for the extractor
|
|
44
|
-
// * MessageExtractor itself uses readFile and resolve
|
|
44
|
+
// * MessageExtractor itself uses readFile, relative and resolve
|
|
45
45
|
// * Internal SourceFileLoader (sourcemap support) uses dirname, exists, readFile, and resolve
|
|
46
46
|
const filesystem = {
|
|
47
47
|
readFile(path) {
|
|
@@ -55,6 +55,9 @@ map) {
|
|
|
55
55
|
throw new Error('Unknown file requested: ' + path);
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
relative(from, to) {
|
|
59
|
+
return nodePath.relative(from, to);
|
|
60
|
+
},
|
|
58
61
|
resolve(...paths) {
|
|
59
62
|
return nodePath.resolve(...paths);
|
|
60
63
|
},
|
|
@@ -11,6 +11,7 @@ export declare class BundleActionCache {
|
|
|
11
11
|
private readonly integrityAlgorithm?;
|
|
12
12
|
constructor(cachePath: string, integrityAlgorithm?: string | undefined);
|
|
13
13
|
static copyEntryContent(entry: CacheEntry | string, dest: fs.PathLike): void;
|
|
14
|
+
generateIntegrityValue(content: string): string;
|
|
14
15
|
generateBaseCacheKey(content: string): string;
|
|
15
16
|
generateCacheKeys(action: ProcessBundleOptions): string[];
|
|
16
17
|
getCacheEntries(cacheKeys: (string | undefined)[]): Promise<(CacheEntry | null)[] | false>;
|
|
@@ -27,15 +27,19 @@ class BundleActionCache {
|
|
|
27
27
|
fs.chmodSync(dest, 0o644);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
// Create base cache key with elements:
|
|
32
|
-
// * package version - different build-angular versions cause different final outputs
|
|
33
|
-
// * code length/hash - ensure cached version matches the same input code
|
|
30
|
+
generateIntegrityValue(content) {
|
|
34
31
|
const algorithm = this.integrityAlgorithm || 'sha1';
|
|
35
32
|
const codeHash = crypto_1.createHash(algorithm)
|
|
36
33
|
.update(content)
|
|
37
34
|
.digest('base64');
|
|
38
|
-
|
|
35
|
+
return `${algorithm}-${codeHash}`;
|
|
36
|
+
}
|
|
37
|
+
generateBaseCacheKey(content) {
|
|
38
|
+
// Create base cache key with elements:
|
|
39
|
+
// * package version - different build-angular versions cause different final outputs
|
|
40
|
+
// * code length/hash - ensure cached version matches the same input code
|
|
41
|
+
const integrity = this.generateIntegrityValue(content);
|
|
42
|
+
let baseCacheKey = `${packageVersion}|${content.length}|${integrity}`;
|
|
39
43
|
if (!environment_options_1.allowMangle) {
|
|
40
44
|
baseCacheKey += '|MD';
|
|
41
45
|
}
|
|
@@ -96,7 +100,10 @@ class BundleActionCache {
|
|
|
96
100
|
if (!entries) {
|
|
97
101
|
return null;
|
|
98
102
|
}
|
|
99
|
-
const result = {
|
|
103
|
+
const result = {
|
|
104
|
+
name: action.name,
|
|
105
|
+
integrity: this.generateIntegrityValue(action.code),
|
|
106
|
+
};
|
|
100
107
|
let cacheEntry = entries[0 /* OriginalCode */];
|
|
101
108
|
if (cacheEntry) {
|
|
102
109
|
result.original = {
|