refactor(docs-infra): give more descriptive variable name (#34284)
Discussion: https://github.com/angular/angular/pull/34213#discussion_r353249119 PR Close #34284
This commit is contained in:
parent
8683c0335b
commit
2ecf9f3f2a
|
@ -286,13 +286,12 @@ class NgPackagesInstaller {
|
|||
* @param {import('@yarnpkg/lockfile').LockFileObject} projectLockfile - The projects's parsed `yarn.lock`.
|
||||
*/
|
||||
_overwritePackageVersion(packageName, packageConfig, projectConfig, projectLockfile) {
|
||||
const originalVersionRange = (projectConfig.dependencies || {})[packageName] ||
|
||||
(projectConfig.devDependencies || {})[packageName];
|
||||
const originalVersion =
|
||||
(projectLockfile[`${packageName}@${originalVersionRange}`] || {}).version;
|
||||
const projectVersionRange = (projectConfig.dependencies || {})[packageName] ||
|
||||
(projectConfig.devDependencies || {})[packageName];
|
||||
const projectVersion = (projectLockfile[`${packageName}@${projectVersionRange}`] || {}).version;
|
||||
|
||||
if (originalVersion !== undefined) {
|
||||
const newVersion = `${originalVersion}+locally-overwritten-by-ngPackagesInstaller`;
|
||||
if (projectVersion !== undefined) {
|
||||
const newVersion = `${projectVersion}+locally-overwritten-by-ngPackagesInstaller`;
|
||||
this._log(`Overwriting the version of '${packageName}': ${packageConfig.version} --> ${newVersion}`);
|
||||
packageConfig.version = newVersion;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue