build: migrate adev to use packaged version of @angular/* packages (#62413)

Use the packaged versions of the packages instead of the local ts_project dependencies to prevent multiple versions of the deps to enter test bundles

PR Close #62413
This commit is contained in:
Joey Perrott
2025-07-01 20:04:04 +00:00
committed by Jessica Janiuk
parent 0cdb02aa2b
commit 4fae4dbba8
48 changed files with 422 additions and 290 deletions
+24
View File
@@ -8,6 +8,15 @@ function readPackage(pkg, context) {
// are resolved via these locally-built versions. e.g. compiler-cli's peer deps.
'@angular/compiler': 'workspace:*',
'@angular/compiler-cli': 'workspace:*',
'@angular/core': 'workspace:*',
'@angular/common': 'workspace:*',
'@angular/router': 'workspace:*',
'@angular/platform-browser': 'workspace:*',
'@angular/platform-browser-dynamic': 'workspace:*',
'@angular/platform-server': 'workspace:*',
'@angular/forms': 'workspace:*',
'@angular/elements': 'workspace:*',
'@angular/animations': 'workspace:*',
};
}
@@ -22,6 +31,21 @@ function readPackage(pkg, context) {
};
}
Object.entries(pkg.peerDependencies).forEach(([key, version]) => {
if (key === 'rxjs') {
pkg.dependencies = {
...pkg.dependencies,
'rxjs': version,
};
}
if (version === '0.0.0-PLACEHOLDER') {
pkg.dependencies = {
...pkg.dependencies,
[key]: 'workspace: *',
};
}
});
return pkg;
}