From 07c295f8c7aa066daf19b5b9d891cefc81588f12 Mon Sep 17 00:00:00 2001 From: Nicolai Van der Storm Date: Fri, 7 Oct 2022 11:18:31 +0200 Subject: [PATCH] Change old solid-app-router to the new @solidjs/router --- ts-router/README.md | 2 +- ts-router/package.json | 2 +- ts-router/pnpm-lock.yaml | 20 ++++++++++---------- ts-router/src/app.tsx | 2 +- ts-router/src/index.tsx | 2 +- ts-router/src/pages/about.data.ts | 2 +- ts-router/src/pages/about.tsx | 2 +- ts-router/src/routes.ts | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ts-router/README.md b/ts-router/README.md index 74317a2..fd0e464 100644 --- a/ts-router/README.md +++ b/ts-router/README.md @@ -13,7 +13,7 @@ $ npm install # or pnpm install or yarn install This template's goal is to showcase the routing features of Solid. It also showcase how the router and Suspense work together to parallelize data fetching tied to a route via the `.data.ts` pattern. -You can learn more about it on the [`solid-app-router` repository](https://github.com/solidjs/solid-app-router) +You can learn more about it on the [`@solidjs/router` repository](https://github.com/solidjs/solid-router) ### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs) diff --git a/ts-router/package.json b/ts-router/package.json index 107749b..932996f 100644 --- a/ts-router/package.json +++ b/ts-router/package.json @@ -14,7 +14,7 @@ "vite-plugin-windicss": "^1.8.7" }, "dependencies": { - "solid-app-router": "^0.4.2", + "@solidjs/router": "^0.4.3", "solid-js": "^1.5.1" } } diff --git a/ts-router/pnpm-lock.yaml b/ts-router/pnpm-lock.yaml index f56a317..a49f80f 100644 --- a/ts-router/pnpm-lock.yaml +++ b/ts-router/pnpm-lock.yaml @@ -1,14 +1,14 @@ lockfileVersion: 5.4 specifiers: - solid-app-router: ^0.4.2 + '@solidjs/router': ^0.4.3 solid-js: ^1.5.1 vite: ^3.0.9 vite-plugin-solid: ^2.3.0 vite-plugin-windicss: ^1.8.7 dependencies: - solid-app-router: 0.4.2_solid-js@1.5.1 + '@solidjs/router': 0.4.3_solid-js@1.5.1 solid-js: 1.5.1 devDependencies: @@ -397,6 +397,14 @@ packages: fastq: 1.13.0 dev: true + /@solidjs/router/0.4.3_solid-js@1.5.1: + resolution: {integrity: sha512-mYpd4HxpH/3UZjHGTr2dhvPGXu034Ktxd05CJGA6nRjRGYCgUfhCQHRdEivyqJyb4LhHyDht4ny5xmwEOkUTaQ==} + peerDependencies: + solid-js: ^1.3.5 + dependencies: + solid-js: 1.5.1 + dev: false + /@windicss/config/1.8.7: resolution: {integrity: sha512-8n+/Y36j5L3rw2tgMdLjeGRuNV7VYfKoHoraLK6Bk9OJ1MTPd5vv7pekof/uOPWVV7WWjVeZ6CTO8SDbDDW3iw==} dependencies: @@ -961,14 +969,6 @@ packages: hasBin: true dev: true - /solid-app-router/0.4.2_solid-js@1.5.1: - resolution: {integrity: sha512-+NrLcmqYssx8DcbpcLBaYPqfTRtS+rkfbxMhLH8MHfTcTkdZfrkWQK7lsUvuPCebGEzfaPZJvHqBwhPrCXAmxg==} - peerDependencies: - solid-js: ^1.3.5 - dependencies: - solid-js: 1.5.1 - dev: false - /solid-js/1.5.1: resolution: {integrity: sha512-Y6aKystIxnrB0quV5nhqNuJV+l2Fk3/PQy1mMya/bzxlGiMHAym7v1NaqEgqDIvctbkxOi5dBj0ER/ewrH060g==} dependencies: diff --git a/ts-router/src/app.tsx b/ts-router/src/app.tsx index f6d1ac3..8bff869 100644 --- a/ts-router/src/app.tsx +++ b/ts-router/src/app.tsx @@ -1,5 +1,5 @@ import type { Component } from 'solid-js'; -import { Link, useRoutes, useLocation } from 'solid-app-router'; +import { Link, useRoutes, useLocation } from '@solidjs/router'; import { routes } from './routes'; diff --git a/ts-router/src/index.tsx b/ts-router/src/index.tsx index 3caaf3f..2869b12 100644 --- a/ts-router/src/index.tsx +++ b/ts-router/src/index.tsx @@ -2,7 +2,7 @@ import 'windi.css'; import { render } from 'solid-js/web'; -import { Router } from 'solid-app-router'; +import { Router } from '@solidjs/router'; import App from './app'; render( diff --git a/ts-router/src/pages/about.data.ts b/ts-router/src/pages/about.data.ts index bfa9f6d..5d7fd60 100644 --- a/ts-router/src/pages/about.data.ts +++ b/ts-router/src/pages/about.data.ts @@ -1,4 +1,4 @@ -import type { RouteDataFunc } from 'solid-app-router'; +import type { RouteDataFunc } from '@solidjs/router'; import { createResource } from 'solid-js'; function wait(ms: number, data: T): Promise { diff --git a/ts-router/src/pages/about.tsx b/ts-router/src/pages/about.tsx index 4ba4f68..4b39d77 100644 --- a/ts-router/src/pages/about.tsx +++ b/ts-router/src/pages/about.tsx @@ -1,5 +1,5 @@ import { Component, createEffect, Suspense } from 'solid-js'; -import { useRouteData } from 'solid-app-router'; +import { useRouteData } from '@solidjs/router'; export default function About() { const name = useRouteData<() => string>(); diff --git a/ts-router/src/routes.ts b/ts-router/src/routes.ts index a9a494a..2f8c868 100644 --- a/ts-router/src/routes.ts +++ b/ts-router/src/routes.ts @@ -1,5 +1,5 @@ import { lazy } from 'solid-js'; -import type { RouteDefinition } from 'solid-app-router'; +import type { RouteDefinition } from '@solidjs/router'; import Home from './pages/home'; import AboutData from './pages/about.data';