Skip to content

Commit 605be41

Browse files
authoredMar 14, 2025··
fix(sanity): use minimum supported API version for dataset import (#8945)
1 parent a3d22f1 commit 605be41

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎packages/sanity/src/_internal/cli/commands/dataset/importDatasetCommand.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ function parseFlags(rawFlags: ImportFlags): ParsedImportFlags {
103103
}
104104
}
105105

106+
// The minimum supported API version, providing the ability to handle version documents.
107+
const MINIMUM_API_VERSION = '2025-02-19'
108+
106109
const importDatasetCommand: CliCommandDefinition = {
107110
name: 'import',
108111
group: 'dataset',
@@ -161,7 +164,10 @@ const importDatasetCommand: CliCommandDefinition = {
161164
}
162165
}
163166

164-
const importClient = client.clone().config({dataset: targetDataset})
167+
const importClient = client.clone().config({
168+
apiVersion: MINIMUM_API_VERSION,
169+
dataset: targetDataset,
170+
})
165171

166172
// Print information about what projectId and dataset it is being imported to
167173
const {projectId, dataset} = importClient.config()

0 commit comments

Comments
 (0)
Please sign in to comment.