Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/angular/build/src/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
import { createRequire } from 'node:module';
import { SemVer, satisfies } from 'semver';

// Matches exactly '0.0.0' or any string ending in '.0.0-next.0'
// This allows FW to bump the package.json to a new major version without requiring a new CLI version.
const angularVersionRegex = /^0\.0\.0$|\.0\.0-next\.0$/;

export function assertCompatibleAngularVersion(projectRoot: string): void | never {
let angularPkgJson;

Expand Down Expand Up @@ -38,7 +42,10 @@ export function assertCompatibleAngularVersion(projectRoot: string): void | neve
}

const supportedAngularSemver = '0.0.0-ANGULAR-FW-PEER-DEP';
if (angularPkgJson['version'] === '0.0.0' || supportedAngularSemver.startsWith('0.0.0')) {
if (
angularVersionRegex.test(angularPkgJson['version']) ||
supportedAngularSemver.startsWith('0.0.0')
) {
// Internal CLI and FW testing version.
return;
}
Expand Down