@sanity/cli 3.64.0 → 3.64.2-react-compiler.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_chunks-cjs/cli.js +1 -1
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/lib/index.d.mts +27 -0
- package/lib/index.d.ts +27 -0
- package/package.json +7 -7
- package/src/actions/init-project/initProject.ts +1 -1
- package/src/types.ts +31 -0
package/lib/index.d.mts
CHANGED
@@ -101,6 +101,12 @@ export declare interface CliConfig {
|
|
101
101
|
* Defaults to `false`
|
102
102
|
*/
|
103
103
|
reactStrictMode?: boolean
|
104
|
+
/**
|
105
|
+
* The React Compiler is currently in beta, and is disabled by default.
|
106
|
+
* @see https://react.dev/learn/react-compiler
|
107
|
+
* @beta
|
108
|
+
*/
|
109
|
+
reactCompiler?: ReactCompilerConfig
|
104
110
|
server?: {
|
105
111
|
hostname?: string
|
106
112
|
port?: number
|
@@ -366,6 +372,27 @@ export declare interface PackageJson {
|
|
366
372
|
|
367
373
|
declare type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'manual'
|
368
374
|
|
375
|
+
/**
|
376
|
+
* Until these types are on npm: https://github.com/facebook/react/blob/0bc30748730063e561d87a24a4617526fdd38349/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L39-L122
|
377
|
+
* @beta
|
378
|
+
*/
|
379
|
+
export declare interface ReactCompilerConfig {
|
380
|
+
/**
|
381
|
+
* @see https://react.dev/learn/react-compiler#existing-projects
|
382
|
+
*/
|
383
|
+
sources?: Array<string> | ((filename: string) => boolean) | null
|
384
|
+
/**
|
385
|
+
* The minimum major version of React that the compiler should emit code for. If the target is 19
|
386
|
+
* or higher, the compiler emits direct imports of React runtime APIs needed by the compiler. On
|
387
|
+
* versions prior to 19, an extra runtime package react-compiler-runtime is necessary to provide
|
388
|
+
* a userspace approximation of runtime APIs.
|
389
|
+
* @see https://react.dev/learn/react-compiler#using-react-compiler-with-react-17-or-18
|
390
|
+
*/
|
391
|
+
target: '17' | '18' | '19'
|
392
|
+
panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE'
|
393
|
+
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all'
|
394
|
+
}
|
395
|
+
|
369
396
|
export declare interface ResolvedCliCommand {
|
370
397
|
command: CliCommandDefinition | CliCommandGroupDefinition
|
371
398
|
commandName: string
|
package/lib/index.d.ts
CHANGED
@@ -101,6 +101,12 @@ export declare interface CliConfig {
|
|
101
101
|
* Defaults to `false`
|
102
102
|
*/
|
103
103
|
reactStrictMode?: boolean
|
104
|
+
/**
|
105
|
+
* The React Compiler is currently in beta, and is disabled by default.
|
106
|
+
* @see https://react.dev/learn/react-compiler
|
107
|
+
* @beta
|
108
|
+
*/
|
109
|
+
reactCompiler?: ReactCompilerConfig
|
104
110
|
server?: {
|
105
111
|
hostname?: string
|
106
112
|
port?: number
|
@@ -366,6 +372,27 @@ export declare interface PackageJson {
|
|
366
372
|
|
367
373
|
declare type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'manual'
|
368
374
|
|
375
|
+
/**
|
376
|
+
* Until these types are on npm: https://github.com/facebook/react/blob/0bc30748730063e561d87a24a4617526fdd38349/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L39-L122
|
377
|
+
* @beta
|
378
|
+
*/
|
379
|
+
export declare interface ReactCompilerConfig {
|
380
|
+
/**
|
381
|
+
* @see https://react.dev/learn/react-compiler#existing-projects
|
382
|
+
*/
|
383
|
+
sources?: Array<string> | ((filename: string) => boolean) | null
|
384
|
+
/**
|
385
|
+
* The minimum major version of React that the compiler should emit code for. If the target is 19
|
386
|
+
* or higher, the compiler emits direct imports of React runtime APIs needed by the compiler. On
|
387
|
+
* versions prior to 19, an extra runtime package react-compiler-runtime is necessary to provide
|
388
|
+
* a userspace approximation of runtime APIs.
|
389
|
+
* @see https://react.dev/learn/react-compiler#using-react-compiler-with-react-17-or-18
|
390
|
+
*/
|
391
|
+
target: '17' | '18' | '19'
|
392
|
+
panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE'
|
393
|
+
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all'
|
394
|
+
}
|
395
|
+
|
369
396
|
export declare interface ResolvedCliCommand {
|
370
397
|
command: CliCommandDefinition | CliCommandGroupDefinition
|
371
398
|
commandName: string
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sanity/cli",
|
3
|
-
"version": "3.64.0",
|
3
|
+
"version": "3.64.2-react-compiler.0+e07c8035ed",
|
4
4
|
"description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
|
5
5
|
"keywords": [
|
6
6
|
"sanity",
|
@@ -58,9 +58,9 @@
|
|
58
58
|
"dependencies": {
|
59
59
|
"@babel/traverse": "^7.23.5",
|
60
60
|
"@sanity/client": "^6.22.4",
|
61
|
-
"@sanity/codegen": "3.64.0",
|
61
|
+
"@sanity/codegen": "3.64.2-react-compiler.0+e07c8035ed",
|
62
62
|
"@sanity/telemetry": "^0.7.7",
|
63
|
-
"@sanity/util": "3.64.0",
|
63
|
+
"@sanity/util": "3.64.2-react-compiler.0+e07c8035ed",
|
64
64
|
"chalk": "^4.1.2",
|
65
65
|
"debug": "^4.3.4",
|
66
66
|
"decompress": "^4.2.0",
|
@@ -75,13 +75,13 @@
|
|
75
75
|
"validate-npm-package-name": "^3.0.0"
|
76
76
|
},
|
77
77
|
"devDependencies": {
|
78
|
-
"@repo/package.config": "3.64.
|
79
|
-
"@repo/test-config": "3.64.
|
78
|
+
"@repo/package.config": "3.64.1",
|
79
|
+
"@repo/test-config": "3.64.1",
|
80
80
|
"@rexxars/gitconfiglocal": "^3.0.1",
|
81
81
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
82
82
|
"@sanity/eslint-config-studio": "^4.0.0",
|
83
83
|
"@sanity/generate-help-url": "^3.0.0",
|
84
|
-
"@sanity/types": "3.64.0",
|
84
|
+
"@sanity/types": "3.64.2-react-compiler.0+e07c8035ed",
|
85
85
|
"@types/babel__traverse": "^7.20.5",
|
86
86
|
"@types/configstore": "^5.0.1",
|
87
87
|
"@types/cpx": "^1.5.2",
|
@@ -135,5 +135,5 @@
|
|
135
135
|
"engines": {
|
136
136
|
"node": ">=18"
|
137
137
|
},
|
138
|
-
"gitHead": "
|
138
|
+
"gitHead": "e07c8035ed8df80af3a8f2f4a3d6aff7321e7283"
|
139
139
|
}
|
@@ -524,7 +524,7 @@ export default async function initSanity(
|
|
524
524
|
}
|
525
525
|
|
526
526
|
if (chosen === 'npm') {
|
527
|
-
await execa('npm', ['install', 'next-sanity@9'], execOptions)
|
527
|
+
await execa('npm', ['install', '--legacy-peer-deps', 'next-sanity@9'], execOptions)
|
528
528
|
} else if (chosen === 'yarn') {
|
529
529
|
await execa('npx', ['install-peerdeps', '--yarn', 'next-sanity@9'], execOptions)
|
530
530
|
} else if (chosen === 'pnpm') {
|
package/src/types.ts
CHANGED
@@ -286,6 +286,30 @@ export interface GraphQLAPIConfig {
|
|
286
286
|
filterSuffix?: string
|
287
287
|
}
|
288
288
|
|
289
|
+
/**
|
290
|
+
* Until these types are on npm: https://github.com/facebook/react/blob/0bc30748730063e561d87a24a4617526fdd38349/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L39-L122
|
291
|
+
* @beta
|
292
|
+
*/
|
293
|
+
export interface ReactCompilerConfig {
|
294
|
+
/**
|
295
|
+
* @see https://react.dev/learn/react-compiler#existing-projects
|
296
|
+
*/
|
297
|
+
sources?: Array<string> | ((filename: string) => boolean) | null
|
298
|
+
|
299
|
+
/**
|
300
|
+
* The minimum major version of React that the compiler should emit code for. If the target is 19
|
301
|
+
* or higher, the compiler emits direct imports of React runtime APIs needed by the compiler. On
|
302
|
+
* versions prior to 19, an extra runtime package react-compiler-runtime is necessary to provide
|
303
|
+
* a userspace approximation of runtime APIs.
|
304
|
+
* @see https://react.dev/learn/react-compiler#using-react-compiler-with-react-17-or-18
|
305
|
+
*/
|
306
|
+
target: '17' | '18' | '19'
|
307
|
+
|
308
|
+
panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE'
|
309
|
+
|
310
|
+
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all'
|
311
|
+
}
|
312
|
+
|
289
313
|
export interface CliConfig {
|
290
314
|
api?: CliApiConfig
|
291
315
|
|
@@ -301,6 +325,13 @@ export interface CliConfig {
|
|
301
325
|
*/
|
302
326
|
reactStrictMode?: boolean
|
303
327
|
|
328
|
+
/**
|
329
|
+
* The React Compiler is currently in beta, and is disabled by default.
|
330
|
+
* @see https://react.dev/learn/react-compiler
|
331
|
+
* @beta
|
332
|
+
*/
|
333
|
+
reactCompiler?: ReactCompilerConfig
|
334
|
+
|
304
335
|
server?: {
|
305
336
|
hostname?: string
|
306
337
|
port?: number
|