@wyxos/zephyr 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/zephyr",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "A streamlined deployment tool for web applications with intelligent Laravel project detection",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -60,17 +60,22 @@ function selectVersionSuggestionReference(currentVersion, versionBumps) {
60
60
  return versionBumps[0] ?? null
61
61
  }
62
62
 
63
- const currentMinorBoundary = versionBumps.find(({version}) => {
64
- const parsed = semver.parse(version)
65
-
66
- return parsed
63
+ let earliestKnownCurrentMinor = null
64
+ const currentMinorBoundary = versionBumps.find((versionBump) => {
65
+ const parsed = semver.parse(versionBump.version)
66
+ const isCurrentMinor = parsed
67
67
  && parsed.major === current.major
68
68
  && parsed.minor === current.minor
69
- && parsed.patch === 0
70
69
  && parsed.prerelease.length === 0
70
+
71
+ if (isCurrentMinor) {
72
+ earliestKnownCurrentMinor = versionBump
73
+ }
74
+
75
+ return isCurrentMinor && parsed.patch === 0
71
76
  })
72
77
 
73
- return currentMinorBoundary ?? versionBumps[0] ?? null
78
+ return currentMinorBoundary ?? earliestKnownCurrentMinor ?? versionBumps[0] ?? null
74
79
  }
75
80
 
76
81
  function formatVersionReferenceLabel(reference, currentVersion) {
@@ -80,13 +85,14 @@ function formatVersionReferenceLabel(reference, currentVersion) {
80
85
 
81
86
  const current = semver.parse(currentVersion)
82
87
  const parsed = semver.parse(reference.version)
83
- const isCurrentMinorBoundary = current
88
+ const isCurrentMinor = current
84
89
  && parsed
85
90
  && parsed.major === current.major
86
91
  && parsed.minor === current.minor
87
- && parsed.patch === 0
88
92
  && parsed.prerelease.length === 0
89
- const prefix = isCurrentMinorBoundary ? 'current app minor baseline' : 'last app version bump'
93
+ const prefix = isCurrentMinor
94
+ ? parsed.patch === 0 ? 'current app minor baseline' : 'earliest known app minor baseline'
95
+ : 'last app version bump'
90
96
 
91
97
  return `${prefix} ${reference.shortHash} (${reference.version})`
92
98
  }