@angular/build 20.2.0-rc.1 → 20.2.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "20.2.0-rc.1",
3
+ "version": "20.2.1",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,8 +23,8 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.2002.0-rc.1",
27
- "@babel/core": "7.28.0",
26
+ "@angular-devkit/architect": "0.2002.1",
27
+ "@babel/core": "7.28.3",
28
28
  "@babel/helper-annotate-as-pure": "7.27.3",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
30
30
  "@inquirer/confirm": "5.1.14",
@@ -53,17 +53,17 @@
53
53
  "lmdb": "3.4.2"
54
54
  },
55
55
  "peerDependencies": {
56
- "@angular/core": "^20.0.0 || ^20.2.0-next.0",
57
- "@angular/compiler": "^20.0.0 || ^20.2.0-next.0",
58
- "@angular/compiler-cli": "^20.0.0 || ^20.2.0-next.0",
59
- "@angular/localize": "^20.0.0 || ^20.2.0-next.0",
60
- "@angular/platform-browser": "^20.0.0 || ^20.2.0-next.0",
61
- "@angular/platform-server": "^20.0.0 || ^20.2.0-next.0",
62
- "@angular/service-worker": "^20.0.0 || ^20.2.0-next.0",
63
- "@angular/ssr": "^20.2.0-rc.1",
56
+ "@angular/core": "^20.0.0",
57
+ "@angular/compiler": "^20.0.0",
58
+ "@angular/compiler-cli": "^20.0.0",
59
+ "@angular/localize": "^20.0.0",
60
+ "@angular/platform-browser": "^20.0.0",
61
+ "@angular/platform-server": "^20.0.0",
62
+ "@angular/service-worker": "^20.0.0",
63
+ "@angular/ssr": "^20.2.1",
64
64
  "karma": "^6.4.0",
65
65
  "less": "^4.2.0",
66
- "ng-packagr": "^20.0.0 || ^20.2.0-next.0",
66
+ "ng-packagr": "^20.0.0",
67
67
  "postcss": "^8.4.0",
68
68
  "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
69
69
  "tslib": "^2.3.0",
@@ -112,7 +112,7 @@
112
112
  "type": "git",
113
113
  "url": "https://github.com/angular/angular-cli.git"
114
114
  },
115
- "packageManager": "pnpm@10.14.0",
115
+ "packageManager": "pnpm@10.15.0",
116
116
  "engines": {
117
117
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
118
118
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
@@ -170,6 +170,8 @@ class AngularPolyfillsPlugin {
170
170
  included: true,
171
171
  watched: false,
172
172
  });
173
+ // Karma needs a return value for a factory and Karma's multi-reporter expects an `adapters` array
174
+ return { adapters: [] };
173
175
  }, AngularPolyfillsPlugin),
174
176
  ],
175
177
  };
@@ -55,6 +55,7 @@ const profiling_1 = require("../profiling");
55
55
  const compilation_state_1 = require("./compilation-state");
56
56
  const file_reference_tracker_1 = require("./file-reference-tracker");
57
57
  const jit_plugin_callbacks_1 = require("./jit-plugin-callbacks");
58
+ const rewrite_bazel_paths_1 = require("./rewrite-bazel-paths");
58
59
  // eslint-disable-next-line max-lines-per-function
59
60
  function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBundler) {
60
61
  return {
@@ -321,7 +322,7 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
321
322
  return result;
322
323
  });
323
324
  build.onLoad({ filter: /\.[cm]?[jt]sx?$/ }, async (args) => {
324
- const request = path.normalize(pluginOptions.fileReplacements?.[path.normalize(args.path)] ?? args.path);
325
+ const request = (0, rewrite_bazel_paths_1.rewriteForBazel)(path.normalize(pluginOptions.fileReplacements?.[path.normalize(args.path)] ?? args.path));
325
326
  const isJS = /\.[cm]?js$/.test(request);
326
327
  // Skip TS load attempt if JS TypeScript compilation not enabled and file is JS
327
328
  if (shouldTsIgnoreJs && isJS) {
@@ -375,10 +376,11 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
375
376
  return {
376
377
  contents,
377
378
  loader,
379
+ resolveDir: path.dirname(request),
378
380
  };
379
381
  });
380
382
  build.onLoad({ filter: /\.[cm]?js$/ }, (0, load_result_cache_1.createCachedLoad)(pluginOptions.loadResultCache, async (args) => {
381
- let request = args.path;
383
+ let request = (0, rewrite_bazel_paths_1.rewriteForBazel)(args.path);
382
384
  if (pluginOptions.fileReplacements) {
383
385
  const replacement = pluginOptions.fileReplacements[path.normalize(args.path)];
384
386
  if (replacement) {
@@ -391,6 +393,7 @@ function createCompilerPlugin(pluginOptions, compilationOrFactory, stylesheetBun
391
393
  return {
392
394
  contents,
393
395
  loader: 'js',
396
+ resolveDir: path.dirname(request),
394
397
  watchFiles: request !== args.path ? [request] : undefined,
395
398
  };
396
399
  }, true);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export declare function rewriteForBazel(path: string): string;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.rewriteForBazel = rewriteForBazel;
11
+ const node_path_1 = require("node:path");
12
+ const bazelBinDirectory = process.env['BAZEL_BINDIR'];
13
+ const bazelExecRoot = process.env['JS_BINARY__EXECROOT'];
14
+ function rewriteForBazel(path) {
15
+ if (!bazelBinDirectory || !bazelExecRoot) {
16
+ return path;
17
+ }
18
+ const fromExecRoot = (0, node_path_1.relative)(bazelExecRoot, path);
19
+ if (!fromExecRoot.startsWith('..')) {
20
+ return path;
21
+ }
22
+ const fromBinDirectory = (0, node_path_1.relative)(bazelBinDirectory, path);
23
+ if (fromBinDirectory.startsWith('..')) {
24
+ return path;
25
+ }
26
+ return (0, node_path_1.join)(bazelExecRoot, fromBinDirectory);
27
+ }
@@ -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.2.0-rc.1';
13
+ const VERSION = '20.2.1';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -28,7 +28,7 @@ function assertCompatibleAngularVersion(projectRoot) {
28
28
  'This likely indicates a corrupted local installation. Please try reinstalling your packages.');
29
29
  process.exit(2);
30
30
  }
31
- const supportedAngularSemver = '^20.0.0 || ^20.2.0-next.0';
31
+ const supportedAngularSemver = '^20.0.0';
32
32
  if (angularPkgJson['version'] === '0.0.0' || supportedAngularSemver.startsWith('0.0.0')) {
33
33
  // Internal CLI and FW testing version.
34
34
  return;