Skip to content

Commit 45aa735

Browse files
committed
fix(sanity): detectedFramework CLI context type
1 parent 4e2206f commit 45aa735

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/@sanity/cli/src/actions/init-project/initProject.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import path from 'node:path'
44

55
import {type DatasetAclMode, type SanityProject} from '@sanity/client'
66
import {type Framework} from '@vercel/frameworks'
7+
import {type detectFrameworkRecord} from '@vercel/fs-detectors'
78
import dotenv from 'dotenv'
89
import execa, {type CommonOptions} from 'execa'
910
import {deburr, noop} from 'lodash'
@@ -112,7 +113,9 @@ export interface ProjectOrganization {
112113
// eslint-disable-next-line max-statements, complexity
113114
export default async function initSanity(
114115
args: CliCommandArguments<InitFlags>,
115-
context: CliCommandContext & {detectedFramework: Framework | null},
116+
context: CliCommandContext & {
117+
detectedFramework: Awaited<ReturnType<typeof detectFrameworkRecord>>
118+
},
116119
): Promise<void> {
117120
const {
118121
output,
@@ -336,7 +339,6 @@ export default async function initSanity(
336339
const isUsingReact19 = semver.coerce(reactVersion)?.major === 19
337340
if (
338341
detectedFramework?.slug === 'nextjs' &&
339-
// @ts-expect-error - Detected version is not typed into Framework interface
340342
detectedFramework?.detectedVersion?.startsWith('15') &&
341343
isUsingReact19
342344
) {

0 commit comments

Comments
 (0)