Skip to content

feat(cli): show changelog URL on update and fix bun installs#191

Merged
Leechael merged 6 commits intomainfrom
feat/cli-update-changelog-and-bun-fix
Mar 3, 2026
Merged

feat(cli): show changelog URL on update and fix bun installs#191
Leechael merged 6 commits intomainfrom
feat/cli-update-changelog-and-bun-fix

Conversation

@Leechael
Copy link
Collaborator

@Leechael Leechael commented Mar 3, 2026

Summary

  • Show GitHub changelog compare URL when an update is available (like gh CLI does)
  • Fix bun global installs: use exact version number instead of @latest tag (bun doesn't resolve dist-tags reliably) and add --no-cache
  • Replace deprecated actions/create-release@v1 with gh release create, include actual changelog content in GitHub Release body

Changes

CLI update notifications (update-check.ts)

  • Add changelog compare URL line to background update notices
  • Use exact version in install command for bun users

Self update command (self/update/index.ts)

  • Display changelog compare URL when update is available
  • Add releaseUrl and changelogUrl to JSON output
  • Use exact version spec for bun

Bun fix (package-manager.ts)

  • Add --no-cache flag for bun add -g commands
  • Callers pass exact version instead of @latest for bun

CI release workflow (release-command.yml)

  • Generate RELEASE_NOTES.md from conventional commits
  • Include changelog + install instructions in GitHub Release body
  • Replace deprecated actions/create-release@v1 with gh release create

Example output

Update available: v1.1.11 → v1.2.3
https://github.com/Phala-Network/phala-cloud/compare/cli-v1.1.11...cli-v1.2.3
Run "bun add -g --no-cache phala@1.2.3"?

Test plan

  • All 332 existing tests pass
  • New test: bun uses exact version and --no-cache in update notice
  • Type check passes
  • Lint passes

Leechael added 4 commits March 4, 2026 05:59
Bun does not properly resolve the @latest dist-tag, causing stale
versions to be installed. Use the exact version number instead, and
add --no-cache to ensure bun fetches the latest package from registry.
Add GitHub compare URL to background update notices so users can see
what changed between their current version and the latest release.
Also use exact version in the install command for bun users.
Display a GitHub compare URL when an update is available, linking to
the diff between the current and latest release tags. Include releaseUrl
and changelogUrl in JSON output. Use exact version spec for bun.
Replace deprecated actions/create-release@v1 with gh release create.
Generate release notes from conventional commits and include them in
the GitHub Release body alongside npm install instructions.
Cover formatGlobalInstallCommand and getGlobalInstallArgs with tests
for all package managers. Add getCachedUpdateNotice test to verify
changelog URL is included in cached update notices.
@Leechael
Copy link
Collaborator Author

Leechael commented Mar 3, 2026

!release cli patch beta

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🚀 @Leechael release command accepted: cli patch (beta).

📦 Prerelease tag: beta (will publish to npm with tag beta)
Target branch: feat/cli-update-changelog-and-bun-fix (open PR). Version commits will be pushed to this branch.
The release workflow is queued; results will be posted here.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🎉 Release completed: cli v1.1.12-beta.1

📦 Package Info

  • Package size: size: 214.5
  • Unpacked size: size: 746.4
  • Total files: files:
📄 Files included
11.4kB LICENSE
3.8kB README.md
29.7kB dist/api/index.d.ts
143.3kB dist/api/index.js
20B dist/index.d.ts
556.4kB dist/index.js
1.8kB package.json

Copy link
Contributor

@h4x3rotab h4x3rotab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Leechael Leechael merged commit b7c34d6 into main Mar 3, 2026
1 check passed
@Leechael Leechael deleted the feat/cli-update-changelog-and-bun-fix branch March 3, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants