Skip to content

Commit

Permalink
update router version in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Jul 8, 2024
1 parent 1ec5e29 commit 8337d88
Show file tree
Hide file tree
Showing 27 changed files with 70 additions and 66 deletions.
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"vinxi": "^0.3.12"
Expand Down
2 changes: 1 addition & 1 deletion examples/experiments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"vinxi": "^0.3.12"
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"vinxi": "^0.3.12"
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/src/routes/[...stories].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getStories } from "~/lib/api";
import { StoryTypes } from "~/types";

export const route = {
load({ location, params }) {
preload({ location, params }) {
void getStories((params.stories as StoryTypes) || "top", +location.query.page || 1);
}
} satisfies RouteDefinition;
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/src/routes/stories/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Comment from "~/components/comment";
import { getStory } from "~/lib/api";

export const route = {
load({ params }) {
preload({ params }) {
void getStory(params.id);
}
} satisfies RouteDefinition;
Expand Down
2 changes: 1 addition & 1 deletion examples/hackernews/src/routes/users/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Show } from "solid-js";
import { getUser } from "~/lib/api";

export const route = {
load({ params }) {
preload({ params }) {
void getUser(params.id);
}
} satisfies RouteDefinition;
Expand Down
2 changes: 1 addition & 1 deletion examples/notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"date-fns": "^3.6.0",
"solid-js": "^1.8.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/notes/src/routes/notes/[id]/(preview).tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import EditButton from "~/components/EditButton";
import { getNotePreview } from "~/lib/api";

export const route = {
load({ params }) {
preload({ params }) {
getNotePreview(+params.id);
}
} satisfies RouteDefinition;
Expand Down
2 changes: 1 addition & 1 deletion examples/notes/src/routes/notes/[id]/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import NoteEditor from "~/components/NoteEditor";
import { getNote } from "~/lib/api";

export const route = {
load({ params }) {
preload({ params }) {
getNote(+params.id);
}
} satisfies RouteDefinition;
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"unstorage": "1.10.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare module "solid-js" {
const setFocus = (el: HTMLElement) => setTimeout(() => el.focus());

export const route = {
load() {
preload() {
getTodos();
}
} satisfies RouteDefinition;
Expand Down
2 changes: 1 addition & 1 deletion examples/with-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@types/node": "^20.12.7"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"unstorage": "1.10.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-auth/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const getUser = cache(async () => {
return { id: user.id, username: user.username };
} catch {
await logoutSession();
throw redirect("/login");
redirect("/login");
}
}, "user");

Expand Down
2 changes: 1 addition & 1 deletion examples/with-auth/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createAsync, type RouteDefinition } from "@solidjs/router";
import { getUser, logout } from "~/lib";

export const route = {
load: () => getUser()
preload() { getUser() }
} satisfies RouteDefinition;

export default function Home() {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-authjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@babel/core": "7.24.4",
"@solid-mediakit/auth": "^2.0.11",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"vinxi": "^0.3.12"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-drizzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"drizzle-kit": "^0.22.7"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"better-sqlite3": "^11.0.0",
"drizzle-orm": "^0.31.2",
Expand Down
4 changes: 3 additions & 1 deletion examples/with-drizzle/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { createAsync, type RouteDefinition } from "@solidjs/router";
import { getUser, logout } from "~/api";

export const route = {
load: () => getUser()
preload() {
getUser();
}
} satisfies RouteDefinition;

export default function Home() {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@mdx-js/mdx": "^2.3.0",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"@vinxi/plugin-mdx": "^3.7.1",
"solid-js": "^1.8.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@prisma/client": "^5.12.1",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"prisma": "^5.12.1",
"solid-js": "^1.8.17",
Expand Down
4 changes: 3 additions & 1 deletion examples/with-prisma/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { createAsync, type RouteDefinition } from "@solidjs/router";
import { getUser, logout } from "~/lib";

export const route = {
load: () => getUser()
preload() {
getUser();
}
} satisfies RouteDefinition;

export default function Home() {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-solid-styled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"solid-js": "^1.8.17",
"solid-styled": "^0.11.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-trpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"@trpc/client": "^10.45.2",
"@trpc/server": "^10.45.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-unocss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "vinxi start"
},
"dependencies": {
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"@unocss/reset": "^0.59.2",
"solid-js": "^1.8.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "module",
"devDependencies": {
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "^1.0.2",
"@solidjs/testing-library": "^0.8.7",
"@testing-library/jest-dom": "^6.4.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@kobalte/core": "^0.13.1",
"@kobalte/utils": "^0.9.0",
"@solidjs/meta": "^0.29.0",
"@solidjs/router": "^0.13.6",
"@solidjs/router": "^0.14.1",
"@solidjs/start": "workspace:*",
"@tailwindcss/typography": "^0.5.9",
"@vinxi/plugin-mdx": "^3.7.1",
Expand Down
Loading

0 comments on commit 8337d88

Please sign in to comment.