@angular/build 21.2.0-rc.1 → 21.2.0-rc.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "21.2.0-rc.1",
3
+ "version": "21.2.0-rc.2",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,7 +23,7 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.2102.0-rc.1",
26
+ "@angular-devkit/architect": "0.2102.0-rc.2",
27
27
  "@babel/core": "7.29.0",
28
28
  "@babel/helper-annotate-as-pure": "7.27.3",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
@@ -61,7 +61,7 @@
61
61
  "@angular/platform-browser": "^21.0.0 || ^21.2.0-next.0",
62
62
  "@angular/platform-server": "^21.0.0 || ^21.2.0-next.0",
63
63
  "@angular/service-worker": "^21.0.0 || ^21.2.0-next.0",
64
- "@angular/ssr": "^21.2.0-rc.1",
64
+ "@angular/ssr": "^21.2.0-rc.2",
65
65
  "karma": "^6.4.0",
66
66
  "less": "^4.2.0",
67
67
  "ng-packagr": "^21.0.0 || ^21.2.0-next.0",
@@ -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 = '21.2.0-rc.1';
13
+ const VERSION = '21.2.0-rc.2';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -11,9 +11,6 @@ exports.assertCompatibleAngularVersion = assertCompatibleAngularVersion;
11
11
  /* eslint-disable no-console */
12
12
  const node_module_1 = require("node:module");
13
13
  const semver_1 = require("semver");
14
- // Matches exactly '0.0.0' or any string ending in '.0.0-next.0'
15
- // This allows FW to bump the package.json to a new major version without requiring a new CLI version.
16
- const angularVersionRegex = /^0\.0\.0$|\.0\.0-next\.0$/;
17
14
  function assertCompatibleAngularVersion(projectRoot) {
18
15
  let angularPkgJson;
19
16
  // Create a custom require function for ESM compliance.
@@ -31,16 +28,29 @@ function assertCompatibleAngularVersion(projectRoot) {
31
28
  'This likely indicates a corrupted local installation. Please try reinstalling your packages.');
32
29
  process.exit(2);
33
30
  }
31
+ const angularCoreSemVer = new semver_1.SemVer(angularPkgJson['version']);
32
+ const { version, build, raw } = angularCoreSemVer;
34
33
  const supportedAngularSemver = '^21.0.0 || ^21.2.0-next.0';
35
- if (angularVersionRegex.test(angularPkgJson['version']) ||
36
- supportedAngularSemver.startsWith('0.0.0')) {
34
+ if (version.startsWith('0.0.0') || supportedAngularSemver.startsWith('0.0.0')) {
37
35
  // Internal CLI and FW testing version.
38
36
  return;
39
37
  }
40
- const angularVersion = new semver_1.SemVer(angularPkgJson['version']);
41
- if (!(0, semver_1.satisfies)(angularVersion, supportedAngularSemver, { includePrerelease: true })) {
38
+ if (build.length && version.endsWith('.0.0-next.0')) {
39
+ // Special handle for local builds only when it's prerelease of major version and it's the 0th version.
40
+ // This happends when we are bumping to a new major version. and the cli has not releated a verion.
41
+ // Example:
42
+ // raw: '22.0.0-next.0+sha-c7dc705-with-local-changes',
43
+ // major: 22,
44
+ // minor: 0,
45
+ // patch: 0,
46
+ // prerelease: [ 'next', 0 ],
47
+ // build: [ 'sha-c7dc705-with-local-changes' ],
48
+ // version: '22.0.0-next.0'
49
+ return;
50
+ }
51
+ if (!(0, semver_1.satisfies)(angularCoreSemVer, supportedAngularSemver, { includePrerelease: true })) {
42
52
  console.error(`Error: The current version of "@angular/build" supports Angular versions ${supportedAngularSemver},\n` +
43
- `but detected Angular version ${angularVersion} instead.\n` +
53
+ `but detected Angular version ${raw} instead.\n` +
44
54
  'Please visit the link below to find instructions on how to update Angular.\nhttps://update.angular.dev/');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