@sanity/pkg-utils 6.13.3 → 7.0.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/_chunks-cjs/build.cjs +6 -58
- package/dist/_chunks-cjs/build.cjs.map +1 -1
- package/dist/_chunks-cjs/check.cjs +3 -3
- package/dist/_chunks-cjs/check.cjs.map +1 -1
- package/dist/_chunks-cjs/consoleSpy.cjs +23 -67
- package/dist/_chunks-cjs/consoleSpy.cjs.map +1 -1
- package/dist/_chunks-cjs/index.cjs +10 -133
- package/dist/_chunks-cjs/index.cjs.map +1 -1
- package/dist/_chunks-cjs/logger.cjs +2 -12
- package/dist/_chunks-cjs/logger.cjs.map +1 -1
- package/dist/_chunks-cjs/watch.cjs +5 -21
- package/dist/_chunks-cjs/watch.cjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -48
- package/dist/index.d.ts +12 -48
- package/dist/index.js +40 -283
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/src/node/build.ts +1 -2
- package/src/node/check.ts +1 -2
- package/src/node/core/config/types.ts +11 -16
- package/src/node/core/pkg/loadPkgWithReporting.ts +2 -10
- package/src/node/core/pkg/parseExports.ts +7 -46
- package/src/node/core/pkg/pkgExt.ts +1 -4
- package/src/node/core/pkg/validateExports.ts +0 -1
- package/src/node/core/pkg/validatePkg.ts +7 -17
- package/src/node/resolveBuildContext.ts +0 -3
- package/src/node/resolveBuildTasks.ts +4 -108
- package/src/node/resolveWatchTasks.ts +1 -23
- package/src/node/tasks/dts/createApiExtractorConfig.ts +1 -0
- package/src/node/tasks/dts/getExtractMessagesConfig.ts +5 -1
- package/src/node/tasks/dts/getTargetPaths.ts +0 -13
- package/src/node/tasks/index.ts +1 -3
- package/src/node/tasks/rollup/index.ts +0 -2
- package/src/node/tasks/rollup/resolveRollupConfig.ts +7 -15
- package/src/node/tasks/types.ts +1 -22
- package/src/node/watch.ts +1 -2
- package/src/node/tasks/rollup/rollupLegacyTask.ts +0 -145
- package/src/node/tasks/rollup/rollupReactCompilerTask.ts +0 -140
package/dist/index.d.cts
CHANGED
|
@@ -65,14 +65,12 @@ export declare interface BuildFile {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/** @internal */
|
|
68
|
-
export declare type BuildTask = DtsTask | RollupTask
|
|
68
|
+
export declare type BuildTask = DtsTask | RollupTask
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
71
|
export declare interface BuildTaskHandlers {
|
|
72
72
|
'build:dts': TaskHandler<DtsTask, DtsResult>
|
|
73
73
|
'build:js': TaskHandler<RollupTask>
|
|
74
|
-
'build:react-compiler': TaskHandler<RollupReactCompilerTask>
|
|
75
|
-
'build:legacy': TaskHandler<RollupLegacyTask>
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
/** @internal */
|
|
@@ -170,7 +168,6 @@ export declare function loadPkgWithReporting(options: {
|
|
|
170
168
|
cwd: string
|
|
171
169
|
logger: Logger
|
|
172
170
|
strict: boolean
|
|
173
|
-
legacyExports: boolean
|
|
174
171
|
}): Promise<PackageJSON>
|
|
175
172
|
|
|
176
173
|
/** @internal */
|
|
@@ -271,7 +268,6 @@ export declare function parseExports(options: {
|
|
|
271
268
|
pkg: PackageJSON
|
|
272
269
|
strict: boolean
|
|
273
270
|
strictOptions: InferredStrictOptions
|
|
274
|
-
legacyExports: boolean
|
|
275
271
|
logger: Logger
|
|
276
272
|
}): (PkgExport & {
|
|
277
273
|
_path: string
|
|
@@ -350,7 +346,7 @@ export declare interface PkgConfigOptions {
|
|
|
350
346
|
/**
|
|
351
347
|
* @deprecated as it's no longer needed since TypeScript 5.5 https://github.com/microsoft/TypeScript/issues/42873
|
|
352
348
|
*/
|
|
353
|
-
'ae-forgotten-export'?:
|
|
349
|
+
'ae-forgotten-export'?: never
|
|
354
350
|
'ae-incompatible-release-tags'?: PkgRuleLevel
|
|
355
351
|
'ae-internal-missing-underscore'?: PkgRuleLevel
|
|
356
352
|
'ae-missing-release-tag'?: PkgRuleLevel
|
|
@@ -384,10 +380,9 @@ export declare interface PkgConfigOptions {
|
|
|
384
380
|
*/
|
|
385
381
|
jsxImportSource?: string
|
|
386
382
|
/**
|
|
387
|
-
*
|
|
388
|
-
* @deprecated - will be removed in the next major version
|
|
383
|
+
* @deprecated no longer supported
|
|
389
384
|
*/
|
|
390
|
-
legacyExports?:
|
|
385
|
+
legacyExports?: never
|
|
391
386
|
minify?: boolean
|
|
392
387
|
/** @alpha */
|
|
393
388
|
rollup?: {
|
|
@@ -440,26 +435,22 @@ export declare type PkgConfigPropertyResolver<T> = (prev: T) => T
|
|
|
440
435
|
/** @public */
|
|
441
436
|
export declare interface PkgExport {
|
|
442
437
|
/** @internal */
|
|
443
|
-
|
|
444
|
-
|
|
438
|
+
_exported?: boolean
|
|
439
|
+
browser?: {
|
|
445
440
|
source: string
|
|
446
441
|
import?: string
|
|
447
442
|
require?: string
|
|
448
443
|
}
|
|
449
|
-
|
|
450
|
-
source?: string
|
|
451
|
-
default: string
|
|
452
|
-
}
|
|
453
|
-
'node'?: {
|
|
444
|
+
node?: {
|
|
454
445
|
source?: string
|
|
455
446
|
import?: string
|
|
456
447
|
require?: string
|
|
457
448
|
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
449
|
+
types?: string
|
|
450
|
+
source: string
|
|
451
|
+
import?: string
|
|
452
|
+
require?: string
|
|
453
|
+
default: string
|
|
463
454
|
}
|
|
464
455
|
|
|
465
456
|
/** @public */
|
|
@@ -477,7 +468,6 @@ export declare interface PkgExtMap {
|
|
|
477
468
|
commonjs: string
|
|
478
469
|
esm: string
|
|
479
470
|
}
|
|
480
|
-
legacy: string
|
|
481
471
|
}
|
|
482
472
|
|
|
483
473
|
/** @internal */
|
|
@@ -490,7 +480,6 @@ export declare const pkgExtMap: {
|
|
|
490
480
|
commonjs: '.cjs'
|
|
491
481
|
esm: '.js'
|
|
492
482
|
}
|
|
493
|
-
legacy: '.esm.js'
|
|
494
483
|
}
|
|
495
484
|
|
|
496
485
|
/** @public */
|
|
@@ -632,33 +621,8 @@ export declare function resolveConfigProperty<T>(
|
|
|
632
621
|
initialValue: T,
|
|
633
622
|
): T
|
|
634
623
|
|
|
635
|
-
/** @internal */
|
|
636
|
-
export declare interface RollupLegacyTask {
|
|
637
|
-
type: 'build:legacy'
|
|
638
|
-
buildId: string
|
|
639
|
-
entries: RollupTaskEntry[]
|
|
640
|
-
runtime: PkgRuntime
|
|
641
|
-
format: 'esm'
|
|
642
|
-
target: string[]
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/** @internal */
|
|
646
|
-
export declare const rollupLegacyTask: TaskHandler<RollupLegacyTask>
|
|
647
|
-
|
|
648
624
|
export {RollupPlugin}
|
|
649
625
|
|
|
650
|
-
/** @internal */
|
|
651
|
-
export declare interface RollupReactCompilerTask {
|
|
652
|
-
type: 'build:react-compiler'
|
|
653
|
-
entries: RollupTaskEntry[]
|
|
654
|
-
runtime: 'browser'
|
|
655
|
-
format: 'esm'
|
|
656
|
-
target: string[]
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/** @internal */
|
|
660
|
-
export declare const rollupReactCompilerTask: TaskHandler<RollupReactCompilerTask>
|
|
661
|
-
|
|
662
626
|
/** @internal */
|
|
663
627
|
export declare interface RollupTask {
|
|
664
628
|
type: 'build:js'
|
package/dist/index.d.ts
CHANGED
|
@@ -65,14 +65,12 @@ export declare interface BuildFile {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/** @internal */
|
|
68
|
-
export declare type BuildTask = DtsTask | RollupTask
|
|
68
|
+
export declare type BuildTask = DtsTask | RollupTask
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
71
|
export declare interface BuildTaskHandlers {
|
|
72
72
|
'build:dts': TaskHandler<DtsTask, DtsResult>
|
|
73
73
|
'build:js': TaskHandler<RollupTask>
|
|
74
|
-
'build:react-compiler': TaskHandler<RollupReactCompilerTask>
|
|
75
|
-
'build:legacy': TaskHandler<RollupLegacyTask>
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
/** @internal */
|
|
@@ -170,7 +168,6 @@ export declare function loadPkgWithReporting(options: {
|
|
|
170
168
|
cwd: string
|
|
171
169
|
logger: Logger
|
|
172
170
|
strict: boolean
|
|
173
|
-
legacyExports: boolean
|
|
174
171
|
}): Promise<PackageJSON>
|
|
175
172
|
|
|
176
173
|
/** @internal */
|
|
@@ -271,7 +268,6 @@ export declare function parseExports(options: {
|
|
|
271
268
|
pkg: PackageJSON
|
|
272
269
|
strict: boolean
|
|
273
270
|
strictOptions: InferredStrictOptions
|
|
274
|
-
legacyExports: boolean
|
|
275
271
|
logger: Logger
|
|
276
272
|
}): (PkgExport & {
|
|
277
273
|
_path: string
|
|
@@ -350,7 +346,7 @@ export declare interface PkgConfigOptions {
|
|
|
350
346
|
/**
|
|
351
347
|
* @deprecated as it's no longer needed since TypeScript 5.5 https://github.com/microsoft/TypeScript/issues/42873
|
|
352
348
|
*/
|
|
353
|
-
'ae-forgotten-export'?:
|
|
349
|
+
'ae-forgotten-export'?: never
|
|
354
350
|
'ae-incompatible-release-tags'?: PkgRuleLevel
|
|
355
351
|
'ae-internal-missing-underscore'?: PkgRuleLevel
|
|
356
352
|
'ae-missing-release-tag'?: PkgRuleLevel
|
|
@@ -384,10 +380,9 @@ export declare interface PkgConfigOptions {
|
|
|
384
380
|
*/
|
|
385
381
|
jsxImportSource?: string
|
|
386
382
|
/**
|
|
387
|
-
*
|
|
388
|
-
* @deprecated - will be removed in the next major version
|
|
383
|
+
* @deprecated no longer supported
|
|
389
384
|
*/
|
|
390
|
-
legacyExports?:
|
|
385
|
+
legacyExports?: never
|
|
391
386
|
minify?: boolean
|
|
392
387
|
/** @alpha */
|
|
393
388
|
rollup?: {
|
|
@@ -440,26 +435,22 @@ export declare type PkgConfigPropertyResolver<T> = (prev: T) => T
|
|
|
440
435
|
/** @public */
|
|
441
436
|
export declare interface PkgExport {
|
|
442
437
|
/** @internal */
|
|
443
|
-
|
|
444
|
-
|
|
438
|
+
_exported?: boolean
|
|
439
|
+
browser?: {
|
|
445
440
|
source: string
|
|
446
441
|
import?: string
|
|
447
442
|
require?: string
|
|
448
443
|
}
|
|
449
|
-
|
|
450
|
-
source?: string
|
|
451
|
-
default: string
|
|
452
|
-
}
|
|
453
|
-
'node'?: {
|
|
444
|
+
node?: {
|
|
454
445
|
source?: string
|
|
455
446
|
import?: string
|
|
456
447
|
require?: string
|
|
457
448
|
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
449
|
+
types?: string
|
|
450
|
+
source: string
|
|
451
|
+
import?: string
|
|
452
|
+
require?: string
|
|
453
|
+
default: string
|
|
463
454
|
}
|
|
464
455
|
|
|
465
456
|
/** @public */
|
|
@@ -477,7 +468,6 @@ export declare interface PkgExtMap {
|
|
|
477
468
|
commonjs: string
|
|
478
469
|
esm: string
|
|
479
470
|
}
|
|
480
|
-
legacy: string
|
|
481
471
|
}
|
|
482
472
|
|
|
483
473
|
/** @internal */
|
|
@@ -490,7 +480,6 @@ export declare const pkgExtMap: {
|
|
|
490
480
|
commonjs: '.cjs'
|
|
491
481
|
esm: '.js'
|
|
492
482
|
}
|
|
493
|
-
legacy: '.esm.js'
|
|
494
483
|
}
|
|
495
484
|
|
|
496
485
|
/** @public */
|
|
@@ -632,33 +621,8 @@ export declare function resolveConfigProperty<T>(
|
|
|
632
621
|
initialValue: T,
|
|
633
622
|
): T
|
|
634
623
|
|
|
635
|
-
/** @internal */
|
|
636
|
-
export declare interface RollupLegacyTask {
|
|
637
|
-
type: 'build:legacy'
|
|
638
|
-
buildId: string
|
|
639
|
-
entries: RollupTaskEntry[]
|
|
640
|
-
runtime: PkgRuntime
|
|
641
|
-
format: 'esm'
|
|
642
|
-
target: string[]
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/** @internal */
|
|
646
|
-
export declare const rollupLegacyTask: TaskHandler<RollupLegacyTask>
|
|
647
|
-
|
|
648
624
|
export {RollupPlugin}
|
|
649
625
|
|
|
650
|
-
/** @internal */
|
|
651
|
-
export declare interface RollupReactCompilerTask {
|
|
652
|
-
type: 'build:react-compiler'
|
|
653
|
-
entries: RollupTaskEntry[]
|
|
654
|
-
runtime: 'browser'
|
|
655
|
-
format: 'esm'
|
|
656
|
-
target: string[]
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/** @internal */
|
|
660
|
-
export declare const rollupReactCompilerTask: TaskHandler<RollupReactCompilerTask>
|
|
661
|
-
|
|
662
626
|
/** @internal */
|
|
663
627
|
export declare interface RollupTask {
|
|
664
628
|
type: 'build:js'
|