Skip to content

fix: follow solid-js rc.10 attribution API (NavigationRef, history(type)); peer ^2.0.0-rc.10 - #628

Merged
ryansolid merged 1 commit into
nextfrom
fix/solid-rc10-attribution-compat
Sep 28, 2026
Merged

ryansolid merged 1 commit into
nextfrom
fix/solid-rc10-attribution-compat

Conversation

@ryansolid

Copy link
Copy Markdown
Member

What

Minimal compatibility fix so the published router builds and tests against solid-js@2.0.0-rc.10 / rc.11.

  • src/routers/factory.tsx: import type { NavigationRef } from "solid-js" (was "solid-js/attribution").
  • test/observe-navigation.spec.tsx: attribution.history("navigation") in place of attribution.navigations().
  • README.md: the one prose mention of attribution.navigations() updated to attribution.history("navigation") (feedback().navigations is unchanged in rc.11 and stays as-is).
  • package.json: peer range for solid-js and @solidjs/web ^2.0.0-rc.9 → ^2.0.0-rc.10; devDependencies moved to ^2.0.0-rc.11; pnpm-lock.yaml regenerated accordingly (pnpm i --frozen-lockfile passes).
  • Changeset (patch).

Why

solid-js@2.0.0-rc.10 changed the attribution surface (solidjs/solid 235173e, 384a631): InteractionRef/NavigationRef moved off solid-js/attribution onto the main solid-js entry, and attribution.navigations()/interactions()/holds()/waterfalls() collapsed into attribution.history(type). Router next (4658036, published 2.0.0-next.30) still uses the old surface while declaring peer solid-js ^2.0.0-rc.9, so any lockfile-less install resolves rc.11 and fails: tsc reports TS2305: Module '"solid-js/attribution"' has no exported member 'NavigationRef', and 6 specs fail with attribution.navigations is not a function.

These are exactly the two compat edits already present in #623 (feat/declare-initial-route), lifted out on their own. #623 additionally depends on the unreleased solidjs/solid#3683 (NavigationRef.initial / RenderEvent.route); once this lands, #623 rebases onto it and becomes feature-only. No initial-route code is included here.

Tests (local, solid-js@2.0.0-rc.11 / @solidjs/web@2.0.0-rc.11)

Suite next HEAD (before) This branch (after)
pnpm build (tsc + rollup + fs gate) fails: TS2305 in factory.tsx passes
Client (jsdom, vitest run) 6 failed / 426 passed (432) 432 passed (432)
Server (vitest.config.server.ts) 38 passed (38) 38 passed (38)
Types (tsc --project tsconfig.test.json) 1× TS2305, 10× TS2339, 2× TS7006 clean

All six client failures were attribution.navigations is not a function in observe-navigation.spec.tsx; all now pass.

Pre-existing, unrelated: test/exact-optional-types.spec.ts compiles a fixture through the TypeScript compiler API inside a 5 s test timeout and times out under CPU contention (e.g. two vitest processes at once). Reproduced identically on next HEAD before this change; passes when the machine is idle (5/5 idle runs on this branch).

Public API changes

  • Peer range solid-js ^2.0.0-rc.9 → ^2.0.0-rc.10
  • Peer range @solidjs/web ^2.0.0-rc.9 → ^2.0.0-rc.10

No exports, props, options, or runtime behaviour change.

— Claude via Cursor

@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a283098

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/router Patch

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

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​solidjs/​web@​2.0.0-rc.9 ⏵ 2.0.0-rc.11100 +11008397100
Updatedsolid-js@​2.0.0-rc.9 ⏵ 2.0.0-rc.1110010095 +196100

View full report

@ryansolid
ryansolid merged commit 49c84ff into next Sep 28, 2026
3 checks passed
@ryansolid
ryansolid deleted the fix/solid-rc10-attribution-compat branch September 28, 2026 17:57
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.

1 participant