@sanity/pkg-utils 8.0.7 → 8.0.8-canary.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/dist/cli.js +1 -1
- package/dist/index.d.ts +3 -81
- package/package.json +3 -2
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cac } from "cac";
|
|
2
|
-
var version = "8.0.
|
|
2
|
+
var version = "8.0.8-canary.0";
|
|
3
3
|
const cli = cac();
|
|
4
4
|
cli.command("", "Check").alias("check").option("--strict", "Strict mode").option("--tsconfig [tsconfig]", "[string] tsconfig.json").action(async (options) => {
|
|
5
5
|
const { checkAction } = await import("./_chunks-es/checkAction.js");
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PluginItem } from "@babel/core";
|
|
2
2
|
import { OptimizeLodashOptions } from "@optimize-lodash/rollup-plugin";
|
|
3
3
|
import { Options } from "@vanilla-extract/rollup-plugin";
|
|
4
|
+
import { PluginOptions } from "babel-plugin-react-compiler";
|
|
4
5
|
import { NormalizedOutputOptions, Plugin, Plugin as RollupPlugin, TreeshakingOptions } from "rollup";
|
|
5
6
|
import { IExtractorMessagesConfig } from "@microsoft/api-extractor";
|
|
6
7
|
/**
|
|
@@ -134,85 +135,6 @@ interface TSDocCustomTag {
|
|
|
134
135
|
syntaxKind: 'block' | 'modifier';
|
|
135
136
|
allowMultiple?: boolean;
|
|
136
137
|
}
|
|
137
|
-
/**
|
|
138
|
-
* 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
|
|
139
|
-
* @alpha
|
|
140
|
-
*/
|
|
141
|
-
interface ReactCompilerOptions {
|
|
142
|
-
logger?: ReactCompilerLogger | null;
|
|
143
|
-
panicThreshold?: 'ALL_ERRORS' | 'CRITICAL_ERRORS' | 'NONE';
|
|
144
|
-
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all';
|
|
145
|
-
/*
|
|
146
|
-
* If enabled, Forget will import `useMemoCache` from the given module
|
|
147
|
-
* instead of `react/compiler-runtime`.
|
|
148
|
-
*
|
|
149
|
-
* ```
|
|
150
|
-
* // If set to "react-compiler-runtime"
|
|
151
|
-
* import {c as useMemoCache} from 'react-compiler-runtime';
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
runtimeModule?: string | null | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* By default React Compiler will skip compilation of code that suppresses the default
|
|
157
|
-
* React ESLint rules, since this is a strong indication that the code may be breaking React rules
|
|
158
|
-
* in some way.
|
|
159
|
-
*
|
|
160
|
-
* Use eslintSuppressionRules to pass a custom set of rule names: any code which suppresses the
|
|
161
|
-
* provided rules will skip compilation. To disable this feature (never bailout of compilation
|
|
162
|
-
* even if the default ESLint is suppressed), pass an empty array.
|
|
163
|
-
*/
|
|
164
|
-
eslintSuppressionRules?: Array<string> | null | undefined;
|
|
165
|
-
sources?: Array<string> | ((filename: string) => boolean) | null;
|
|
166
|
-
/**
|
|
167
|
-
* The minimum major version of React that the compiler should emit code for. If the target is 19
|
|
168
|
-
* or higher, the compiler emits direct imports of React runtime APIs needed by the compiler. On
|
|
169
|
-
* versions prior to 19, an extra runtime package react-compiler-runtime is necessary to provide
|
|
170
|
-
* a userspace approximation of runtime APIs.
|
|
171
|
-
*/
|
|
172
|
-
target: '17' | '18' | '19';
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* @alpha
|
|
176
|
-
* Represents 'events' that may occur during compilation. Events are only
|
|
177
|
-
* recorded when a logger is set (through the config).
|
|
178
|
-
* These are the different types of events:
|
|
179
|
-
* CompileError:
|
|
180
|
-
* Forget skipped compilation of a function / file due to a known todo,
|
|
181
|
-
* invalid input, or compiler invariant being broken.
|
|
182
|
-
* CompileSuccess:
|
|
183
|
-
* Forget successfully compiled a function.
|
|
184
|
-
* PipelineError:
|
|
185
|
-
* Unexpected errors that occurred during compilation (e.g. failures in
|
|
186
|
-
* babel or other unhandled exceptions).
|
|
187
|
-
*/
|
|
188
|
-
type ReactCompilerLoggerEvent = {
|
|
189
|
-
kind: 'CompileError';
|
|
190
|
-
fnLoc: unknown;
|
|
191
|
-
detail: unknown;
|
|
192
|
-
} | {
|
|
193
|
-
kind: 'CompileDiagnostic';
|
|
194
|
-
fnLoc: unknown;
|
|
195
|
-
detail: unknown;
|
|
196
|
-
} | {
|
|
197
|
-
kind: 'CompileSuccess';
|
|
198
|
-
fnLoc: unknown;
|
|
199
|
-
fnName: string | null;
|
|
200
|
-
memoSlots: number;
|
|
201
|
-
memoBlocks: number;
|
|
202
|
-
memoValues: number;
|
|
203
|
-
prunedMemoBlocks: number;
|
|
204
|
-
prunedMemoValues: number;
|
|
205
|
-
} | {
|
|
206
|
-
kind: 'PipelineError';
|
|
207
|
-
fnLoc: unknown;
|
|
208
|
-
data: string;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* @alpha
|
|
212
|
-
*/
|
|
213
|
-
type ReactCompilerLogger = {
|
|
214
|
-
logEvent: (filename: string | null, event: ReactCompilerLoggerEvent) => void;
|
|
215
|
-
};
|
|
216
138
|
type DtsType = 'api-extractor' | 'rolldown';
|
|
217
139
|
/** @public */
|
|
218
140
|
interface PkgConfigOptions {
|
|
@@ -251,7 +173,7 @@ interface PkgConfigOptions {
|
|
|
251
173
|
* - set `babel.reactCompiler` to `true`
|
|
252
174
|
* - add a `react-compiler` export condition, before any `browser`, `require` or `import` conditions. After any `react-server` and `node` conditions
|
|
253
175
|
* @alpha */
|
|
254
|
-
reactCompilerOptions?:
|
|
176
|
+
reactCompilerOptions?: PluginOptions;
|
|
255
177
|
bundles?: PkgBundle[];
|
|
256
178
|
/** @alpha */
|
|
257
179
|
define?: Record<string, string | number | boolean | undefined | null>;
|
|
@@ -531,4 +453,4 @@ declare function watch(options: {
|
|
|
531
453
|
strict?: boolean;
|
|
532
454
|
tsconfig?: string;
|
|
533
455
|
}): Promise<void>;
|
|
534
|
-
export { DEFAULT_BROWSERSLIST_QUERY, PackageJSON, type PkgBundle, type PkgConfigOptions, type PkgConfigProperty, type PkgConfigPropertyResolver, type PkgExport, type PkgExports, type PkgFormat, type PkgRuleLevel, type PkgRuntime, type PkgTemplate, type PkgTemplateDefinition, type PkgTemplateFile, type PkgTemplateOption, type PkgTemplateResolver, type PkgTemplateStringOption, type
|
|
456
|
+
export { DEFAULT_BROWSERSLIST_QUERY, PackageJSON, type PkgBundle, type PkgConfigOptions, type PkgConfigProperty, type PkgConfigPropertyResolver, type PkgExport, type PkgExports, type PkgFormat, type PkgRuleLevel, type PkgRuntime, type PkgTemplate, type PkgTemplateDefinition, type PkgTemplateFile, type PkgTemplateOption, type PkgTemplateResolver, type PkgTemplateStringOption, type RollupPlugin, type TSDocCustomTag, build, check, createLogger, defineConfig, defineTemplateOption, getExtractMessagesConfig, init, loadConfig, loadPkg, loadPkgWithReporting, parseExports, parseStrictOptions, watch };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.8-canary.0",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"@types/treeify": "^1.0.3",
|
|
126
126
|
"@types/uuid": "^10.0.0",
|
|
127
127
|
"@typescript/native-preview": "7.0.0-dev.20250825.1",
|
|
128
|
+
"babel-plugin-react-compiler": "19.1.0-rc.2",
|
|
128
129
|
"browserslist-to-esbuild": "2.1.1",
|
|
129
130
|
"commitizen": "^4.3.1",
|
|
130
131
|
"cz-conventional-changelog": "^3.3.0",
|
|
@@ -139,7 +140,7 @@
|
|
|
139
140
|
"ts-node": "^10.9.2",
|
|
140
141
|
"typescript": "5.9.2",
|
|
141
142
|
"vitest": "^3.2.4",
|
|
142
|
-
"@sanity/pkg-utils": "8.0.
|
|
143
|
+
"@sanity/pkg-utils": "8.0.8-canary.0"
|
|
143
144
|
},
|
|
144
145
|
"peerDependencies": {
|
|
145
146
|
"babel-plugin-react-compiler": "*",
|