Skip to content

Commit e848667

Browse files
authored
Update deps in repo and support React 19 (#1404)
1 parent aac99fb commit e848667

File tree

161 files changed

+4416
-3576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+4416
-3576
lines changed

.changeset/tasty-swans-sniff.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@keystatic/templates-nextjs': patch
3+
'@keystatic/templates-astro': patch
4+
'@keystatic/templates-remix': patch
5+
---
6+
7+
Update template to React 19

.changeset/warm-suits-arrive.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@keystatic/core': patch
3+
'@keystar/ui': patch
4+
'@keystatic/astro': patch
5+
'@keystatic/remix': patch
6+
'@keystatic/next': patch
7+
---
8+
9+
Allow React 19 in peerDependencies

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ module.exports = {
119119
},
120120
},
121121
],
122+
'no-restricted-syntax': [
123+
ERROR,
124+
{
125+
selector: "TSQualifiedName[left.name='React']",
126+
message:
127+
"Avoid using the global React type, import the specific type you want from 'react'",
128+
},
129+
],
122130
'react/no-unknown-property': OFF,
123131
'react-compiler/react-compiler': [
124132
ERROR,

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/hydrogen
1+
22.13.1

babel.config.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
"@babel/preset-typescript",
1818
["@babel/preset-react", { "runtime": "automatic" }]
1919
],
20-
"plugins": [
21-
"@babel/plugin-transform-runtime",
22-
["@babel/plugin-transform-private-property-in-object", { "loose": true }]
23-
],
20+
"plugins": ["@babel/plugin-transform-runtime"],
2421
"overrides": [
2522
{
2623
"test": ["packages/keystatic/src/**/*", "design-system/pkg/src/**/*"],

design-system/docs/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.13.1

design-system/docs/app/(site)/[[...slug]]/page.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ export async function generateStaticParams() {
1818

1919
export const dynamicParams = false;
2020

21-
export async function generateMetadata({
22-
params,
23-
}: {
24-
params: { slug?: string[] };
21+
export async function generateMetadata(props: {
22+
params: Promise<{ slug?: string[] }>;
2523
}): Promise<Metadata> {
24+
const params = await props.params;
2625
const slug = (params.slug ?? ['index']).join('/');
2726
let entry = await reader.collections.otherDocs.read(slug);
2827
if (!entry && slug !== 'index') {
@@ -32,8 +31,10 @@ export async function generateMetadata({
3231
return { title: entry.title };
3332
}
3433

35-
export default async function Page(props: { params: { slug?: string[] } }) {
36-
const slug = (props.params.slug ?? ['index']).join('/');
34+
export default async function Page(props: {
35+
params: Promise<{ slug?: string[] }>;
36+
}) {
37+
const slug = ((await props.params).slug ?? ['index']).join('/');
3738
let entry = await reader.collections.otherDocs.read(slug, {
3839
resolveLinkedFiles: true,
3940
});

design-system/docs/app/(site)/colours/colours-inner.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { Heading, Text } from '@keystar/ui/typography';
77

88
import { DocsContent } from '../../../components/content';
99

10+
import type { JSX } from 'react';
11+
1012
export function Colours(): JSX.Element {
1113
const colors = [
1214
{

design-system/docs/app/(site)/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Inter } from 'next/font/google';
55
import { Layout } from '../../components/layout';
66
import { getNavigation } from '../../utils/packages';
77
import { basePageTitle } from './utils';
8+
import { ReactNode } from 'react';
89

910
const inter = Inter({
1011
subsets: ['latin'],
@@ -23,7 +24,7 @@ export const metadata: Metadata = {
2324
export default async function RootLayout({
2425
children,
2526
}: {
26-
children: React.ReactNode;
27+
children: ReactNode;
2728
}) {
2829
return (
2930
<NextRootProvider fontClassName={inter.variable}>

design-system/docs/app/(site)/package/[...slug]/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ export async function generateStaticParams() {
1717

1818
export const dynamicParams = false;
1919

20-
export async function generateMetadata({
21-
params,
22-
}: {
23-
params: { slug: string[] };
20+
export async function generateMetadata(props: {
21+
params: Promise<{ slug: string[] }>;
2422
}): Promise<Metadata> {
23+
const params = await props.params;
2524
const slugWithDocsBitAdded = [
2625
params.slug[0],
2726
'docs',
@@ -36,11 +35,13 @@ export async function generateMetadata({
3635
return { title: entry.title };
3736
}
3837

39-
export default async function Page(props: { params: { slug: string[] } }) {
38+
export default async function Page(props: {
39+
params: Promise<{ slug: string[] }>;
40+
}) {
4041
const slugWithDocsBitAdded = [
41-
props.params.slug[0],
42+
(await props.params).slug[0],
4243
'docs',
43-
...props.params.slug.slice(1),
44+
...(await props.params).slug.slice(1),
4445
];
4546
const slug = slugWithDocsBitAdded.join('/');
4647
let entry = await reader.collections.packageDocs.read(slug, {

0 commit comments

Comments
 (0)