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
4 changes: 2 additions & 2 deletions __fixtures__/esm-test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"devDependencies": {
"@cedarjs/vite": "0.10.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.22",
"postcss": "^8.5.6",
"postcss-loader": "^8.2.0",
Expand Down
4 changes: 2 additions & 2 deletions __fixtures__/rsc-caching/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"devDependencies": {
"@cedarjs/vite": "9.0.0-canary.620",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/test-project-rsa/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@cedarjs/vite": "9.0.0-canary.620",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/test-project-rsc-kitchen-sink/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"devDependencies": {
"@cedarjs/vite": "9.0.0-canary.620",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions __fixtures__/test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"devDependencies": {
"@cedarjs/vite": "0.10.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.22",
"postcss": "^8.5.6",
"postcss-loader": "^8.2.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@docusaurus/module-type-aliases": "3.9.2",
"@docusaurus/tsconfig": "3.9.2",
"@docusaurus/types": "3.9.2",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"typescript": "5.9.3"
},
"packageManager": "[email protected]"
Expand Down
28 changes: 10 additions & 18 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4218,13 +4218,6 @@ __metadata:
languageName: node
linkType: hard

"@types/prop-types@npm:*":
version: 15.7.4
resolution: "@types/prop-types@npm:15.7.4"
checksum: 10c0/014bb826592fab01499931259969aafc21d5a8ff4ece3e3fb8e2b5186bed17656f7dcdccf9a98c27fee74d7d0697aa3f53ea971a72679597f0ca0c3d5ca585d3
languageName: node
linkType: hard

"@types/qs@npm:*":
version: 6.9.7
resolution: "@types/qs@npm:6.9.7"
Expand Down Expand Up @@ -4271,13 +4264,12 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:^18.2.55":
version: 18.3.18
resolution: "@types/react@npm:18.3.18"
"@types/react@npm:*, @types/react@npm:^19.2.7":
version: 19.2.7
resolution: "@types/react@npm:19.2.7"
dependencies:
"@types/prop-types": "npm:*"
csstype: "npm:^3.0.2"
checksum: 10c0/8fb2b00672072135d0858dc9db07873ea107cc238b6228aaa2a9afd1ef7a64a7074078250db38afbeb19064be8ea6af5eac32d404efdd5f45e093cc4829d87f8
csstype: "npm:^3.2.2"
checksum: 10c0/a7b75f1f9fcb34badd6f84098be5e35a0aeca614bc91f93d2698664c0b2ba5ad128422bd470ada598238cebe4f9e604a752aead7dc6f5a92261d0c7f9b27cfd1
languageName: node
linkType: hard

Expand Down Expand Up @@ -6025,10 +6017,10 @@ __metadata:
languageName: node
linkType: hard

"csstype@npm:^3.0.2":
version: 3.0.11
resolution: "csstype@npm:3.0.11"
checksum: 10c0/20a89e20978ce0a9e0e400582fcd4e6ca95fe11a07b2941695218704e51b428558c3016df8c9e4a9e2d7626ec8e0f7cc10126d67b32fc770d4daf7fae9c81b62
"csstype@npm:^3.2.2":
version: 3.2.3
resolution: "csstype@npm:3.2.3"
checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce
languageName: node
linkType: hard

Expand Down Expand Up @@ -6264,7 +6256,7 @@ __metadata:
"@mdx-js/react": "npm:3.0.1"
"@signalwire/docusaurus-plugin-llms-txt": "npm:2.0.0-alpha.7"
"@signalwire/docusaurus-theme-llms-txt": "npm:1.0.0-alpha.9"
"@types/react": "npm:^18.2.55"
"@types/react": "npm:^19.2.7"
clsx: "npm:2.1.1"
prism-react-renderer: "npm:2.4.1"
react: "npm:18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/auth0/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"devDependencies": {
"@auth0/auth0-spa-js": "2.10.0",
"@cedarjs/framework-tools": "workspace:*",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@azure/msal-browser": "2.39.0",
"@cedarjs/framework-tools": "workspace:*",
"@types/netlify-identity-widget": "1.9.7",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/clerk/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@cedarjs/framework-tools": "workspace:*",
"@clerk/clerk-react": "5.57.1",
"@clerk/types": "4.101.6",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/dbAuth/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@arethetypeswrong/cli": "0.18.2",
"@cedarjs/framework-tools": "workspace:*",
"@simplewebauthn/types": "9.0.1",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/firebase/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"devDependencies": {
"@cedarjs/framework-tools": "workspace:*",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"firebase": "10.14.1",
"publint": "0.3.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/netlify/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"devDependencies": {
"@cedarjs/framework-tools": "workspace:*",
"@types/netlify-identity-widget": "1.9.7",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/supabase/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@cedarjs/framework-tools": "workspace:*",
"@supabase/ssr": "0.5.1",
"@supabase/supabase-js": "2.86.2",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/supertokens/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"devDependencies": {
"@cedarjs/framework-tools": "workspace:*",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"concurrently": "8.2.2",
"publint": "0.3.15",
"react": "19.2.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-cedar-app/templates/esm-js/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@cedarjs/vite": "0.10.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-cedar-app/templates/esm-ts/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@cedarjs/vite": "0.10.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-cedar-app/templates/js/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@cedarjs/vite": "0.10.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-cedar-app/templates/ts/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@cedarjs/vite": "0.10.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19"
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3"
}
}
4 changes: 2 additions & 2 deletions packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@testing-library/react": "14.3.1",
"@testing-library/user-event": "14.5.2",
"@types/pascalcase": "1.0.3",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"concurrently": "8.2.2",
"nodemon": "3.1.11",
"publint": "0.3.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/prerender/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"devDependencies": {
"@cedarjs/framework-tools": "workspace:*",
"@types/mime-types": "2.1.4",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"babel-plugin-tester": "11.0.4",
"concurrently": "8.2.2",
"publint": "0.3.15",
Expand Down
4 changes: 2 additions & 2 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"@babel/core": "^7.26.10",
"@cedarjs/framework-tools": "workspace:*",
"@testing-library/jest-dom": "6.5.0",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"concurrently": "8.2.2",
"publint": "0.3.15",
"tstyche": "3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/router/src/Route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export type InternalRouteProps = Partial<
* it is actually never rendered. All the page loading logic happens in active-route-loader
* and all the validation happens within utility functions called from the Router
*/
export function Route(props: RouteProps): JSX.Element
export function Route(props: RedirectRouteProps): JSX.Element
export function Route(props: NotFoundRouteProps): JSX.Element
export function Route(props: RouteProps): React.JSX.Element
export function Route(props: RedirectRouteProps): React.JSX.Element
export function Route(props: NotFoundRouteProps): React.JSX.Element
export function Route(
_props: RouteProps | RedirectRouteProps | NotFoundRouteProps,
) {
Expand Down
16 changes: 12 additions & 4 deletions packages/router/src/Set.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,20 @@ export function PrivateSet<WrapperProps>(props: PrivateSetProps<WrapperProps>) {

export const isSetNode = (
node: ReactNode,
): node is ReactElement<SetProps<any>> => {
): node is ReactElement<SetProps<unknown>> => {
if (!React.isValidElement(node)) {
return false
}

// https://github.com/facebook/react/issues/31824
const element: ReactElement<any> = node

return (
React.isValidElement(node) &&
(node.type === Set || node.type === PrivateSet || node.type === Private) &&
(element.type === Set ||
element.type === PrivateSet ||
element.type === Private) &&
// Don't even bother including Sets without children. They're useless.
node.props.children
!!element.props.children
)
}

Expand Down
3 changes: 2 additions & 1 deletion packages/router/src/analyzeRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
isValidRoute,
} from './route-validators.js'
import { isPrivateNode, isPrivateSetNode, isSetNode } from './Set.js'
import type { WrapperType } from './Set.js'
import {
matchPath,
replaceParams,
Expand Down Expand Up @@ -190,7 +191,7 @@ export function analyzeRoutes(
...otherPropsFromCurrentSet
} = node.props

let wrapperComponentsArray = []
let wrapperComponentsArray: WrapperType<unknown>[] = []
if (wrapFromCurrentSet) {
wrapperComponentsArray = Array.isArray(wrapFromCurrentSet)
? wrapFromCurrentSet
Expand Down
4 changes: 3 additions & 1 deletion packages/router/src/page.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type React from 'react'

export interface Spec {
name: string
prerenderLoader: (name?: string) => { default: React.ComponentType<unknown> }
Expand Down Expand Up @@ -49,4 +51,4 @@ export function normalizePage(
export type PageType =
| Spec
| React.ComponentType<any>
| ((props: any) => JSX.Element)
| ((props: any) => React.JSX.Element)
9 changes: 7 additions & 2 deletions packages/router/src/react-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ export function flattenAll(children: ReactNode): ReactNode[] {
const childrenArray = Children.toArray(children)

return childrenArray.flatMap((child) => {
if (isValidElement(child) && child.props.children) {
return [child, ...flattenAll(child.props.children)]
if (isValidElement(child)) {
// https://github.com/facebook/react/issues/31824
const childElement: React.ReactElement<any> = child

if (childElement?.props.children) {
return [child, ...flattenAll(childElement.props.children)]
}
}

return [child]
Expand Down
6 changes: 3 additions & 3 deletions packages/router/src/skipNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ interface ForwardRefComponent<
*/
<As = IntrinsicElementString>(
props: As extends ''
? { as: keyof JSX.IntrinsicElements }
? { as: keyof React.JSX.IntrinsicElements }
: As extends React.ComponentType<infer P>
? Merge<P, OwnProps & { as: As }>
: As extends keyof JSX.IntrinsicElements
? Merge<JSX.IntrinsicElements[As], OwnProps & { as: As }>
: As extends keyof React.JSX.IntrinsicElements
? Merge<React.JSX.IntrinsicElements[As], OwnProps & { as: As }>
: never,
): React.ReactElement | null
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@types/busboy": "^1",
"@types/express": "4",
"@types/fs-extra": "11.0.4",
"@types/react": "^18.2.55",
"@types/react": "^19.2.7",
"@types/ws": "^8",
"@types/yargs-parser": "21.0.3",
"concurrently": "8.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/streaming/streamHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export async function reactRenderToStreamResponse(
// Having the Document (and bootstrap scripts) here allows client to recover from errors in the shell
// To test this, throw an error in the App on the server only
const fallbackShell = await renderToReadableStream(
FallbackDocument({
await FallbackDocument({
children: null,
css: cssLinks,
meta: metaTags,
Expand Down
4 changes: 2 additions & 2 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
"@testing-library/jest-dom": "6.5.0",
"@testing-library/react": "14.3.1",
"@types/apollo-upload-client": "^18",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"concurrently": "8.2.2",
"nodemon": "3.1.11",
"publint": "0.3.15",
Expand Down
Loading
Loading