Skip to content

Commit e566a5b

Browse files
committed
Merge branch 'main' of github.com:solidjs/solid-app-router
2 parents 20ad18f + 119d917 commit e566a5b

File tree

10 files changed

+1385
-2180
lines changed

10 files changed

+1385
-2180
lines changed

.changeset/big-badgers-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
Add JSdoc
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": minor
3+
---
4+
5+
Vite 6 compatibility

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ contact_links:
33
- name: 🤔 Long question or idea
44
url: https://github.com/solidjs/solid-router
55
about: Ask long-form questions and discuss ideas.
6+
- name: 📝 Official Documentation
7+
url: https://docs.solidjs.com/solid-router
8+
about: Check existing documentation on APIs and how to use Solid-Router.
69
- name: 💬 Community Chat
710
url: https://discord.com/invite/solidjs
8-
about: Ask quick questions or simply chat on the EdgeDB Discord server.
9-
- name: 💬 New Updates (Twitter)
10-
url: https://twitter.com/solid_js
11-
about: Link to our twitter account if you want to follow us and stay up to date with news
11+
about: Ask quick questions or simply chat on the SolidJS Discord server.
12+
- name: 💬 New Updates (X - formerly Twitter)
13+
url: https://x.com/solid_js
14+
about: Link to our X account if you want to follow us and stay up to date with news.
15+
- name: 💬 New Updates BlueSky
16+
url: https://bsky.app/profile/solidjs.com
17+
about: Link to our BlueSky account if you want to follow us and stay up to date with news.
1218
- name: 💬 New Updates (Reddit)
1319
url: https://www.reddit.com/r/solidjs/
14-
about: Link to our twitter account if you want to follow us and stay up to date with news
20+
about: Link to our twitter account if you want to follow us and stay up to date with news.
1521
- name: 🍿 YouTube Channel
1622
url: https://www.youtube.com/c/RyanCarniato9
17-
about: Are you a techlead or wanting to learn more about SolidJS? Watch Ryan Carniato (creator of solidJS) share detailed technical deep dives into topics like how SolidJS, Server Side Rendering (SSR), ReactJS, Svelte, MarkoJS & Partial Hydration works under the hood and so much more
23+
about: Are you a techlead or wanting to learn more about SolidJS? Watch Ryan Carniato (creator of SolidJS) share detailed technical deep dives into topics like how SolidJS, Server Side Rendering (SSR), ReactJS, Svelte, MarkoJS & Partial Hydration works under the hood and so much more.

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "22"
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 9
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Run tests
31+
run: pnpm run test

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ if (unauthorized) {
818818

819819
### useLocation
820820

821-
Retrieves reactive `location` object useful for getting things like `pathname`
821+
Retrieves reactive `location` object useful for getting things like `pathname`.
822822

823823
```js
824824
const location = useLocation();
@@ -880,7 +880,8 @@ return <div classList={{ active: Boolean(match()) }} />;
880880
For example if you stored breadcrumbs on your route definition you could retrieve them like so:
881881
```js
882882
const matches = useCurrentMatches();
883-
const breadcrumbs = createMemo(() => matches().map(m => m.route.info.breadcrumb))
883+
884+
const breadcrumbs = createMemo(() => matches().map(m => m.route.info.breadcrumb));
884885
```
885886

886887
### usePreloadRoute
@@ -898,11 +899,11 @@ preload(`/users/settings`, { preloadData: true });
898899
`useBeforeLeave` takes a function that will be called prior to leaving a route. The function will be called with:
899900

900901
- from (_Location_): current location (before change).
901-
- to (_string | number_}: path passed to `navigate`.
902-
- options (_NavigateOptions_}: options passed to `navigate`.
903-
- preventDefault (_void function_): call to block the route change.
904-
- defaultPrevented (_readonly boolean_): true if any previously called leave handlers called preventDefault().
905-
- retry (_void function_, _force?: boolean_ ): call to retry the same navigation, perhaps after confirming with the user. Pass `true` to skip running the leave handlers again (ie force navigate without confirming).
902+
- to (_string | number_): path passed to `navigate`.
903+
- options (_NavigateOptions_): options passed to `navigate`.
904+
- preventDefault (_function_): call to block the route change.
905+
- defaultPrevented (_readonly boolean_): `true` if any previously called leave handlers called `preventDefault`.
906+
- retry (_function_, _force?: boolean_ ): call to retry the same navigation, perhaps after confirming with the user. Pass `true` to skip running the leave handlers again (i.e. force navigate without confirming).
906907

907908
Example usage:
908909

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,23 @@
3737
"pretty": "prettier --write \"{src,test}/**/*.{ts,tsx}\""
3838
},
3939
"devDependencies": {
40-
"@babel/core": "^7.23.9",
41-
"@babel/preset-typescript": "^7.23.3",
42-
"@changesets/cli": "^2.27.1",
40+
"@babel/core": "^7.26.0",
41+
"@babel/preset-typescript": "^7.26.0",
42+
"@changesets/cli": "^2.27.10",
4343
"@rollup/plugin-babel": "6.0.4",
44-
"@rollup/plugin-node-resolve": "15.2.3",
44+
"@rollup/plugin-node-resolve": "15.3.0",
4545
"@rollup/plugin-terser": "0.4.4",
46-
"@types/jest": "^29.5.11",
47-
"@types/node": "^20.11.14",
48-
"babel-preset-solid": "^1.9.2",
49-
"jsdom": "^24.0.0",
50-
"prettier": "^2.7.0",
51-
"rollup": "^4.9.6",
52-
"solid-js": "^1.9.2",
53-
"typescript": "^5.3.3",
54-
"vite": "^5.4.8",
55-
"vite-plugin-solid": "^2.9.1",
56-
"vitest": "^2.1.2"
46+
"@types/jest": "^29.5.14",
47+
"@types/node": "^22.10.0",
48+
"babel-preset-solid": "^1.9.3",
49+
"jsdom": "^25.0.1",
50+
"prettier": "^3.4.1",
51+
"rollup": "^4.27.4",
52+
"solid-js": "^1.9.3",
53+
"typescript": "^5.7.2",
54+
"vite": "^6.0.0",
55+
"vite-plugin-solid": "^2.11.0",
56+
"vitest": "^2.1.6"
5757
},
5858
"peerDependencies": {
5959
"solid-js": "^1.8.6"

0 commit comments

Comments
 (0)