fix: declare @solidjs/router as an optional peer dep below v2 - #2263
Merged
birkskyum merged 1 commit intoJul 28, 2026
Merged
Conversation
@solidjs/start had no declared relationship to @solidjs/router at all, so nothing prevented an incompatible pairing. Router v2 is expected to target Solid v2, so constrain the accepted range to >=0.16.0 <2.0.0-0. The peer is marked optional via peerDependenciesMeta, since the router integration is entirely user-land and apps that do not use it are unaffected. The upper bound uses <2.0.0-0 rather than <2.0.0 so that 2.0.0 prereleases are excluded under prerelease-inclusive resolution too.
🦋 Changeset detectedLatest commit: 502367e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
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.

Problem
@solidjs/startdeclares no relationship to@solidjs/routerat all: it is not a dependency, not a peer dependency, and there is no import of it anywhere inpackages/start/src. The router integration is entirely user-land, withFileRoutesinsrc/router.tsxreturning plain route configs.That means nothing constrains the pairing in either direction, and an incompatible router can be installed alongside Start with no signal to the user.
Change
Declare the router as an optional peer dependency with an explicit range:
Router v2 is expected to target Solid v2, so
@solidjs/startv2 should accept0.16and up but stay below v2.peerDependenciesMetakeeps this advisory for apps that do not use the router at all.The upper bound is
<2.0.0-0rather than<2.0.0on purpose. Under default semver both exclude a stable2.0.0, but<2.0.0still admits2.0.0-*prereleases under prerelease-inclusive resolution.<2.0.0-0excludes them either way.Verified
Range behavior:
0.15.40.16.0–0.16.31.0.0,1.9.92.0.0-next.1,2.0.0Install behavior, checked against a synthetic package carrying the same declaration:
0.16.3: installs cleanERESOLVElistingpeerOptional @solidjs/router, andpnpm peers checkreports it as an unmet peerNote that inside this monorepo the constraint will not visibly warn, because
@solidjs/startis linked viaworkspace:*and pnpm's auto-install-peers simply installs a satisfying version into thepackages/startimporter. That is the new lockfile line. The user-facing behavior was verified separately via a packed tarball.Worth a maintainer check
The currently published
@solidjs/router@1.0.0-next.11(thenexttag) declares peers ofsolid-js: >=2.0.0-beta.22 <2.0.0-experimental.0and@solidjs/web: ^2.0.0-beta.26, so that prerelease line targets Solid v2. The same applies to the0.17.0-next.*versions that preceded it.This does not break the range as written: both prerelease lines are excluded under default resolution anyway, since a prerelease only matches when a comparator shares its major.minor.patch tuple. So a stable
1.xis accepted while today's1.0.0-next.*is not.It does mean the bound depends on the release plan. If the v1 numbering is being repurposed and a Solid-v1-targeting
1.0.0supersedes those prereleases, this range is correct. If those prereleases are the future v1, the bound should be<1.0.0-0instead.