mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
fix(@angular/build): utilize bazel stamp instead of resolving peer dependency versions
This update replaces the resolution of peer dependency versions with the use of the Bazel stamp for improved consistency and reliability. Closes #29504
This commit is contained in:
parent
ec05c814ee
commit
0ddf6aafaa
@ -224,6 +224,7 @@ npm_package(
|
|||||||
"//packages/angular_devkit/architect:package.json",
|
"//packages/angular_devkit/architect:package.json",
|
||||||
],
|
],
|
||||||
stamp_files = [
|
stamp_files = [
|
||||||
|
"src/utils/version.js",
|
||||||
"src/tools/esbuild/utils.js",
|
"src/tools/esbuild/utils.js",
|
||||||
"src/utils/normalize-cache.js",
|
"src/utils/normalize-cache.js",
|
||||||
],
|
],
|
||||||
|
@ -56,17 +56,7 @@ export function assertCompatibleAngularVersion(projectRoot: string): void | neve
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let supportedAngularSemver;
|
const supportedAngularSemver = '0.0.0-ANGULAR-FW-PEER-DEP';
|
||||||
try {
|
|
||||||
supportedAngularSemver = projectRequire('@angular/build/package.json')['peerDependencies'][
|
|
||||||
'@angular/compiler-cli'
|
|
||||||
];
|
|
||||||
} catch {
|
|
||||||
supportedAngularSemver = projectRequire('@angular-devkit/build-angular/package.json')[
|
|
||||||
'peerDependencies'
|
|
||||||
]['@angular/compiler-cli'];
|
|
||||||
}
|
|
||||||
|
|
||||||
const angularVersion = new SemVer(angularPkgJson['version']);
|
const angularVersion = new SemVer(angularPkgJson['version']);
|
||||||
|
|
||||||
if (!satisfies(angularVersion, supportedAngularSemver, { includePrerelease: true })) {
|
if (!satisfies(angularVersion, supportedAngularSemver, { includePrerelease: true })) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user