Skip to content

Commit f3bc259

Browse files
committed
build: patch @angular/build
This is to fix adev builds until the CLI deps have been updated to v22. See angular/angular-cli/pull/32535
1 parent c89d94b commit f3bc259

3 files changed

Lines changed: 43 additions & 10 deletions

File tree

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@
208208
"typescript": "6.0.0-beta"
209209
},
210210
"pnpm": {
211-
"patchedDependencies": {},
211+
"patchedDependencies": {
212+
"@angular/build": "patches/@angular__build.patch"
213+
},
212214
"packageExtensions": {
213215
"grpc-gcp": {
214216
"peerDependencies": {

patches/@angular__build.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/src/utils/version.js b/src/utils/version.js
2+
index bafb9e5fc08b943d6bfafa9288112cf003df4e73..dcd55d7ac1532cfdd891796fa244fad7c42c364f 100755
3+
--- a/src/utils/version.js
4+
+++ b/src/utils/version.js
5+
@@ -11,6 +11,9 @@ exports.assertCompatibleAngularVersion = assertCompatibleAngularVersion;
6+
/* eslint-disable no-console */
7+
const node_module_1 = require("node:module");
8+
const semver_1 = require("semver");
9+
+// Matches exactly '0.0.0' or any string ending in '.0.0-next.0'
10+
+// This allows FW to bump the package.json to a new major version without requiring a new CLI version.
11+
+const angularVersionRegex = /^0\.0\.0$|\.0\.0-next\.0$/;
12+
function assertCompatibleAngularVersion(projectRoot) {
13+
let angularPkgJson;
14+
// Create a custom require function for ESM compliance.
15+
@@ -29,7 +32,10 @@ function assertCompatibleAngularVersion(projectRoot) {
16+
process.exit(2);
17+
}
18+
const supportedAngularSemver = '^21.0.0 || ^21.2.0-next.0';
19+
- if (angularPkgJson['version'] === '0.0.0' || supportedAngularSemver.startsWith('0.0.0')) {
20+
+ if (
21+
+ angularVersionRegex.test(angularPkgJson['version']) ||
22+
+ supportedAngularSemver.startsWith('0.0.0')
23+
+ ) {
24+
// Internal CLI and FW testing version.
25+
return;
26+
}

pnpm-lock.yaml

Lines changed: 14 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)