Skip to content

Version transitions in CLI outputs#12739

Merged
florian-lefebvre merged 5 commits intowithastro:mainfrom
outslept:idkgene/upgrade-package
Jan 10, 2025
Merged

Version transitions in CLI outputs#12739
florian-lefebvre merged 5 commits intowithastro:mainfrom
outslept:idkgene/upgrade-package

Conversation

@outslept
Copy link
Contributor

@outslept outslept commented Dec 15, 2024

Changes

  • Updated the upgrade messaging to show both current and target versions
  • Added arrow symbol (→) to visually represent the version change

Before:

@astrojs/tailwind can be updated to v5.1.3

After:

@astrojs/tailwind can be updated v4.0.0 → v5.1.3

Testing

Updated existing test suite by modifying test assertions to verify new message format

Docs

Should be self-explanatory

Additional

Coming from withastro/roadmap#1069

- Updated the upgrade function to include the current version in the upgrade message format.
- Modified test assertions to reflect the new message format.

Background & Motivation:
The current output format lacks clarity in showing version changes. Adding a simple 'from → to' format improves visibility and developer experience when updating Astro packages.

Before:
@astrojs/tailwind can be updated to v5.1.3

After:
@astrojs/tailwind can be updated v4.0.0 → v5.1.3

This change:
- Makes the upgrade process "more transparent"
- Simplifies version change tracking
- Improves DX during updates

See withastro/roadmap#1069
@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2024

🦋 Changeset detected

Latest commit: 0692110

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@outslept
Copy link
Contributor Author

This is opinionated, I am open to any adjustments

@outslept outslept marked this pull request as draft December 15, 2024 03:44
- Remove 'to' particle from update messages
- Adjusted spacing in version comparison output
- Update tests to match the spacing

Before:
▲  astro can be updated to v1.0.0 → v2.0.0

After:
▲  astro can be updated  v1.0.0 → v2.0.0
@outslept outslept marked this pull request as ready for review December 15, 2024 11:50
@florian-lefebvre
Copy link
Member

Last thing, can you add a patch changeset? Running pnpm changeset from the root will guide you

@outslept
Copy link
Contributor Author

Last thing, can you add a patch changeset? Running pnpm changeset from the root will guide you

Completely forgot about that. Done

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

Thanks!

@florian-lefebvre florian-lefebvre merged commit 1f9571b into withastro:main Jan 10, 2025
4 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jan 10, 2025
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