mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Jessica Janiuk
parent
0cdb02aa2b
commit
4fae4dbba8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user