@angular-devkit/build-angular 0.1001.7 → 0.1002.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,16 +1,16 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "0.1001.7",
3
+ "version": "0.1002.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.7",
11
- "@angular-devkit/build-optimizer": "0.1001.7",
12
- "@angular-devkit/build-webpack": "0.1001.7",
13
- "@angular-devkit/core": "10.1.7",
10
+ "@angular-devkit/architect": "0.1002.3",
11
+ "@angular-devkit/build-optimizer": "0.1002.3",
12
+ "@angular-devkit/build-webpack": "0.1002.3",
13
+ "@angular-devkit/core": "10.2.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.7",
21
+ "@ngtools/webpack": "10.2.3",
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.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",
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "engines": {
102
102
  "node": ">= 10.13.0",
103
- "npm": ">= 6.11.0",
103
+ "npm": "^6.11.0 || ^7.5.6",
104
104
  "yarn": ">= 1.13.0"
105
105
  },
106
106
  "author": "Angular Authors",
@@ -198,6 +198,7 @@ function getCommonConfig(wco) {
198
198
  to: output.replace(/^\//, ''),
199
199
  from: glob,
200
200
  noErrorOnMissing: true,
201
+ force: true,
201
202
  globOptions: {
202
203
  dot: true,
203
204
  ignore: [
@@ -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" />
@@ -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: browserOptions.i18nLocale,
153
+ lang: locale,
153
154
  }));
154
155
  }
155
156
  const normalizedOptimization = utils_2.normalizeOptimization(browserOptions.optimization);
@@ -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
- generateBaseCacheKey(content) {
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
- let baseCacheKey = `${packageVersion}|${content.length}|${algorithm}-${codeHash}`;
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 = { name: action.name };
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 = {