Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilly-bottles-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/router": minor
---

update to solid-js@2.0.0-beta.14
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"release": "pnpm build && changeset publish"
},
"devDependencies": {
"@solidjs/web": "2.0.0-beta.7",
"@solidjs/web": "2.0.0-beta.14",
"@babel/core": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@changesets/cli": "^2.27.10",
Expand All @@ -47,14 +47,14 @@
"@rollup/plugin-terser": "0.4.4",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.0",
"babel-preset-solid": "2.0.0-beta.7",
"babel-preset-solid": "2.0.0-beta.14",
"jsdom": "^25.0.1",
"prettier": "^3.4.1",
"rollup": "^4.27.4",
"solid-js": "2.0.0-beta.7",
"solid-js": "2.0.0-beta.14",
"typescript": "^5.7.2",
"vite": "^6.0.0",
"vite-plugin-solid": "3.0.0-next.4",
"vite-plugin-solid": "3.0.0-next.5",
"vitest": "^2.1.6"
},
"peerDependencies": {
Expand Down
96 changes: 47 additions & 49 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
onlyBuiltDependencies:
- esbuild
4 changes: 2 additions & 2 deletions src/components.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*@refresh skip*/
import type { JSX } from "solid-js";
import type { JSX } from "@solidjs/web";
import { createMemo, merge, omit } from "solid-js";
import {
useHref,
Expand All @@ -13,7 +13,7 @@ import type {
} from "./types.js";
import { normalizePath } from "./utils.js";

declare module "solid-js" {
declare module "@solidjs/web" {
namespace JSX {
interface AnchorHTMLAttributes<T> {
state?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/data/action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { $TRACK, action as createSolidAction, createMemo, JSX, onCleanup, getOwner } from "solid-js";
import { isServer } from "@solidjs/web";
import { $TRACK, action as createSolidAction, createMemo, onCleanup, getOwner } from "solid-js";
import { isServer, type JSX } from "@solidjs/web";
import { useRouter } from "../routing.js";
import type {
RouterContext,
Expand Down
2 changes: 1 addition & 1 deletion src/routers/HashRouter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { JSX } from "solid-js";
import type { JSX } from "@solidjs/web";
import { setupNativeEvents } from "../data/events.js";
import type { BaseRouterProps } from "./components.jsx";
import { createRouter, scrollToHash, bindEvent } from "./createRouter.js";
Expand Down
2 changes: 1 addition & 1 deletion src/routers/MemoryRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createRouter, scrollToHash } from "./createRouter.js";
import { setupNativeEvents } from "../data/events.js";
import type { LocationChange } from "../types.js";
import type { BaseRouterProps } from "./components.jsx";
import type { JSX } from "solid-js";
import type { JSX } from "@solidjs/web";

export type MemoryHistory = {
get: () => string;
Expand Down
2 changes: 1 addition & 1 deletion src/routers/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createRouter, scrollToHash, bindEvent } from "./createRouter.js";
import { StaticRouter } from "./StaticRouter.js";
import { setupNativeEvents } from "../data/events.js";
import type { BaseRouterProps } from "./components.jsx";
import type { JSX } from "solid-js";
import type { JSX } from "@solidjs/web";
import { createBeforeLeave, keepDepth, notifyIfNotBlocked, saveCurrentDepth } from "../lifecycle.js";

export type RouterProps = BaseRouterProps & { url?: string, actionBase?: string, explicitLinks?: boolean, preload?: boolean };
Expand Down
3 changes: 1 addition & 2 deletions src/routers/StaticRouter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getRequestEvent } from "@solidjs/web";
import { getRequestEvent, type JSX } from "@solidjs/web";
import { type BaseRouterProps, createRouterComponent } from "./components.jsx";
import type { JSX } from "solid-js";

function getPath(url: string) {
const u = new URL(url);
Expand Down
4 changes: 2 additions & 2 deletions src/routers/components.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*@refresh skip*/

import type {Component, JSX, Owner} from "solid-js";
import type {Component, Owner} from "solid-js";
import {children, createMemo, createRoot, getOwner, merge, untrack} from "solid-js";
import {getRequestEvent, isServer, type RequestEvent} from "@solidjs/web";
import {getRequestEvent, isServer, type JSX, type RequestEvent} from "@solidjs/web";
import {
createBranches,
createRouteContext,
Expand Down
8 changes: 5 additions & 3 deletions src/routing.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { JSX, Accessor, flush, runWithOwner } from "solid-js";
import {
type Accessor,
createComponent,
createContext,
createMemo,
createSignal,
flush,
onCleanup,
runWithOwner,
untrack,
useContext
useContext,
} from "solid-js";
import { isServer, getRequestEvent } from "@solidjs/web";
import { isServer, getRequestEvent, type JSX } from "@solidjs/web";
import { createBeforeLeave } from "./lifecycle.js";
import type {
BeforeLeaveEventArgs,
Expand Down
5 changes: 3 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Component, JSX, Signal } from "solid-js";
import type { Accessor, Component, Setter, Signal } from "solid-js";
import type { JSX } from "@solidjs/web";

declare module "@solidjs/web" {
interface RequestEvent {
Expand Down Expand Up @@ -70,7 +71,7 @@ export interface LocationChange<S = unknown> {
rawPath?: string;
}
export interface RouterIntegration {
signal: Signal<LocationChange>;
signal: [Accessor<LocationChange>, Setter<LocationChange>];
create?: (router: RouterContext) => void;
utils?: Partial<RouterUtils>;
}
Expand Down
Loading