@edifice.io/cli
Advanced tools
Comparing version 1.6.0-develop-docker.0 to 1.6.0
{ | ||
"name": "@edifice.io/cli", | ||
"version": "1.6.0-develop-docker.0", | ||
"version": "1.6.0", | ||
"description": "Edifice Frontend CLI", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -26,4 +26,2 @@ // @ts-check | ||
console.log({ branchConfigs, packages, rootDir, branch, tag, ghToken }); | ||
const branchName = /** @type {string} */ (branch ?? currentGitBranch()); | ||
@@ -44,5 +42,5 @@ const isMainBranch = branchName === "main"; | ||
const semverTags = allTags.filter((t) => semver.valid(t)).reverse(); | ||
const filteredTags = semverTags | ||
const filteredTags = allTags | ||
// Ensure tag is valid | ||
.filter((t) => semver.valid(t)) | ||
// Filter tags based on whether the branch is a release or pre-release | ||
@@ -54,10 +52,2 @@ .filter((t) => { | ||
if (branchConfig.prerelease) { | ||
// If no tags exist for this prerelease branch, use main branch tags | ||
const branchTags = semverTags.filter((t) => { | ||
const tagPrerelease = semver.prerelease(t)?.[0]; | ||
return tagPrerelease === branchName; | ||
}); | ||
if (branchTags.length === 0) { | ||
return !isPrereleaseTag; // Use main branch tags | ||
} | ||
return isPrereleaseTag && prereleaseBranch === branchName; | ||
@@ -203,14 +193,8 @@ } | ||
// const releaseType = branchConfig.prerelease | ||
// ? "prerelease" | ||
// : /** @type {const} */ ({ 0: "patch", 1: "minor", 2: "major" })[ | ||
// recommendedReleaseLevel | ||
// ]; | ||
const releaseType = branchConfig.prerelease | ||
? "prerelease" | ||
: /** @type {const} */ ({ 0: "patch", 1: "minor", 2: "major" })[ | ||
recommendedReleaseLevel | ||
]; | ||
const releaseType = /** @type {const} */ ({ | ||
0: "patch", | ||
1: "minor", | ||
2: "major", | ||
})[recommendedReleaseLevel]; | ||
if (!releaseType) { | ||
@@ -222,7 +206,3 @@ throw new Error(`Invalid release level: ${recommendedReleaseLevel}`); | ||
? semver.parse(tag)?.version | ||
: semver.inc( | ||
latestTag, | ||
branchConfig.prerelease ? `pre${releaseType}` : releaseType, | ||
npmTag, | ||
); | ||
: semver.inc(latestTag, releaseType, npmTag); | ||
@@ -229,0 +209,0 @@ if (!version) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
55112
584