mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
b5d21b00bc
This ensures that the new optimization rule, and also adev (when we complete migrating it to `rules_js`) can use the latest compiler-cli version from HEAD. PR Close #61810 PR Close #61830
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
function readPackage(pkg, context) {
|
|
// TODO(devversion): This exists temporarily during migration as we can't have `workspace:*` deps
|
|
// in the `package.json` also processed by Yarn
|
|
if (pkg.name === 'angular-srcs') {
|
|
pkg.dependencies = {
|
|
...pkg.dependencies,
|
|
// These dependencies are added to the workspace root so that peer dependencies
|
|
// are resolved via these locally-built versions. e.g. compiler-cli's peer deps.
|
|
'@angular/compiler': 'workspace:*',
|
|
'@angular/compiler-cli': 'workspace:*',
|
|
};
|
|
}
|
|
|
|
// TODO(devversion): This allows us to make compiler/TS a production dependency of compiler-cli
|
|
// because `rules_js` doesn't otherwise include the dependency in the `npm_package_store`.
|
|
// See: https://github.com/aspect-build/rules_js/issues/2226
|
|
if (pkg.name === '@angular/compiler-cli') {
|
|
pkg.dependencies = {
|
|
...pkg.dependencies,
|
|
'@angular/compiler': 'workspace:*',
|
|
'typescript': '5.8.3',
|
|
};
|
|
}
|
|
|
|
return pkg;
|
|
}
|
|
|
|
module.exports = {
|
|
hooks: {
|
|
readPackage,
|
|
},
|
|
};
|