@angular-devkit/build-angular 20.1.0-rc.0 → 20.1.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 CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "20.1.0-rc.0",
3
+ "version": "20.1.1",
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": "2.3.0",
10
- "@angular-devkit/architect": "0.2001.0-rc.0",
11
- "@angular-devkit/build-webpack": "0.2001.0-rc.0",
12
- "@angular-devkit/core": "20.1.0-rc.0",
13
- "@angular/build": "20.1.0-rc.0",
10
+ "@angular-devkit/architect": "0.2001.1",
11
+ "@angular-devkit/build-webpack": "0.2001.1",
12
+ "@angular-devkit/core": "20.1.1",
13
+ "@angular/build": "20.1.1",
14
14
  "@babel/core": "7.27.7",
15
15
  "@babel/generator": "7.27.5",
16
16
  "@babel/helper-annotate-as-pure": "7.27.3",
@@ -21,7 +21,7 @@
21
21
  "@babel/preset-env": "7.27.2",
22
22
  "@babel/runtime": "7.27.6",
23
23
  "@discoveryjs/json-ext": "0.6.3",
24
- "@ngtools/webpack": "20.1.0-rc.0",
24
+ "@ngtools/webpack": "20.1.1",
25
25
  "ansi-colors": "4.1.3",
26
26
  "autoprefixer": "10.4.21",
27
27
  "babel-loader": "10.0.0",
@@ -65,19 +65,19 @@
65
65
  "esbuild": "0.25.5"
66
66
  },
67
67
  "peerDependencies": {
68
- "@angular/core": "^20.0.0 || ^20.1.0-next.0",
69
- "@angular/compiler-cli": "^20.0.0 || ^20.1.0-next.0",
70
- "@angular/localize": "^20.0.0 || ^20.1.0-next.0",
71
- "@angular/platform-browser": "^20.0.0 || ^20.1.0-next.0",
72
- "@angular/platform-server": "^20.0.0 || ^20.1.0-next.0",
73
- "@angular/service-worker": "^20.0.0 || ^20.1.0-next.0",
74
- "@angular/ssr": "^20.1.0-rc.0",
68
+ "@angular/core": "^20.0.0",
69
+ "@angular/compiler-cli": "^20.0.0",
70
+ "@angular/localize": "^20.0.0",
71
+ "@angular/platform-browser": "^20.0.0",
72
+ "@angular/platform-server": "^20.0.0",
73
+ "@angular/service-worker": "^20.0.0",
74
+ "@angular/ssr": "^20.1.1",
75
75
  "@web/test-runner": "^0.20.0",
76
76
  "browser-sync": "^3.0.2",
77
77
  "jest": "^29.5.0",
78
78
  "jest-environment-jsdom": "^29.5.0",
79
79
  "karma": "^6.3.0",
80
- "ng-packagr": "^20.0.0 || ^20.1.0-next.0",
80
+ "ng-packagr": "^20.0.0",
81
81
  "protractor": "^7.0.0",
82
82
  "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
83
83
  "typescript": ">=5.8 <5.9"
@@ -56,18 +56,27 @@ function execute(options, context, transforms = {}) {
56
56
  // Check Angular version.
57
57
  (0, private_1.assertCompatibleAngularVersion)(context.workspaceRoot);
58
58
  return (0, rxjs_1.from)(getExecuteWithBuilder(options, context)).pipe((0, rxjs_1.mergeMap)(([useEsbuild, executeWithBuilder]) => {
59
- const karmaOptions = getBaseKarmaOptions(options, context, useEsbuild);
60
- if (useEsbuild && transforms.webpackConfiguration) {
61
- context.logger.warn(`This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.`);
59
+ if (useEsbuild) {
60
+ if (transforms.webpackConfiguration) {
61
+ context.logger.warn(`This build is using the application builder but transforms.webpackConfiguration was provided. The transform will be ignored.`);
62
+ }
63
+ if (options.fileReplacements) {
64
+ options.fileReplacements = (0, utils_1.normalizeFileReplacements)(options.fileReplacements, './');
65
+ }
66
+ if (typeof options.polyfills === 'string') {
67
+ options.polyfills = [options.polyfills];
68
+ }
69
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
70
+ return executeWithBuilder(options, context, transforms);
62
71
  }
63
- if (useEsbuild && options.fileReplacements) {
64
- options.fileReplacements = (0, utils_1.normalizeFileReplacements)(options.fileReplacements, './');
72
+ else {
73
+ const karmaOptions = getBaseKarmaOptions(options, context);
74
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
+ return executeWithBuilder(options, context, karmaOptions, transforms);
65
76
  }
66
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
- return executeWithBuilder(options, context, karmaOptions, transforms);
68
77
  }));
69
78
  }
70
- function getBaseKarmaOptions(options, context, useEsbuild) {
79
+ function getBaseKarmaOptions(options, context) {
71
80
  let singleRun;
72
81
  if (options.watch !== undefined) {
73
82
  singleRun = !options.watch;
@@ -79,7 +88,7 @@ function getBaseKarmaOptions(options, context, useEsbuild) {
79
88
  }
80
89
  const karmaOptions = options.karmaConfig
81
90
  ? {}
82
- : getBuiltInKarmaConfig(context.workspaceRoot, projectName, useEsbuild);
91
+ : getBuiltInKarmaConfig(context.workspaceRoot, projectName);
83
92
  karmaOptions.singleRun = singleRun;
84
93
  // Workaround https://github.com/angular/angular-cli/issues/28271, by clearing context by default
85
94
  // for single run executions. Not clearing context for multi-run (watched) builds allows the
@@ -104,7 +113,7 @@ function getBaseKarmaOptions(options, context, useEsbuild) {
104
113
  }
105
114
  return karmaOptions;
106
115
  }
107
- function getBuiltInKarmaConfig(workspaceRoot, projectName, useEsbuild) {
116
+ function getBuiltInKarmaConfig(workspaceRoot, projectName) {
108
117
  let coverageFolderName = projectName.charAt(0) === '@' ? projectName.slice(1) : projectName;
109
118
  if (/[A-Z]/.test(coverageFolderName)) {
110
119
  coverageFolderName = core_1.strings.dasherize(coverageFolderName);
@@ -113,13 +122,13 @@ function getBuiltInKarmaConfig(workspaceRoot, projectName, useEsbuild) {
113
122
  // Any changes to the config here need to be synced to: packages/schematics/angular/config/files/karma.conf.js.template
114
123
  return {
115
124
  basePath: '',
116
- frameworks: ['jasmine', ...(useEsbuild ? [] : ['@angular-devkit/build-angular'])],
125
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
117
126
  plugins: [
118
127
  'karma-jasmine',
119
128
  'karma-chrome-launcher',
120
129
  'karma-jasmine-html-reporter',
121
130
  'karma-coverage',
122
- ...(useEsbuild ? [] : ['@angular-devkit/build-angular/plugins/karma']),
131
+ '@angular-devkit/build-angular/plugins/karma',
123
132
  ].map((p) => workspaceRootRequire(p)),
124
133
  jasmineHtmlReporter: {
125
134
  suppressAll: true, // removes the duplicated traces
@@ -151,8 +160,8 @@ async function getExecuteWithBuilder(options, context) {
151
160
  const useEsbuild = await checkForEsbuild(options, context);
152
161
  let execute;
153
162
  if (useEsbuild) {
154
- const { executeKarmaInternal } = await Promise.resolve().then(() => __importStar(require('@angular/build/private')));
155
- execute = executeKarmaInternal;
163
+ const { executeKarmaBuilder } = await Promise.resolve().then(() => __importStar(require('@angular/build')));
164
+ execute = executeKarmaBuilder;
156
165
  }
157
166
  else {
158
167
  const browserBuilderModule = await Promise.resolve().then(() => __importStar(require('./browser_builder')));
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = normalizeCacheOptions;
11
11
  const node_path_1 = require("node:path");
12
12
  /** Version placeholder is replaced during the build process with actual package version */
13
- const VERSION = '20.1.0-rc.0';
13
+ const VERSION = '20.1.1';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&