Skip to content

Commit df926a4

Browse files
authored
Update Sanity example deps and prepare for next v15 (#66158)
We've been testing React v19 and we're mostly ready. Since we have a number of upstream packages we have to update peer deps from: ```json { "peerDependencies": { "react": "^18.3", "react-dom": "^18.3" } } ``` to: ```json { "peerDependencies": { "react": "^18.3 || ^19", "react-dom": "^18.3 || ^19" } } ``` We are choosing to change the `next` semver from `latest` to `^14.2.3`. This is to avoid the template from breaking after v15 becomes `latest`, since package manager default behaviour doesn't handle conflicting peer dep ranges for react very well 🙌
1 parent 86bd817 commit df926a4

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

examples/cms-sanity/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
},
1515
"dependencies": {
1616
"@sanity/assist": "^3.0.4",
17-
"@sanity/icons": "^2.11.8",
17+
"@sanity/icons": "^3.0.0",
1818
"@sanity/image-url": "^1.0.2",
19-
"@sanity/preview-url-secret": "^1.6.13",
20-
"@sanity/vision": "^3.42.1",
19+
"@sanity/preview-url-secret": "^1.6.7",
20+
"@sanity/vision": "^3.44.0",
2121
"@tailwindcss/typography": "^0.5.13",
22-
"@types/node": "^20.12.12",
23-
"@types/react": "^18.3.2",
22+
"@types/node": "^20.14.1",
23+
"@types/react": "^18.3.3",
2424
"@types/react-dom": "^18.3.0",
25-
"@vercel/speed-insights": "^1.0.10",
25+
"@vercel/speed-insights": "^1.0.11",
2626
"autoprefixer": "^10.4.19",
2727
"date-fns": "^3.6.0",
28-
"next": "latest",
29-
"next-sanity": "^9.0.18",
28+
"next": "^14.2.3",
29+
"next-sanity": "^9.3.10",
3030
"postcss": "^8.4.38",
3131
"react": "^18.3.1",
3232
"react-dom": "^18.3.1",
33-
"sanity": "^3.42.1",
33+
"sanity": "^3.44.0",
3434
"sanity-plugin-asset-source-unsplash": "^3.0.1",
3535
"server-only": "^0.0.1",
3636
"styled-components": "^6.1.11",
@@ -39,6 +39,6 @@
3939
},
4040
"devDependencies": {
4141
"eslint": "^8.57.0",
42-
"eslint-config-next": "latest"
42+
"eslint-config-next": "^14.2.3"
4343
}
4444
}

examples/cms-sanity/sanity.types.ts

-5
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ export type SanityAssistSchemaTypeField = {
393393
>;
394394
};
395395
export declare const internalGroqTypeReferenceTo: unique symbol;
396-
397396
// Source: ./sanity/lib/queries.ts
398397
// Variable: settingsQuery
399398
// Query: *[_type == "settings"][0]
@@ -454,7 +453,6 @@ export type SettingsQueryResult = {
454453
_type: "image";
455454
};
456455
} | null;
457-
458456
// Variable: heroQuery
459457
// Query: *[_type == "post" && defined(slug.current)] | order(date desc, _updatedAt desc) [0] { content, _id, "status": select(_originalId in path("drafts.**") => "draft", "published"), "title": coalesce(title, "Untitled"), "slug": slug.current, excerpt, coverImage, "date": coalesce(date, _updatedAt), "author": author->{"name": coalesce(name, "Anonymous"), picture},}
460458
export type HeroQueryResult = {
@@ -510,7 +508,6 @@ export type HeroQueryResult = {
510508
} | null;
511509
} | null;
512510
} | null;
513-
514511
// Variable: moreStoriesQuery
515512
// Query: *[_type == "post" && _id != $skip && defined(slug.current)] | order(date desc, _updatedAt desc) [0...$limit] { _id, "status": select(_originalId in path("drafts.**") => "draft", "published"), "title": coalesce(title, "Untitled"), "slug": slug.current, excerpt, coverImage, "date": coalesce(date, _updatedAt), "author": author->{"name": coalesce(name, "Anonymous"), picture},}
516513
export type MoreStoriesQueryResult = Array<{
@@ -548,7 +545,6 @@ export type MoreStoriesQueryResult = Array<{
548545
} | null;
549546
} | null;
550547
}>;
551-
552548
// Variable: postQuery
553549
// Query: *[_type == "post" && slug.current == $slug] [0] { content, _id, "status": select(_originalId in path("drafts.**") => "draft", "published"), "title": coalesce(title, "Untitled"), "slug": slug.current, excerpt, coverImage, "date": coalesce(date, _updatedAt), "author": author->{"name": coalesce(name, "Anonymous"), picture},}
554550
export type PostQueryResult = {
@@ -604,7 +600,6 @@ export type PostQueryResult = {
604600
} | null;
605601
} | null;
606602
} | null;
607-
608603
// Source: ./app/(blog)/posts/[slug]/page.tsx
609604
// Variable: postSlugs
610605
// Query: *[_type == "post"]{slug}

0 commit comments

Comments
 (0)