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: now builds fail if the Next runtime is >= 4.0.0 && < 4.26.0 #4668
fix: now builds fail if the Next runtime is >= 4.0.0 && < 4.26.0 #4668
Conversation
This pull request adds or modifies JavaScript ( |
e259dc0
to
dee6701
Compare
dee6701
to
2266671
Compare
if (outdatedPlugins.length === 0) { | ||
return | ||
} | ||
|
||
throwIfOutdatedNextRuntime(outdatedPlugins) |
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.
Need the feature flag for this.
// maybe there's a semver package to check this | ||
|
||
// version >= 4.0.0 && < 4.26.0 | ||
return (major === 4 && minor >= 0 && minor < 26) || (minor === 26 && patch === 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.
I think there's a @npm/semver
package used in this repo so better to use that?
// Think this semver range is correct for >= 4.0.0 but < 4.26.0
semver.satisfies('4.0.0 - 4.26.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.
Make sure you set includePrerelease
to true
* | ||
* @throws Error Throws an error if the Next runtime is >= 4.0.0 || < 4.26.0 | ||
*/ | ||
export const logOutdatedPlugins = function (logs, outdatedPlugins) { |
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.
Name slightly misleading now that it throws too?
* | ||
* @throws Error | ||
*/ | ||
const throwIfOutdatedNextRuntime = function (outdatedPlugins) { |
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.
Even though this is just Next for now, it would be better if this had a generic name
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.
Sounds good. I was just being explicit as I thought this was a temporary one off.
Closed in favour of #4672. |
π Thanks for submitting a pull request! π
Summary
I haven't tried this out yet and it needs tests.
Fixes #<replace_with_issue_number>
For us to review and ship your PR efficiently, please perform the following steps:
we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire π₯ (e.g. incident related), you can skip this step.
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)