codebyplan 1.13.45 → 1.13.46
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/dist/cli.js
CHANGED
package/package.json
CHANGED
|
@@ -93,8 +93,7 @@ jobs:
|
|
|
93
93
|
case "$VERSION" in
|
|
94
94
|
*-*)
|
|
95
95
|
# Prerelease — check if this exact version already exists on npm.
|
|
96
|
-
EXACT_OUT=$(npm view "codebyplan@${VERSION}" version 2>&1)
|
|
97
|
-
EXACT_EXIT=$?
|
|
96
|
+
EXACT_OUT=$(npm view "codebyplan@${VERSION}" version 2>&1) && EXACT_EXIT=0 || EXACT_EXIT=$?
|
|
98
97
|
if [ "$EXACT_EXIT" -eq 0 ]; then
|
|
99
98
|
echo "VERSION=${VERSION} already published — skipping (exact-version guard)."
|
|
100
99
|
echo "should_publish=false" >> "$GITHUB_OUTPUT"
|
|
@@ -134,8 +133,7 @@ jobs:
|
|
|
134
133
|
# Stable on main: compare committed version against the npm registry.
|
|
135
134
|
# Distinguish "never published" (E404 → first publish) from a transient
|
|
136
135
|
# registry/network error (abort rather than blindly publish).
|
|
137
|
-
NPM_OUT=$(npm view codebyplan version 2>&1)
|
|
138
|
-
NPM_EXIT=$?
|
|
136
|
+
NPM_OUT=$(npm view codebyplan version 2>&1) && NPM_EXIT=0 || NPM_EXIT=$?
|
|
139
137
|
if [ "$NPM_EXIT" -ne 0 ]; then
|
|
140
138
|
if echo "$NPM_OUT" | grep -q "E404"; then
|
|
141
139
|
echo "Package not yet published — first publish."
|
|
@@ -147,7 +145,7 @@ jobs:
|
|
|
147
145
|
fi
|
|
148
146
|
# Extract the first semver-looking line so a registry deprecation/advisory
|
|
149
147
|
# notice in NPM_OUT cannot corrupt the sort -V comparison below.
|
|
150
|
-
PUBLISHED=$(printf '%s\n' "$NPM_OUT" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
|
|
148
|
+
PUBLISHED=$(printf '%s\n' "$NPM_OUT" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+' | head -n1) || true
|
|
151
149
|
|
|
152
150
|
# sort -V: version-aware sort. If VERSION sorts AFTER PUBLISHED, it is greater.
|
|
153
151
|
GREATER=$(printf '%s\n%s\n' "$PUBLISHED" "$VERSION" | sort -V | tail -n1)
|