@angular-devkit/build-angular 13.2.0-rc.0 → 13.2.2

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,37 +1,37 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "13.2.0-rc.0",
3
+ "version": "13.2.2",
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
- "@ampproject/remapping": "1.0.2",
10
- "@angular-devkit/architect": "0.1302.0-rc.0",
11
- "@angular-devkit/build-webpack": "0.1302.0-rc.0",
12
- "@angular-devkit/core": "13.2.0-rc.0",
13
- "@babel/core": "7.16.7",
9
+ "@ampproject/remapping": "1.1.1",
10
+ "@angular-devkit/architect": "0.1302.2",
11
+ "@angular-devkit/build-webpack": "0.1302.2",
12
+ "@angular-devkit/core": "13.2.2",
13
+ "@babel/core": "7.16.12",
14
14
  "@babel/generator": "7.16.8",
15
15
  "@babel/helper-annotate-as-pure": "7.16.7",
16
16
  "@babel/plugin-proposal-async-generator-functions": "7.16.8",
17
17
  "@babel/plugin-transform-async-to-generator": "7.16.8",
18
- "@babel/plugin-transform-runtime": "7.16.8",
19
- "@babel/preset-env": "7.16.8",
18
+ "@babel/plugin-transform-runtime": "7.16.10",
19
+ "@babel/preset-env": "7.16.11",
20
20
  "@babel/runtime": "7.16.7",
21
21
  "@babel/template": "7.16.7",
22
22
  "@discoveryjs/json-ext": "0.5.6",
23
- "@ngtools/webpack": "13.2.0-rc.0",
23
+ "@ngtools/webpack": "13.2.2",
24
24
  "ansi-colors": "4.1.1",
25
25
  "babel-loader": "8.2.3",
26
26
  "babel-plugin-istanbul": "6.1.1",
27
27
  "browserslist": "^4.9.1",
28
28
  "cacache": "15.3.0",
29
29
  "circular-dependency-plugin": "5.2.2",
30
- "copy-webpack-plugin": "10.2.0",
30
+ "copy-webpack-plugin": "10.2.1",
31
31
  "core-js": "3.20.3",
32
32
  "critters": "0.0.16",
33
33
  "css-loader": "6.5.1",
34
- "esbuild-wasm": "0.14.11",
34
+ "esbuild-wasm": "0.14.14",
35
35
  "glob": "7.2.0",
36
36
  "https-proxy-agent": "5.0.0",
37
37
  "inquirer": "8.2.0",
@@ -39,9 +39,9 @@
39
39
  "karma-source-map-support": "1.4.0",
40
40
  "less": "4.1.2",
41
41
  "less-loader": "10.2.0",
42
- "license-webpack-plugin": "4.0.0",
42
+ "license-webpack-plugin": "4.0.1",
43
43
  "loader-utils": "3.2.0",
44
- "mini-css-extract-plugin": "2.5.2",
44
+ "mini-css-extract-plugin": "2.5.3",
45
45
  "minimatch": "3.0.4",
46
46
  "open": "8.4.0",
47
47
  "ora": "5.4.1",
@@ -65,21 +65,21 @@
65
65
  "text-table": "0.2.0",
66
66
  "tree-kill": "1.2.2",
67
67
  "tslib": "2.3.1",
68
- "webpack": "5.66.0",
68
+ "webpack": "5.67.0",
69
69
  "webpack-dev-middleware": "5.3.0",
70
70
  "webpack-dev-server": "4.7.3",
71
71
  "webpack-merge": "5.8.0",
72
72
  "webpack-subresource-integrity": "5.1.0"
73
73
  },
74
74
  "optionalDependencies": {
75
- "esbuild": "0.14.11"
75
+ "esbuild": "0.14.14"
76
76
  },
77
77
  "peerDependencies": {
78
- "@angular/compiler-cli": "^13.0.0 || ^13.2.0-next",
79
- "@angular/localize": "^13.0.0 || ^13.2.0-next",
80
- "@angular/service-worker": "^13.0.0 || ^13.2.0-next",
78
+ "@angular/compiler-cli": "^13.0.0",
79
+ "@angular/localize": "^13.0.0",
80
+ "@angular/service-worker": "^13.0.0",
81
81
  "karma": "^6.3.0",
82
- "ng-packagr": "^13.0.0 || ^13.2.0-next",
82
+ "ng-packagr": "^13.0.0",
83
83
  "protractor": "^7.0.0",
84
84
  "tailwindcss": "^2.0.0 || ^3.0.0",
85
85
  "typescript": ">=4.4.3 <4.6"
@@ -28,7 +28,7 @@ export interface Schema {
28
28
  * - when a path to directory is provided, all spec files ending ".spec.@(ts|tsx)" will be
29
29
  * included
30
30
  * - when a path to a file is provided, and a matching spec file exists it will be included
31
- * instead
31
+ * instead.
32
32
  */
33
33
  include?: string[];
34
34
  /**
@@ -70,7 +70,7 @@
70
70
  "items": {
71
71
  "type": "string"
72
72
  },
73
- "description": "Globs of files to include, relative to workspace or project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead"
73
+ "description": "Globs of files to include, relative to workspace or project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
74
74
  },
75
75
  "sourceMap": {
76
76
  "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { logging } from '@angular-devkit/core';
9
9
  import type { ParsedConfiguration } from '@angular/compiler-cli';
10
- import { AssetPatternClass, Budget, CrossOrigin, ExtraEntryPoint, I18NTranslation, IndexUnion, InlineStyleLanguage, Localize, SourceMapClass } from '../builders/browser/schema';
10
+ import { AssetPatternClass, Budget, CrossOrigin, ExtraEntryPoint, I18NTranslation, IndexUnion, InlineStyleLanguage, Localize, OutputHashing, SourceMapClass } from '../builders/browser/schema';
11
11
  import { Schema as DevServerSchema } from '../builders/dev-server/schema';
12
12
  import { NormalizedCachedOptions } from './normalize-cache';
13
13
  import { NormalizedFileReplacement } from './normalize-file-replacements';
@@ -30,7 +30,7 @@ export interface BuildOptions {
30
30
  bundleDependencies?: boolean;
31
31
  externalDependencies?: string[];
32
32
  watch?: boolean;
33
- outputHashing?: string;
33
+ outputHashing?: OutputHashing;
34
34
  poll?: number;
35
35
  index?: IndexUnion;
36
36
  deleteOutputPath?: boolean;
@@ -58,7 +58,7 @@ async function getCommonConfig(wco) {
58
58
  // changed to a direct dynamic import.
59
59
  const { GLOBAL_DEFS_FOR_TERSER, GLOBAL_DEFS_FOR_TERSER_WITH_AOT, VERSION: NG_VERSION, } = await (0, load_esm_1.loadEsmModule)('@angular/compiler-cli');
60
60
  // determine hashing format
61
- const hashFormat = (0, helpers_1.getOutputHashFormat)(buildOptions.outputHashing || 'none');
61
+ const hashFormat = (0, helpers_1.getOutputHashFormat)(buildOptions.outputHashing);
62
62
  if (buildOptions.progress) {
63
63
  extraPlugins.push(new progress_plugin_1.ProgressPlugin(platform));
64
64
  }
@@ -298,7 +298,9 @@ async function getCommonConfig(wco) {
298
298
  test: /\.[cm]?[tj]sx?$/,
299
299
  // The below is needed due to a bug in `@babel/runtime`. See: https://github.com/babel/babel/issues/12824
300
300
  resolve: { fullySpecified: false },
301
- exclude: [/[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\]/],
301
+ exclude: [
302
+ /[/\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill|whatwg-url)[/\\]/,
303
+ ],
302
304
  use: [
303
305
  {
304
306
  loader: require.resolve('../../babel/webpack-loader'),
@@ -115,10 +115,10 @@ class CssOptimizerPlugin {
115
115
  // browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
116
116
  if (browserName === 'ios_saf') {
117
117
  browserName = 'ios';
118
- // browserslist also uses ranges for iOS Safari versions but only the lowest is required
119
- // to perform minimum supported feature checks. esbuild also expects a single version.
120
- [version] = version.split('-');
121
118
  }
119
+ // browserslist uses ranges `15.2-15.3` versions but only the lowest is required
120
+ // to perform minimum supported feature checks. esbuild also expects a single version.
121
+ [version] = version.split('-');
122
122
  if (esBuildSupportedBrowsers.has(browserName)) {
123
123
  if (browserName === 'safari' && version === 'TP') {
124
124
  // esbuild only supports numeric versions so `TP` is converted to a high number (999) since
@@ -8,7 +8,7 @@
8
8
  import type { ObjectPattern } from 'copy-webpack-plugin';
9
9
  import { ScriptTarget } from 'typescript';
10
10
  import type { Configuration, WebpackOptionsNormalized } from 'webpack';
11
- import { AssetPatternClass, ExtraEntryPoint, ExtraEntryPointClass } from '../../builders/browser/schema';
11
+ import { AssetPatternClass, ExtraEntryPoint, ExtraEntryPointClass, OutputHashing } from '../../builders/browser/schema';
12
12
  import { WebpackConfigOptions } from '../../utils/build-options';
13
13
  export interface HashFormat {
14
14
  chunk: string;
@@ -16,7 +16,7 @@ export interface HashFormat {
16
16
  file: string;
17
17
  script: string;
18
18
  }
19
- export declare function getOutputHashFormat(option: string, length?: number): HashFormat;
19
+ export declare function getOutputHashFormat(outputHashing?: OutputHashing, length?: number): HashFormat;
20
20
  export declare type NormalizedEntryPoint = Required<ExtraEntryPointClass>;
21
21
  export declare function normalizeExtraEntryPoints(extraEntryPoints: ExtraEntryPoint[], defaultBundleName: string): NormalizedEntryPoint[];
22
22
  export declare function assetNameTemplateFactory(hashFormat: HashFormat): (resourcePath: string) => string;
@@ -35,25 +35,41 @@ const fs_1 = require("fs");
35
35
  const glob_1 = __importDefault(require("glob"));
36
36
  const path = __importStar(require("path"));
37
37
  const typescript_1 = require("typescript");
38
+ const schema_1 = require("../../builders/browser/schema");
38
39
  const package_version_1 = require("../../utils/package-version");
39
- function getOutputHashFormat(option, length = 20) {
40
- const hashFormats = {
41
- none: { chunk: '', extract: '', file: '', script: '' },
42
- media: { chunk: '', extract: '', file: `.[hash:${length}]`, script: '' },
43
- bundles: {
44
- chunk: `.[contenthash:${length}]`,
45
- extract: `.[contenthash:${length}]`,
46
- file: '',
47
- script: `.[hash:${length}]`,
48
- },
49
- all: {
50
- chunk: `.[contenthash:${length}]`,
51
- extract: `.[contenthash:${length}]`,
52
- file: `.[hash:${length}]`,
53
- script: `.[hash:${length}]`,
54
- },
55
- };
56
- return hashFormats[option] || hashFormats['none'];
40
+ function getOutputHashFormat(outputHashing = schema_1.OutputHashing.None, length = 20) {
41
+ const hashTemplate = `.[contenthash:${length}]`;
42
+ switch (outputHashing) {
43
+ case 'media':
44
+ return {
45
+ chunk: '',
46
+ extract: '',
47
+ file: hashTemplate,
48
+ script: '',
49
+ };
50
+ case 'bundles':
51
+ return {
52
+ chunk: hashTemplate,
53
+ extract: hashTemplate,
54
+ file: '',
55
+ script: hashTemplate,
56
+ };
57
+ case 'all':
58
+ return {
59
+ chunk: hashTemplate,
60
+ extract: hashTemplate,
61
+ file: hashTemplate,
62
+ script: hashTemplate,
63
+ };
64
+ case 'none':
65
+ default:
66
+ return {
67
+ chunk: '',
68
+ extract: '',
69
+ file: '',
70
+ script: '',
71
+ };
72
+ }
57
73
  }
58
74
  exports.getOutputHashFormat = getOutputHashFormat;
59
75
  function normalizeExtraEntryPoints(extraEntryPoints, defaultBundleName) {