-
Notifications
You must be signed in to change notification settings - Fork 762
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
C3: Bump node engines version in package.json #4063
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"create-cloudflare": minor | ||
--- | ||
|
||
Bump supported node version to 18.14.1 | ||
|
||
We've recently switched out testing infrastructure to test C3 on node version 18.14.1. | ||
As of earlier this month, Node v16 is no longer supported, and many of the underlying | ||
framework scaffolding tools that C3 uses (ex. `create-astro`, `gatsby`) have dropped | ||
support for node v16, which in turn causes C3 to fail for those frameworks. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,6 @@ | |
"@types/semver": "^7.5.1" | ||
}, | ||
"engines": { | ||
"node": ">=16.13.0" | ||
"node": ">=18.14.1" | ||
} | ||
} |
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.
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.
Should this be minor? Changing a minimum node version is usually considered major
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.
Technically, yes, it should be major. However, we've talked about this a good deal internally and we decided to make it a minor bump for a couple of reasons.
Changing a minimum node version is usually considered major, but most of the time this is done for a different reason. Usually it means that the module in question is using features that are only available in newer version of node, and running them on older versions won't work anymore.
That's not really the case here. What's happening is that our upstream dependencies are themselves dropping support for node and changing their engines spec, all at different cadences. So the answer to
Does c3 work with node v16
is: Sometimes, it depends on the framework you're using.In our case we'd like to change our engines spec because we started testing exclusively on v18, and it feels a little dis-ingenuous to claim we support v16 support since we know it will break in some cases, and we don't be detecting new failures as they arise with different
create-*
tools.If we were to strictly follow semver, it seems like we'd need to bump a major version each time we bump to a new major version of a framework, since technically it's a breaking change if that's the framework you use. This leaves us with 2 options: do major bumps as frequently as we bump our dependencies, or keep stale dependencies around longer so we can batch them up into major bumps of c3. Neither seem like great options.
There's also the unfortunate reality that frameworks don't often align the major versions of their framework in respective scaffolding tools. Sometimes a new minor version of
create-*
will use a new major version offramework-*
.Major bumps are a little challenging for us logistically. We've got calls to
create cloudflare@2
throughoutwrangler
itself, and in tons of documentation that would be tough to update in a coordinated manner.Another issue is that C3 now automatically run the latest version if it detects one is available, but only if it's a minor version difference. We do this since most people use
npx
or it's counterpart in other package managers, which cache versions of these pretty aggressively.This means that as we release major versions of c3, many users would get stuck on older versions, which we don't really want at the moment since many frameworks are churning to drop node v16 support.
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.
I agree with these justifications for keeping this a minor bump, not major.
Just want to call out that wrangler's calls to
create cloudflare@2
are to protect old installations of wrangler. When C3 needs a major bump, wrangler will update those calls to the latest major for future releasesThere 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.
Appreciate the explanation - no complaints there 🙂