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

rw upgrade: Update package versions from template package.json #8855

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Jul 7, 2023

Currently when running yarn rw upgrade -t canary we're only upgrading RW package versions.
If other packages that are listed in our create-redwood-app template package.jsons are upgraded the rw upgrade command won't catch that.
So running yarn rw upgrade -t canary might not give you the same versions of packages as if you used a canary version of yarn create redwood-app.

I remember this being a problem when we upgraded React from v17 to v18.
And now it's a problem again when we've upgraded to a canary version of React.

So now when running yarn rw upgrade -t canary the upgrade command will download the package.json files from our template and get the versions of packages from in there.

Currently this is only done for canary, but we can (probably/hopefully) enable it for other versions too if this is something we want to do.

@Tobbe Tobbe requested a review from jtoar July 7, 2023 21:42
@Tobbe Tobbe added the release:feature This PR introduces a new feature label Jul 7, 2023
@Tobbe Tobbe added this to the next-release milestone Jul 7, 2023
Copy link
Contributor

@jtoar jtoar left a comment

Choose a reason for hiding this comment

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

Solves a problem we used to have and will have again so makes sense and works great locally

@jtoar jtoar merged commit ed9c85c into redwoodjs:main Jul 7, 2023
7 of 12 checks passed
@jtoar jtoar modified the milestones: next-release, v6.0.0 Jul 7, 2023
jtoar pushed a commit that referenced this pull request Jul 7, 2023
Currently when running `yarn rw upgrade -t canary` we're only upgrading
RW package versions.
If other packages that are listed in our create-redwood-app template
package.jsons are upgraded the `rw upgrade` command won't catch that.
So running `yarn rw upgrade -t canary` might not give you the same
versions of packages as if you used a canary version of `yarn create
redwood-app`.

I remember this being a problem when we upgraded React from v17 to v18.
And now it's a problem again when we've upgraded to a canary version of
React.

So now when running `yarn rw upgrade -t canary` the upgrade command will
download the `package.json` files from our template and get the versions
of packages from in there.

Currently this is only done for canary, but we can (probably/hopefully)
enable it for other versions too if this is something we want to do.
@Tobbe Tobbe deleted the tobbe-rw-upgrade-react branch July 8, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants