-
Notifications
You must be signed in to change notification settings - Fork 295
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
New upgrade
CLI command
#1458
Merged
Merged
New upgrade
CLI command
#1458
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8db0291
to
66111b7
Compare
66111b7
to
bba3dad
Compare
5b384fa
to
19ec7d2
Compare
Add version changelog boilerplate update update . add version_changelog.json
add additional remix upgrade test
19ec7d2
to
96f130d
Compare
gfscott
reviewed
Nov 16, 2023
frandiox
reviewed
Nov 17, 2023
gfscott
reviewed
Nov 17, 2023
gfscott
reviewed
Nov 17, 2023
Co-authored-by: Graham F. Scott <gfscott@users.noreply.github.com>
4e2b290
to
1debcaa
Compare
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hydrogen
upgrade
commandUpgrading Hydrogen projects today is not as simple as running
npm install @shopify/hydrogen
because of the coupling between Hydrogen, Oxygen and Remix dependencies.To determine an upgrade command for a specific Hydrogen version requires you need to know:
@shopify/cli-hydrogen
version@shopify/remix-oxygen
version@remix-run/react
and@remix-run/dev
version (and other optionalremix packages)
Currently, the best approach to figure out this command is by looking at the
package.json
dependencies inside the skeleton template or by visiting the releases notes
for a given hydrogen version and then manually writing down all the other package
versions compatible with a given hydrogen release.
This is not only cumbersome, but also prone to errors.
h2 upgrade
commandWe are introducing a new hydrogen cli
upgrade
command that:h2 upgrade
in your terminalfeatures
andfixes
of any availablehydrogen version(s)
TODO
instructions file detailing all cumulative code changes requiredto adopt a given hydrogen version
Getting started
Basic use
# from the base of the project run h2 upgrade
Alternatively, you can upgrade from another folder by using the
--path
flag--version
flagThe version flag let's you upgrade to a specific release version without any further
prompts. If an invalid version is provided you will be prompted to choose a hydrogen
version via a CLI prompt
Dev upgrade notice
Simply run dev as normal
npm run dev # or h2 dev
---no-version-check
flagIf you want to disable the development notice, simply run
--dry-run
flagIf your are unsure about upgrading or just want to preview the TODO list of
changes to a given hydrogen version you can run
h2 upgrade --dry-run # this will output a new .md file inside the .shopify/ folder for a given upgrade
Preview
Version selection prompt
Preview of Features and Fixes for a selected version
Upgrade success notice
Example instructions/TODO file
🎩 tophat:
/src/packages/cli