@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/pkg-utils",
3
- "version": "7.2.8-canary.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.8-canary.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
- /** @internal */
7
+ /** @alpha */
8
8
  export async function loadConfig(options: {cwd: string}): Promise<PkgConfigOptions | undefined> {
9
9
  const {cwd} = options
10
10
 
@@ -5,7 +5,7 @@ import {assertLast, assertOrder} from './helpers'
5
5
  import {loadPkg} from './loadPkg'
6
6
  import type {PackageJSON} from './types'
7
7
 
8
- /** @internal */
8
+ /** @alpha */
9
9
  export async function loadPkgWithReporting(options: {
10
10
  cwd: string
11
11
  logger: Logger
@@ -9,7 +9,7 @@ import {pkgExtMap} from './pkgExt'
9
9
  import type {PackageJSON} from './types'
10
10
  import {validateExports} from './validateExports'
11
11
 
12
- /** @internal */
12
+ /** @alpha */
13
13
  export function parseExports(options: {
14
14
  cwd: string
15
15
  pkg: PackageJSON
@@ -1,4 +1,4 @@
1
- /** @internal */
1
+ /** @alpha */
2
2
  export interface PackageJSON {
3
3
  type?: 'commonjs' | 'module'
4
4
  version: string
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 {type Logger, createLogger} from './logger'
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 { createFromTemplate } from './core/template'
4
+ import {createFromTemplate} from './core/template'
5
5
  import {fileExists} from './fileExists'
6
6
  import {isEmptyDirectory} from './isEmptyDirectory'
7
7
  import {createLogger} from './logger'
@@ -1,7 +1,7 @@
1
1
  // oxlint-disable no-console
2
2
  import chalk from 'chalk'
3
3
 
4
- /** @internal */
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
- /** @internal */
13
+ /** @alpha */
14
14
  export function createLogger(): Logger {
15
15
  return {
16
16
  log: (...args) => {
@@ -78,7 +78,7 @@ export interface StrictOptions {
78
78
  alwaysPackageJsonFiles?: ToggleType
79
79
  }
80
80
 
81
- /** @internal */
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
- /** @internal */
11
+ /** @alpha */
12
12
  export function getExtractMessagesConfig(options: {
13
13
  rules: NonNullable<PkgConfigOptions['extract']>['rules']
14
14
  }): IExtractorMessagesConfig {
@@ -1,4 +1,4 @@
1
- import type { RollupWatcherEvent } from 'rollup'
1
+ import type {RollupWatcherEvent} from 'rollup'
2
2
  import type {Observable} from 'rxjs'
3
3
  import type {PkgRuntime} from '../core/config/types'
4
4
  import type {BuildContext} from '../core/contexts/buildContext'