Skip to content

Conversation

@1046prt
Copy link

@1046prt 1046prt commented Nov 17, 2025

Fix bunx @astrojs/upgrade failing on projects with @astrojs/tailwind

Changes

  • Fixes bunx @astrojs/upgrade failing on projects with @astrojs/tailwind integration
  • Prevents upgrade tool from attempting to upgrade deprecated @astrojs/tailwind to v6.0.0
  • Adds proper deprecation warning and migration guidance for @astrojs/tailwind users
  • Maintains compatibility with all package managers (npm, pnpm, yarn, bun)

Before

  • Running bunx @astrojs/upgrade on projects with @astrojs/tailwind would fail with error: "migration tool can only be run on v3 project"
  • npx @astrojs/upgrade worked fine, creating inconsistent behavior between package managers

After

  • Both bunx and npx versions of @astrojs/upgrade work consistently
  • Users get clear deprecation warning about @astrojs/tailwind
  • Tool provides migration guidance to @tailwindcss/vite plugin
  • Other packages (like Astro core) continue to upgrade normally

Testing

  • Manual testing: Created test project with @astrojs/tailwind v5.1.0 and verified fix works with both:
    • node @astrojs/upgrade --dry-run (npm equivalent)
    • bun run @astrojs/upgrade --dry-run (bun equivalent)
  • Integration testing: Confirmed other packages still upgrade correctly
  • Error prevention: Verified the problematic Tailwind migration tool is no longer triggered

No automated tests added as this is a CLI tool fix requiring package manager interaction that's difficult to mock in unit tests. The fix is isolated to the upgrade package's dependency resolution logic.

Docs

No documentation changes needed - this is a bug fix that restores expected behavior. The upgrade tool already had built-in help and error messaging, we've just improved the handling of a specific deprecated package.

The fix automatically provides users with the correct migration documentation link: https://tailwindcss.com/docs/installation/framework-guides/astro


Changeset needed: Yes, this is a patch fix for @astrojs/upgrade package.

Run pnpm changeset and select:

  • @astrojs/upgrade (patch)
  • Summary: "Fix bunx @astrojs/upgrade failing on projects with deprecated @astrojs/tailwind integration

fix: #14778
@copilot

@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2025

⚠️ No Changeset found

Latest commit: 9569c87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

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

@1046prt 1046prt closed this Nov 17, 2025
@1046prt 1046prt deleted the fix/@astrojs-upgrade-14778 branch November 17, 2025 08:55
@1046prt 1046prt restored the fix/@astrojs-upgrade-14778 branch November 17, 2025 08:57
@1046prt 1046prt reopened this Nov 17, 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.

@astrojs/upgrade helper package fails on tailwind v4 projects when using bun x

1 participant