-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v2] Fix v1 / v2 version conflicts #5899
Conversation
@@ -12,7 +12,7 @@ | |||
"dependencies": { | |||
"@babel/preset-typescript": "7.0.0-beta.47", | |||
"@babel/runtime": "7.0.0-beta.47", | |||
"babel-plugin-remove-graphql-queries": "^2.0.1-12" | |||
"babel-plugin-remove-graphql-queries": "2.0.2-alpha.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a major version bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to be v2 specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@calcsam I updated the description to describe the rules behind the version bumps in this PR
is there any chance to land #5895 before bumping the version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
does
"gatsby": ">2.0.0-alpha"
is a valid pattern? can we use something like"gatsby": "2.x"
-
do we really want drop the support for
v1
as some of the packages do support bothv1
andv2
We'd like to try and get a v2 beta out before merging in any more PRs as we've done a fair bit of manual testing on the current
I think ">2.0.0-alpha" is ok? It should pick up any 2 versions but "2.x" won't pick up alpha / beta / rc releases. Tried with https://semver.npmjs.com/
We'll still have the |
@@ -25,6 +25,7 @@ | |||
"remark" | |||
], | |||
"peerDependencies": { | |||
"gatsby": ">2.0.0-alpha", | |||
"gatsby-remark-prismjs": "^2.0.3-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the one I forgot about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about the rational around doing a major release for all plugins? Not sure it matters but many/most of the plugins don't have any breaking changes. Doing major releases for them might cause more confusion as then people would want to know how to "upgrade" those plugins despite there being nothing to do.
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "gatsby-dev-cli", | |||
"description": "CLI helpers for contributors working on Gatsby", | |||
"version": "1.2.12-10", | |||
"version": "2.0.0-alpha.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do major version?
@KyleAMathews I think major version bumps make sense as a way of framing which plugins support which versions of Gatsby. Some plugins support Gatsby v1 and Gatsby v2 at the moment. Once Gatsby v2 is released, our tests will be running plugins against Gatsby v2 only. If any of the plugins that support v1 and v2 stop working for v1, we won't know about it. Bumping the major version for each plugin means we can say:
Or slightly trickier, but still easy to understand is:
I agree this could be confusing for people who'd want to know how to "upgrade" those plugins despite there being nothing to do. Made more so by our current lack of changelogs. But I think bumping the major versions is the least confusing overall choice. Future plugin releases will all be tested against Gatsby v2, but we can still release new versions of Gatsby v1 plugins from the |
My reasoning for advocating for this for all packages (even if they don't have breaking changes, so not really in line with semver) is because of current workflow using lerna (releasing stable/ There is also issue that some plugins that didn't have major version bump in v2 actually do have breaking changes - for example |
Ok, makes sense. Better safe than sorry. I think we do need then a plugins section in the upgrade guide to a) add upgrade instructions for specific plugins e.g. add this new dependency to your package.json and b) say something like "Most people should not experience any breaking changes when upgrading this plugin" as there are people working on high profile sites or that are more fastidious about upgrades and will want to see an upgrade guide for every plugin the upgrade. |
* Remove old / v1-specific plugins * Fix conflicting versions between v1 and v2, update gatsby peerdep to v2 * Update dependencies for version check * Update snapshot * Update peerDep to match new version
Ref #5891 (comment)
Edit to explain how we've updated the versions here. These new versions aim to do the following:
-alpha.x
-alpha.x
plugin is ahead of its non-alpha versionexamples: