Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli-cache): Remove RW CLI cache on upgrade #11135

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Aug 1, 2024

This change removes the redwood cli plugin cache in .redwood/commandCache.json on running rw upgrade.

This prevents the redwood CLI from using outdated versions of CLI plugins, and is particularly important when they same alias.

Before
running yarn rw sb -> would use the outdated storybook-cli package, and error out.

After
with no commandCache, it'll create a new command cache, and attempt to install the new vite CLI

@dac09 dac09 added this to the next-release-patch milestone Aug 1, 2024
@dac09 dac09 added the bug/confirmed We have confirmed this is a bug label Aug 1, 2024
@dac09 dac09 self-assigned this Aug 1, 2024
@dac09 dac09 added the release:fix This PR is a fix label Aug 1, 2024
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Awesome catch, thanks @dac09!

@Josh-Walker-GM Josh-Walker-GM merged commit 2d6173d into redwoodjs:main Aug 1, 2024
50 of 52 checks passed
Josh-Walker-GM pushed a commit that referenced this pull request Aug 9, 2024
This change removes the redwood cli plugin cache in
`.redwood/commandCache.json` on running `rw upgrade`.

This prevents the redwood CLI from using outdated versions of CLI
plugins, and is particularly important when they same alias.

**Before**
running `yarn rw sb` -> would use the outdated storybook-cli package,
and error out.

**After**
with no commandCache, it'll create a new command cache, and attempt to
install the new vite CLI
Josh-Walker-GM pushed a commit that referenced this pull request Aug 9, 2024
This change removes the redwood cli plugin cache in
`.redwood/commandCache.json` on running `rw upgrade`.

This prevents the redwood CLI from using outdated versions of CLI
plugins, and is particularly important when they same alias.

**Before**
running `yarn rw sb` -> would use the outdated storybook-cli package,
and error out.

**After**
with no commandCache, it'll create a new command cache, and attempt to
install the new vite CLI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug release:fix This PR is a fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants