Skip to content

@astrojs/upgrade beta installation will downgrade packages to lower beta versions #17024

@kydecker

Description

@kydecker

Astro Info

Astro                    v7.0.0-beta.3
Node                     v24.14.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   static
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/sitemap
                         @astrojs/mdx
                         @astrojs/react

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I attempted the v7.0 beta upgrade with pnpm dlx @astrojs/upgrade beta and it reverted several packages to lower versions:

  • @astrojs/markdown-remark from 7.2.0 (latest) to 7.0.0-beta.11
  • @astrojs/cloudflare from 13.7.0 (latest) to 13.0.0-beta.14
  • @astrojs/react from 5.0.7 (latest) to 5.0.0-beta.4
  • @astrojs/rss from 4.0.18 (latest) to 4.0.15-beta.4
  • @astrojs/sitemap to 3.7.3 (latest) to 3.6.1-beta.3

Seems like a bug where when a -beta flag is detected in the package, it will be chosen and installed even if the installation would downgrade the version number.

What's the expected result?

The beta flag of @astrojs/upgrade does not violate semantic versioning / does not downgrade packages.

Link to Minimal Reproducible Example

N/A

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: upgradeRelated to `@astrojs/upgrade` (scope)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions