fix(nextjs): drop invalid comparator from strictly-safe version range - #677
Merged
Conversation
STRICTLY_SAFE_NEXTJS_VERSIONS began with "==16.1.0", which is not valid
semver range syntax — `new Range("==16.1.0")` throws `Invalid
comparator`.
A single bad comparator invalidates the entire range, so
satisfies(base, STRICTLY_SAFE_NEXTJS_VERSIONS) always returned false and
the
prerelease fallback added in #665 never matched anything. Every
prerelease
was blocked, and the unit test for 16.3.0-preview failed.
Removing the clause is enough: ">=16.1.1" already covers it. Repairing
it to
"=16.1.0" instead would allow 16.1.0-canary.1, a build that predates the
fix
released in 16.1.0 — the +1 patch offset in each clause of this range
exists
precisely because a prerelease sorts before its own release.
leoortizz
requested review from
Yuangwang,
abhis3,
annajowang,
sjjj986 and
taeold
as code owners
August 11, 2026 18:45
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the STRICTLY_SAFE_NEXTJS_VERSIONS constant in packages/@apphosting/adapter-nextjs/src/utils.ts to exclude version 16.1.0 from the strictly safe range, now requiring >=16.1.1. There are no review comments, and I have no feedback to provide.
Yuangwang
approved these changes
Aug 11, 2026
This file contains hidden or 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
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.
Test Node 18fails on main, skippingPublish (NPM)and blocking releases: https://github.com/firebase/apphosting-adapters/actions/runs/31520664730/job/93877364944#step:8:165STRICTLY_SAFE_NEXTJS_VERSIONSstarts with==16.1.0, which isn't valid semver —new Range("==16.1.0")throwsInvalid comparator. One bad comparator invalidates the whole range, sosatisfies()always returned false and the prerelease fallback from #665 never matched. Every prerelease was blocked.Dropping the clause is enough;
>=16.1.1already covers it. Repairing it to=16.1.0would instead allow16.1.0-canary.1, which predates the fix released in 16.1.0.