@sanity/pkg-utils 10.9.2 → 11.0.1
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/_chunks-es/buildAction.js.map +1 -1
- package/dist/_chunks-es/createApiExtractorConfig.js +0 -1
- package/dist/_chunks-es/createApiExtractorConfig.js.map +1 -1
- package/dist/_chunks-es/extractModuleBlocks.js +1 -1
- package/dist/_chunks-es/extractModuleBlocks.js.map +1 -1
- package/dist/_chunks-es/index.js +16 -12
- package/dist/_chunks-es/index.js.map +1 -1
- package/dist/_chunks-es/initAction.js.map +1 -1
- package/dist/_chunks-es/resolveBuildContext.js +1 -1
- package/dist/_chunks-es/resolveBuildContext.js.map +1 -1
- package/dist/_chunks-es/resolveRolldownConfig.js +8 -2
- package/dist/_chunks-es/resolveRolldownConfig.js.map +1 -1
- package/dist/_chunks-es/watchAction.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +21 -26
- package/dist/index.d.ts.map +1 -1
- package/package.json +10 -12
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { PkgExport, PkgExports, PkgExports as PkgExports$1 } from "@sanity/parse
|
|
|
4
4
|
import { Options } from "@vanilla-extract/rollup-plugin";
|
|
5
5
|
import { PluginOptions } from "babel-plugin-react-compiler";
|
|
6
6
|
import { NormalizedOutputOptions, Plugin, Plugin as RollupPlugin, TreeshakingOptions } from "rollup";
|
|
7
|
-
type ToggleType =
|
|
7
|
+
type ToggleType = "error" | "warn" | "off";
|
|
8
8
|
/**
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
@@ -125,13 +125,13 @@ interface StrictOptions {
|
|
|
125
125
|
noSanityClientPeerDependency: ToggleType;
|
|
126
126
|
}
|
|
127
127
|
/** @public */
|
|
128
|
-
type PkgFormat =
|
|
128
|
+
type PkgFormat = "commonjs" | "esm";
|
|
129
129
|
/**
|
|
130
130
|
* Options for the `@vanilla-extract/rollup-plugin` integration, including pkg-utils-specific
|
|
131
131
|
* extensions (`minify`, `browserslist`, and `extract.compatMode`).
|
|
132
132
|
* @alpha
|
|
133
133
|
*/
|
|
134
|
-
interface PkgVanillaExtractOptions extends Omit<Options,
|
|
134
|
+
interface PkgVanillaExtractOptions extends Omit<Options, "extract"> {
|
|
135
135
|
/**
|
|
136
136
|
* Minify the extracted CSS with `lightningcss`.
|
|
137
137
|
* @defaultValue true
|
|
@@ -146,7 +146,7 @@ interface PkgVanillaExtractOptions extends Omit<Options, 'extract'> {
|
|
|
146
146
|
* Different formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc).
|
|
147
147
|
* @defaultValue "short"
|
|
148
148
|
*/
|
|
149
|
-
identifiers?: Options[
|
|
149
|
+
identifiers?: Options["identifiers"];
|
|
150
150
|
/**
|
|
151
151
|
* Extract the CSS into a separate file. pkg-utils always extracts, so this configures _how_.
|
|
152
152
|
*/
|
|
@@ -178,7 +178,7 @@ interface PkgVanillaExtractOptions extends Omit<Options, 'extract'> {
|
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
/** @public */
|
|
181
|
-
type PkgRuntime =
|
|
181
|
+
type PkgRuntime = "*" | "browser" | "node";
|
|
182
182
|
/** @public */
|
|
183
183
|
type PkgConfigPropertyResolver<T> = (prev: T) => T;
|
|
184
184
|
/** @public */
|
|
@@ -191,14 +191,14 @@ interface PkgBundle {
|
|
|
191
191
|
runtime?: PkgRuntime;
|
|
192
192
|
}
|
|
193
193
|
/** @public */
|
|
194
|
-
type PkgRuleLevel =
|
|
194
|
+
type PkgRuleLevel = "error" | "warn" | "info" | "off";
|
|
195
195
|
/** @public */
|
|
196
196
|
interface TSDocCustomTag {
|
|
197
197
|
name: string;
|
|
198
|
-
syntaxKind:
|
|
198
|
+
syntaxKind: "block" | "modifier";
|
|
199
199
|
allowMultiple?: boolean;
|
|
200
200
|
}
|
|
201
|
-
type DtsType =
|
|
201
|
+
type DtsType = "api-extractor" | "rolldown";
|
|
202
202
|
/** @public */
|
|
203
203
|
interface PkgConfigOptions {
|
|
204
204
|
/** @alpha */
|
|
@@ -276,16 +276,12 @@ interface PkgConfigOptions {
|
|
|
276
276
|
bundledPackages?: PkgConfigProperty<string[]>;
|
|
277
277
|
customTags?: TSDocCustomTag[];
|
|
278
278
|
rules?: {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
'ae-missing-release-tag'?: PkgRuleLevel;
|
|
286
|
-
'tsdoc-link-tag-unescaped-text'?: PkgRuleLevel;
|
|
287
|
-
'tsdoc-undefined-tag'?: PkgRuleLevel;
|
|
288
|
-
'tsdoc-unsupported-tag'?: PkgRuleLevel;
|
|
279
|
+
"ae-incompatible-release-tags"?: PkgRuleLevel;
|
|
280
|
+
"ae-internal-missing-underscore"?: PkgRuleLevel;
|
|
281
|
+
"ae-missing-release-tag"?: PkgRuleLevel;
|
|
282
|
+
"tsdoc-link-tag-unescaped-text"?: PkgRuleLevel;
|
|
283
|
+
"tsdoc-undefined-tag"?: PkgRuleLevel;
|
|
284
|
+
"tsdoc-unsupported-tag"?: PkgRuleLevel;
|
|
289
285
|
};
|
|
290
286
|
};
|
|
291
287
|
/**
|
|
@@ -299,7 +295,7 @@ interface PkgConfigOptions {
|
|
|
299
295
|
/**
|
|
300
296
|
* Defaults to `"automatic"`
|
|
301
297
|
*/
|
|
302
|
-
jsx?:
|
|
298
|
+
jsx?: "transform" | "preserve" | "automatic";
|
|
303
299
|
/**
|
|
304
300
|
* Defaults to `"createElement"`
|
|
305
301
|
*/
|
|
@@ -312,10 +308,6 @@ interface PkgConfigOptions {
|
|
|
312
308
|
* Defaults to `"react"`
|
|
313
309
|
*/
|
|
314
310
|
jsxImportSource?: string;
|
|
315
|
-
/**
|
|
316
|
-
* @deprecated no longer supported
|
|
317
|
-
*/
|
|
318
|
-
legacyExports?: never;
|
|
319
311
|
minify?: boolean;
|
|
320
312
|
/** @alpha */
|
|
321
313
|
rollup?: {
|
|
@@ -375,9 +367,12 @@ interface PkgConfigOptions {
|
|
|
375
367
|
*/
|
|
376
368
|
dts?: DtsType;
|
|
377
369
|
/**
|
|
378
|
-
* When using `dts: 'rolldown'`, enables the use of
|
|
379
|
-
* By default, `tsgo` is automatically enabled if `@typescript/native-preview` is found in `devDependencies
|
|
370
|
+
* When using `dts: 'rolldown'`, enables the use of the Go-native TypeScript compiler (`tsgo`) for type generation.
|
|
371
|
+
* By default, `tsgo` is automatically enabled if `@typescript/native-preview` is found in `devDependencies`,
|
|
372
|
+
* or if the installed `typescript` is v7 (which is the Go-native compiler).
|
|
380
373
|
* Set to `true` to explicitly enable or `false` to explicitly disable.
|
|
374
|
+
* Note that `tsgo` cannot be disabled when `typescript` v7 is installed, as v7 no longer ships
|
|
375
|
+
* the JS compiler API that the non-tsgo code path depends on.
|
|
381
376
|
* @alpha
|
|
382
377
|
*/
|
|
383
378
|
tsgo?: boolean;
|
|
@@ -394,7 +389,7 @@ declare const DEFAULT_BROWSERSLIST_QUERY: string[];
|
|
|
394
389
|
/** @public */
|
|
395
390
|
interface PkgTemplateStringOption<T = string> {
|
|
396
391
|
name: string;
|
|
397
|
-
type:
|
|
392
|
+
type: "string";
|
|
398
393
|
description: string;
|
|
399
394
|
initial?: T | ((options: Record<string, any>) => T);
|
|
400
395
|
parse?: (v: string) => T | null;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/node/strict.ts","../src/node/core/config/types.ts","../src/node/core/config/defineConfig.ts","../src/node/core/config/loadConfig.ts","../src/node/core/defaults.ts","../src/node/core/template/types.ts","../src/node/core/template/define.ts"],"mappings":";;;;;;KAKK;;;;UAwCY;;;;;EAKf,sBAAsB;;;;;EAKtB,uBAAuB;;;;;;;;;EASvB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,cAAc;;;;;EAKd,sBAAsB;;;;;EAKtB,4BAA4B;;;;;EAK5B,kBAAkB;;;;;EAKlB,wBAAwB;;;;;EAKxB,yBAAyB;;;;;EAKzB,0BAA0B;;;;;EAK1B,6BAA6B;;;;;EAK7B,oBAAoB;;;;;EAKpB,8BAA8B;;;;;EAK9B,mBAAmB;;;;;EAKnB,sBAAsB;;;;;EAKtB,wBAAwB;;;;;EAKxB,2BAA2B;;;;;EAK3B,uBAAuB;;;;;EAKvB,sBAAsB;;;;;EAKtB,8BAA8B;;;KCpJpB;;;;;;UAOK,iCAAiC,KAAK;;;;;EAKrD;;;;;EAKA;;;;;EAKA,cAAc;;;;EAId;;;;;IAKE;;;;;IAKA;;;;;;;;;;;;;;IAcA;;;;KAKQ;;KAGA,0BAA0B,MAAM,MAAM,MAAM;;KAG5C,kBAAkB,KAAK,0BAA0B,KAAK;;UAGjD;EACf;EACA;EACA;EACA,UAAU;;;KAIA;;UAGK;EACf;EACA;EACA;;KAGU;;UAGK;;EAEf;IACE,UAAU;;IAEV;;IAEA;;MAIM;;;;;MAKA;;MAEA;;MAEA;;MAEA;;MAEA;;;;;;;;MAQA;MACA;;MAEA;;;;;;;EAOR,uBAAuB,QAAQ;EAC/B,UAAU;;EAEV,SAAS;;;;EAIT;EACA,UAAU,kBAAkB;;;;;;EAM5B;;;;IAIE;;;;;;;IAOA;;;;;;;;IAQA,kBAAkB;IAClB,aAAa;IACb
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/node/strict.ts","../src/node/core/config/types.ts","../src/node/core/config/defineConfig.ts","../src/node/core/config/loadConfig.ts","../src/node/core/defaults.ts","../src/node/core/template/types.ts","../src/node/core/template/define.ts"],"mappings":";;;;;;KAKK;;;;UAwCY;;;;;EAKf,sBAAsB;;;;;EAKtB,uBAAuB;;;;;;;;;EASvB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,wBAAwB;;;;;EAKxB,cAAc;;;;;EAKd,sBAAsB;;;;;EAKtB,4BAA4B;;;;;EAK5B,kBAAkB;;;;;E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AAkB,eAAe,IAAI;;iBCI5D,WAAW;EAC/B;EACA;IACE,QAAQ;;cCPC;;UCMI,wBAAwB;EACvC;EACA;EACA;EACA,UAAU,MAAM,SAAS,wBAAwB;EACjD,SAAS,cAAc;EACvB,YAAY;;;KAIF,kBAAkB,cAAc,wBAAwB;;iBChBpD,qBAAqB,GAAG,QAAQ,kBAAkB,KAAK,kBAAkB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
"@rollup/plugin-replace": "^6.0.3",
|
|
56
56
|
"@rollup/plugin-terser": "^1.0.0",
|
|
57
57
|
"@sanity/browserslist-config": "^1.0.5",
|
|
58
|
-
"@
|
|
58
|
+
"@typescript/typescript6": "^6.0.2",
|
|
59
|
+
"@vanilla-extract/rollup-plugin": "^1.5.4",
|
|
59
60
|
"browserslist": "^4.28.5",
|
|
60
61
|
"cac": "^7.0.0",
|
|
61
62
|
"chalk": "^5.6.2",
|
|
@@ -70,12 +71,12 @@
|
|
|
70
71
|
"lightningcss": "^1.32.0",
|
|
71
72
|
"mkdirp": "^3.0.1",
|
|
72
73
|
"outdent": "^0.8.0",
|
|
73
|
-
"prettier": "^3.9.
|
|
74
|
+
"prettier": "^3.9.5",
|
|
74
75
|
"pretty-bytes": "^7.1.0",
|
|
75
76
|
"prompts": "^2.4.2",
|
|
76
77
|
"rimraf": "^6.1.3",
|
|
77
|
-
"rolldown": "1.1.
|
|
78
|
-
"rolldown-plugin-dts": "0.27.
|
|
78
|
+
"rolldown": "1.1.5",
|
|
79
|
+
"rolldown-plugin-dts": "0.27.4",
|
|
79
80
|
"rollup": "^4.62.2",
|
|
80
81
|
"rollup-plugin-esbuild": "^6.2.1",
|
|
81
82
|
"rxjs": "^7.8.2",
|
|
@@ -83,28 +84,25 @@
|
|
|
83
84
|
"tsx": "^4.23.0",
|
|
84
85
|
"zod": "^4.4.3",
|
|
85
86
|
"zod-validation-error": "^5.0.0",
|
|
86
|
-
"@sanity/parse-package-json": "^2.2.
|
|
87
|
+
"@sanity/parse-package-json": "^2.2.3"
|
|
87
88
|
},
|
|
88
89
|
"devDependencies": {
|
|
89
90
|
"@types/babel__core": "^7.20.5",
|
|
90
91
|
"@types/find-config": "^1.0.4",
|
|
91
|
-
"@types/node": "^24.13.
|
|
92
|
+
"@types/node": "^24.13.3",
|
|
92
93
|
"@types/prompts": "^2.4.9",
|
|
93
|
-
"@types/semver": "^7.7.1",
|
|
94
94
|
"@types/treeify": "^1.0.3",
|
|
95
|
-
"@typescript/native-preview": "7.0.0-dev.20260421.2",
|
|
96
95
|
"babel-plugin-react-compiler": "1.0.0",
|
|
97
96
|
"browserslist-to-esbuild": "2.1.1",
|
|
98
97
|
"nanoexec": "^1.1.0",
|
|
99
98
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
100
|
-
"
|
|
101
|
-
"typescript": "6.0.3",
|
|
99
|
+
"typescript": "7.0.2",
|
|
102
100
|
"vitest": "^4.1.10",
|
|
103
101
|
"@sanity/tsconfig": "^2.2.0"
|
|
104
102
|
},
|
|
105
103
|
"peerDependencies": {
|
|
106
104
|
"babel-plugin-react-compiler": "*",
|
|
107
|
-
"typescript": "
|
|
105
|
+
"typescript": "6.x || 7.x"
|
|
108
106
|
},
|
|
109
107
|
"peerDependenciesMeta": {
|
|
110
108
|
"babel-plugin-react-compiler": {
|