Skip to content

Commit

Permalink
Set dev tag as depenency and update version for published (Azure#14087)
Browse files Browse the repository at this point in the history
* Set dev version dependency as dev tag and update version only for published client packages
* Remove updating dependency for dev dependencies
  • Loading branch information
praveenkuttappan authored Mar 4, 2021
1 parent ab2d688 commit 7aa05cc
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions eng/tools/versioning/set-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ const updateDependencySection = (rushPackages, dependencySection, buildId) => {
if (
parsedDepMinVersion.major == parsedPackageVersion.major &&
parsedDepMinVersion.minor == parsedPackageVersion.minor &&
parsedDepMinVersion.patch == parsedPackageVersion.patch
parsedDepMinVersion.patch == parsedPackageVersion.patch &&
!rushPackages[depName].json["private"]
) {
rushPackages = updatePackageVersion(rushPackages, depName, buildId);
}
Expand All @@ -100,13 +101,6 @@ const updateInternalDependencyVersions = (rushPackages, package, buildId) => {
buildId
);

console.log("checking devDependencies ..");
rushPackages = updateDependencySection(
rushPackages,
rushPackages[package].json.devDependencies,
buildId
);

console.log("checking peerDependencies ..");
rushPackages = updateDependencySection(
rushPackages,
Expand Down Expand Up @@ -141,12 +135,13 @@ const makeDependencySectionConsistentForPackage = (rushPackages, dependencySecti
parsedDepMinVersion.major == parsedPackageVersion.major &&
parsedDepMinVersion.minor == parsedPackageVersion.minor &&
parsedDepMinVersion.patch == parsedPackageVersion.patch &&
rushPackages[depName].newVer !== undefined
rushPackages[depName].newVer !== undefined &&
!rushPackages[depName].json["private"]
) {

// Setting version to ^[major.minor.patch]-alpha so that this automatically matches
// with the latest dev version published on npm
dependencySection[depName] = `^${parsedPackageVersion.major}.${parsedPackageVersion.minor}.${parsedPackageVersion.patch}-alpha`;
dependencySection[depName] = `dev`;
}
}
return rushPackages;
Expand Down

0 comments on commit 7aa05cc

Please sign in to comment.