Skip to content

feat(v10/solid,solidstart): Support @solidjs/router v1 - #23163

Merged
andreiborza merged 2 commits into
v10from
ab/backport-v10-solid-router-v1
Aug 7, 2026
Merged

feat(v10/solid,solidstart): Support @solidjs/router v1#23163
andreiborza merged 2 commits into
v10from
ab/backport-v10-solid-router-v1

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Backport of: #23162

@andreiborza
andreiborza marked this pull request as ready for review August 7, 2026 16:56
@andreiborza
andreiborza requested a review from a team as a code owner August 7, 2026 16:56
@andreiborza
andreiborza requested review from a team, logaretm, mydea, nicohrubec and s1gr1d and removed request for a team and mydea August 7, 2026 16:56

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 54e5079. Configure here.

Comment thread packages/solid/package.json
},
"peerDependencies": {
"@solidjs/router": "^0.13.4 || ^0.14.0 || ^0.15.0",
"@solidjs/router": ">=0.13.4 <2.0.0-0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The peer dependency for @solidjs/router was updated to include v1.x, but the code using useBeforeLeave is not compatible with the breaking API changes, likely causing runtime errors.
Severity: HIGH

Suggested Fix

Update the implementation in packages/solid/src/solidrouter.ts to be compatible with the breaking changes in @solidjs/router v1.0.0, specifically how the useBeforeLeave event argument is handled. Alternatively, revert the peer dependency range in package.json to exclude v1.x versions.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: packages/solid/package.json#L62

Potential issue: The peer dependency for `@solidjs/router` was updated to allow v1.x,
but the implementation in `packages/solid/src/solidrouter.ts` was not updated to handle
breaking changes. The code uses `useBeforeLeave` and expects the `to` property from the
event argument to be a string-like value. However, v1.0.0 of the router changes `to` to
be a location object. Calling `to.toString()` on this object will likely result in a
runtime error or incorrect behavior during navigation, as the code is not prepared to
handle the new object structure.

Also affects:

  • packages/solidstart/package.json:60~60

Did we get this right? 👍 / 👎 to inform future reviews.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.75 kB added added
@sentry/browser - with treeshaking flags 26.19 kB added added
@sentry/browser (incl. Tracing) 46.6 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.38 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.34 kB added added
@sentry/browser (incl. Tracing, Replay) 85.84 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.48 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.55 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.2 kB added added
@sentry/browser (incl. Feedback) 44.92 kB added added
@sentry/browser (incl. sendFeedback) 32.55 kB added added
@sentry/browser (incl. FeedbackAsync) 37.68 kB added added
@sentry/browser (incl. Metrics) 28.84 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.76 kB added added
@sentry/react 29.55 kB added added
@sentry/react (incl. Tracing) 48.86 kB added added
@sentry/vue 33.17 kB added added
@sentry/vue (incl. Tracing) 48.56 kB added added
@sentry/svelte 27.78 kB added added
CDN Bundle 30.14 kB added added
CDN Bundle (incl. Tracing) 48.56 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 70.99 kB added added
CDN Bundle (incl. Tracing, Replay) 86.05 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.36 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.12 kB added added
CDN Bundle - uncompressed 89.9 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.78 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.61 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.75 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.37 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.01 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.98 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.71 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.67 kB added added
@sentry/nextjs (client) 51.4 kB added added
@sentry/sveltekit (client) 47.02 kB added added
@sentry/core/server 80.44 kB added added
@sentry/core/browser 66.78 kB added added
@sentry/node-core 63.25 kB added added
@sentry/node 125.89 kB added added
@sentry/node (incl. diagnostics channel injection) 151.33 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node/light 51.41 kB added added
@sentry/node - without tracing 74.94 kB added added
@sentry/aws-serverless 84.21 kB added added
@sentry/cloudflare (withSentry) - minified 200.5 kB added added
@sentry/cloudflare (withSentry) 492.68 kB added added

andreiborza added a commit that referenced this pull request Aug 7, 2026
)

## What

Bump `@solidjs/router` from `^0.15.0` to `^1.0.0` in the SolidStart 1
e2e test apps.

- `solidstart`, `solidstart-spa`, `solidstart-top-level-import`,
`solidstart-dynamic-import`

## Why

#23162 widened the `@solidjs/router` peer range to `>=0.13.4 <2.0.0-0`,
but only the `solidstart-2` app ran against v1, so the SolidStart 1 +
router v1 combination the range now advertises had no coverage. The
equivalent bump on v10 (#23163) passes all four suites locally.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@andreiborza
andreiborza merged commit 3b56ecb into v10 Aug 7, 2026
311 of 312 checks passed
@andreiborza
andreiborza deleted the ab/backport-v10-solid-router-v1 branch August 7, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants