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
24 changes: 24 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 80,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"sortPackageJson": false,
"ignorePatterns": [
"**/worker-configuration.d.ts",
"**/prisma/migrations/migration_lock.toml",
"examples/solid/start-basic-netlify/netlify.toml"
],
"overrides": [
{
"files": ["examples/react/start-workos/**/*.{js,jsx,ts,tsx,d.ts}"],
"options": {
"printWidth": 120,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
}
]
}
2 changes: 1 addition & 1 deletion e2e/react-router/view-transitions/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const router = createRouter({
defaultPreload: 'intent',
defaultStaleTime: 5000,
scrollRestoration: true,
/*
/*
Using defaultViewTransition would prevent the need to
manually add `viewTransition: true` to every navigation.
Expand Down
2 changes: 1 addition & 1 deletion e2e/solid-router/view-transitions/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const router = createRouter({
defaultPreload: 'intent',
defaultStaleTime: 5000,
scrollRestoration: true,
/*
/*
Using defaultViewTransition would prevent the need to
manually add `viewTransition: true` to every navigation.

Expand Down
12 changes: 5 additions & 7 deletions examples/react/kitchen-sink-file-based/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ function RootComponent() {
<div key={to}>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
className={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ function RootComponent() {
<div key={to}>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
className={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
12 changes: 5 additions & 7 deletions examples/react/kitchen-sink-react-query/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,11 @@ function RootComponent() {
<div key={to}>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
className={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
12 changes: 5 additions & 7 deletions examples/react/kitchen-sink/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,11 @@ function RootComponent() {
<div key={to}>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
className={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
2 changes: 1 addition & 1 deletion examples/react/view-transitions/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const router = createRouter({
defaultPreload: 'intent',
defaultStaleTime: 5000,
scrollRestoration: true,
/*
/*
Using defaultViewTransition would prevent the need to
manually add `viewTransition: true` to every navigation.
Expand Down
12 changes: 5 additions & 7 deletions examples/react/with-trpc-react-query/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ function RootComponent() {
<div key={to}>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
className={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
12 changes: 5 additions & 7 deletions examples/react/with-trpc/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ function RootComponent() {
<div key={to}>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
className={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
12 changes: 5 additions & 7 deletions examples/solid/kitchen-sink-file-based/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ function RootComponent() {
<div>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
class={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ function RootComponent() {
<div>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
class={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
12 changes: 5 additions & 7 deletions examples/solid/kitchen-sink-solid-query/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,11 @@ function RootComponent() {
<div>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
class={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
12 changes: 5 additions & 7 deletions examples/solid/kitchen-sink/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ function RootComponent() {
<div>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
class={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
2 changes: 1 addition & 1 deletion examples/solid/view-transitions/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const router = createRouter({
defaultPreload: 'intent',
defaultStaleTime: 5000,
scrollRestoration: true,
/*
/*
Using defaultViewTransition would prevent the need to
manually add `viewTransition: true` to every navigation.

Expand Down
12 changes: 5 additions & 7 deletions examples/solid/with-trpc/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ function RootComponent() {
<div>
<Link
to={to}
activeOptions={
{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}
}
activeOptions={{
// If the route points to the root of it's parent,
// make sure it's only active if it's exact
// exact: to === '.',
}}
preload="intent"
class={`block py-2 px-3 text-blue-700`}
// Make "active" links bold
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:all": "nx run-many --target=build --exclude=examples/** --exclude=e2e/**",
"watch": "pnpm run build:all && nx watch --all -- pnpm run build:all",
"dev": "pnpm run watch",
"format": "prettier --experimental-cli --ignore-unknown '**/*' --write",
"format": "oxfmt",
"cipublish": "node scripts/publish.js",
"gpt-generate": "node gpt/generate.js",
"set-ts-version": "node scripts/set-ts-version.js",
Expand Down Expand Up @@ -58,7 +58,7 @@
"jsdom": "^25.0.1",
"markdown-link-extractor": "^4.0.3",
"nx": "22.5.1",
"prettier": "^3.8.0",
"oxfmt": "^0.35.0",
"publint": "^0.3.16",
"react": "^19.2.3",
"react-dom": "^19.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/src/fileRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function createFileRoute<
}).createRoute
}

/**
/**
@deprecated It's no longer recommended to use the `FileRoute` class directly.
Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/tests/route.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('createRoute has the same hooks as getRouteApi', () => {
)
})

/* disabled until HMR bug is fixed
/* disabled until HMR bug is fixed
describe('throws invariant exception when trying to access properties before `createRouter` completed', () => {
function setup() {
const rootRoute = createRootRoute()
Expand Down
3 changes: 2 additions & 1 deletion packages/router-core/src/new-process-route-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ type RouteLike = {
}
} &
// router tree
(| { fullPath: string; from?: never } // full path from the root
(
| { fullPath: string; from?: never } // full path from the root
// flat route masks list
| { fullPath?: never; from: string } // full path from the root
)
Expand Down
8 changes: 4 additions & 4 deletions packages/router-core/src/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ export type ParamsOptions<in out TPath extends string, in out TParams> = {
stringify?: StringifyParamsFn<TPath, TParams>
}

/**
/**
@deprecated Use params.parse instead
*/
parseParams?: ParseParamsFn<TPath, TParams>

/**
/**
@deprecated Use params.stringify instead
*/
stringifyParams?: StringifyParamsFn<TPath, TParams>
Expand Down Expand Up @@ -1267,13 +1267,13 @@ export interface UpdatableRouteOptions<
>
>
}
/**
/**
@deprecated Use search.middlewares instead
*/
preSearchFilters?: Array<
SearchFilter<ResolveFullSearchSchema<TParentRoute, TSearchValidator>>
>
/**
/**
@deprecated Use search.middlewares instead
*/
postSearchFilters?: Array<
Expand Down
Loading
Loading