@sanity/pkg-utils 7.2.8-canary.2 → 7.2.9-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/_chunks-cjs/build.cjs +0 -1
- package/dist/_chunks-cjs/build.cjs.map +1 -1
- package/dist/_chunks-cjs/consoleSpy.cjs +0 -1
- package/dist/_chunks-cjs/consoleSpy.cjs.map +1 -1
- package/dist/_chunks-cjs/index.cjs +0 -4
- package/dist/_chunks-cjs/index.cjs.map +1 -1
- package/dist/_chunks-cjs/init.cjs +3 -4
- package/dist/_chunks-cjs/init.cjs.map +1 -1
- package/dist/_chunks-cjs/isRecord.cjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/index.cjs +2 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -193
- package/dist/index.d.ts +11 -193
- package/dist/index.js +4 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/node/core/config/loadConfig.ts +1 -1
- package/src/node/core/pkg/loadPkgWithReporting.ts +1 -1
- package/src/node/core/pkg/parseExports.ts +1 -1
- package/src/node/core/pkg/types.ts +1 -1
- package/src/node/index.ts +1 -24
- package/src/node/init.ts +1 -1
- package/src/node/logger.ts +2 -2
- package/src/node/strict.ts +1 -1
- package/src/node/tasks/dts/getExtractMessagesConfig.ts +1 -1
- package/src/node/tasks/types.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/pkg-utils",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.9-canary.0",
|
|
4
4
|
"description": "Simple utilities for modern npm packages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"ts-node": "^10.9.2",
|
|
140
140
|
"typescript": "5.8.3",
|
|
141
141
|
"vitest": "^3.2.4",
|
|
142
|
-
"@sanity/pkg-utils": "7.2.
|
|
142
|
+
"@sanity/pkg-utils": "7.2.9-canary.0"
|
|
143
143
|
},
|
|
144
144
|
"peerDependencies": {
|
|
145
145
|
"babel-plugin-react-compiler": "*",
|
|
@@ -4,7 +4,7 @@ import pkgUp from 'pkg-up'
|
|
|
4
4
|
import {findConfigFile} from './findConfigFile'
|
|
5
5
|
import type {PkgConfigOptions} from './types'
|
|
6
6
|
|
|
7
|
-
/** @
|
|
7
|
+
/** @alpha */
|
|
8
8
|
export async function loadConfig(options: {cwd: string}): Promise<PkgConfigOptions | undefined> {
|
|
9
9
|
const {cwd} = options
|
|
10
10
|
|
package/src/node/index.ts
CHANGED
|
@@ -2,7 +2,6 @@ export {build} from './build'
|
|
|
2
2
|
export {check} from './check'
|
|
3
3
|
export {defineConfig} from './core/config/defineConfig'
|
|
4
4
|
export {loadConfig} from './core/config/loadConfig'
|
|
5
|
-
export {resolveConfigProperty} from './core/config/resolveConfigProperty'
|
|
6
5
|
export type {
|
|
7
6
|
PkgFormat,
|
|
8
7
|
PkgRuntime,
|
|
@@ -18,15 +17,11 @@ export type {
|
|
|
18
17
|
ReactCompilerLogger,
|
|
19
18
|
PkgConfigOptions,
|
|
20
19
|
} from './core/config/types'
|
|
21
|
-
export type {BuildFile, BuildContext} from './core/contexts/buildContext'
|
|
22
20
|
export {DEFAULT_BROWSERSLIST_QUERY} from './core/defaults'
|
|
23
|
-
export * from './core/isRecord'
|
|
24
21
|
export {loadPkg} from './core/pkg/loadPkg'
|
|
25
22
|
export {loadPkgWithReporting} from './core/pkg/loadPkgWithReporting'
|
|
26
23
|
export {parseExports} from './core/pkg/parseExports'
|
|
27
|
-
export {type PkgExtMap, pkgExtMap} from './core/pkg/pkgExt'
|
|
28
24
|
export * from './core/pkg/types'
|
|
29
|
-
export {createFromTemplate} from './core/template/createFromTemplate'
|
|
30
25
|
export {defineTemplateOption} from './core/template/define'
|
|
31
26
|
export {
|
|
32
27
|
type PkgTemplateFile,
|
|
@@ -36,11 +31,9 @@ export {
|
|
|
36
31
|
type PkgTemplateResolver,
|
|
37
32
|
type PkgTemplate,
|
|
38
33
|
} from './core/template/types'
|
|
39
|
-
export {loadTSConfig} from './core/ts/loadTSConfig'
|
|
40
34
|
|
|
41
35
|
export {init} from './init'
|
|
42
|
-
export {
|
|
43
|
-
export {resolveBuildTasks} from './resolveBuildTasks'
|
|
36
|
+
export {createLogger} from './logger'
|
|
44
37
|
export {
|
|
45
38
|
type StrictOptions,
|
|
46
39
|
type InferredStrictOptions,
|
|
@@ -49,23 +42,7 @@ export {
|
|
|
49
42
|
toggle,
|
|
50
43
|
type ToggleType,
|
|
51
44
|
} from './strict'
|
|
52
|
-
export {buildTaskHandlers, watchTaskHandlers} from './tasks'
|
|
53
|
-
export {dtsTask} from './tasks/dts/dtsTask'
|
|
54
|
-
export {dtsWatchTask} from './tasks/dts/dtsWatchTask'
|
|
55
45
|
export {getExtractMessagesConfig} from './tasks/dts/getExtractMessagesConfig'
|
|
56
|
-
export type {DtsWatchTask, DtsTask, DtsResult} from './tasks/dts/types'
|
|
57
|
-
export {rollupTask} from './tasks/rollup/rollupTask'
|
|
58
|
-
export {rollupWatchTask} from './tasks/rollup/rollupWatchTask'
|
|
59
|
-
export type {
|
|
60
|
-
RollupTaskEntry,
|
|
61
|
-
RollupTask,
|
|
62
|
-
RollupWatchTask,
|
|
63
|
-
BuildTask,
|
|
64
|
-
WatchTask,
|
|
65
|
-
TaskHandler,
|
|
66
|
-
BuildTaskHandlers,
|
|
67
|
-
WatchTaskHandlers,
|
|
68
|
-
} from './tasks/types'
|
|
69
46
|
export {watch} from './watch'
|
|
70
47
|
|
|
71
48
|
export type {Plugin as RollupPlugin} from 'rollup'
|
package/src/node/init.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {lstat} from 'node:fs/promises'
|
|
2
2
|
import {resolve} from 'node:path'
|
|
3
3
|
import {mkdirp} from 'mkdirp'
|
|
4
|
-
import {
|
|
4
|
+
import {createFromTemplate} from './core/template'
|
|
5
5
|
import {fileExists} from './fileExists'
|
|
6
6
|
import {isEmptyDirectory} from './isEmptyDirectory'
|
|
7
7
|
import {createLogger} from './logger'
|
package/src/node/logger.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// oxlint-disable no-console
|
|
2
2
|
import chalk from 'chalk'
|
|
3
3
|
|
|
4
|
-
/** @
|
|
4
|
+
/** @alpha */
|
|
5
5
|
export interface Logger {
|
|
6
6
|
log: (...args: unknown[]) => void
|
|
7
7
|
info: (...args: unknown[]) => void
|
|
@@ -10,7 +10,7 @@ export interface Logger {
|
|
|
10
10
|
success: (...args: unknown[]) => void
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
/** @
|
|
13
|
+
/** @alpha */
|
|
14
14
|
export function createLogger(): Logger {
|
|
15
15
|
return {
|
|
16
16
|
log: (...args) => {
|
package/src/node/strict.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface StrictOptions {
|
|
|
78
78
|
alwaysPackageJsonFiles?: ToggleType
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/** @
|
|
81
|
+
/** @alpha */
|
|
82
82
|
export function parseStrictOptions(input: unknown): InferredStrictOptions {
|
|
83
83
|
return validationSchema.parse({strictOptions: input}, {errorMap}).strictOptions
|
|
84
84
|
}
|
|
@@ -8,7 +8,7 @@ const LOG_LEVELS: Record<PkgRuleLevel, ExtractorLogLevel> = {
|
|
|
8
8
|
warn: 'warning' as ExtractorLogLevel.Warning,
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/** @
|
|
11
|
+
/** @alpha */
|
|
12
12
|
export function getExtractMessagesConfig(options: {
|
|
13
13
|
rules: NonNullable<PkgConfigOptions['extract']>['rules']
|
|
14
14
|
}): IExtractorMessagesConfig {
|
package/src/node/tasks/types.ts
CHANGED