@sanity/pkg-utils 5.1.1 → 5.1.3-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/README.md +1 -1
- package/dist/_chunks-cjs/build.cjs +33 -12
- package/dist/_chunks-cjs/build.cjs.map +1 -1
- package/dist/_chunks-cjs/check.cjs +1 -1
- package/dist/_chunks-cjs/check.cjs.map +1 -1
- package/dist/_chunks-cjs/consoleSpy.cjs +57 -23
- package/dist/_chunks-cjs/consoleSpy.cjs.map +1 -1
- package/dist/_chunks-cjs/index.cjs +76 -31
- package/dist/_chunks-cjs/index.cjs.map +1 -1
- package/dist/_chunks-cjs/watch.cjs +4 -4
- package/dist/_chunks-cjs/watch.cjs.map +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -7
- package/dist/index.d.ts +27 -7
- package/dist/index.js +160 -62
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/node/build.ts +3 -2
- package/src/node/check.ts +4 -4
- package/src/node/core/pkg/loadPkgWithReporting.ts +9 -1
- package/src/node/core/pkg/parseExports.ts +35 -10
- package/src/node/core/pkg/pkgExt.ts +12 -17
- package/src/node/core/pkg/validateExports.ts +4 -3
- package/src/node/resolveBuildContext.ts +6 -1
- package/src/node/resolveBuildTasks.ts +49 -7
- package/src/node/tasks/dts/buildTypes.ts +5 -1
- package/src/node/tasks/dts/getTargetPaths.ts +6 -2
- package/src/node/tasks/index.ts +3 -2
- package/src/node/tasks/rollup/index.ts +1 -0
- package/src/node/tasks/rollup/resolveRollupConfig.ts +26 -26
- package/src/node/tasks/rollup/rollupLegacyTask.ts +144 -0
- package/src/node/tasks/rollup/rollupTask.ts +2 -2
- package/src/node/tasks/types.ts +16 -5
- package/src/node/watch.ts +3 -3
package/src/node/watch.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {getPkgExtMap, loadConfig, loadPkgWithReporting} from './core'
|
|
|
5
5
|
import {createLogger} from './logger'
|
|
6
6
|
import {resolveBuildContext} from './resolveBuildContext'
|
|
7
7
|
import {resolveWatchTasks} from './resolveWatchTasks'
|
|
8
|
-
import {TaskHandler, WatchTask, watchTaskHandlers} from './tasks'
|
|
8
|
+
import {type TaskHandler, type WatchTask, watchTaskHandlers} from './tasks'
|
|
9
9
|
import {watchConfigFiles} from './watchConfigFiles'
|
|
10
10
|
|
|
11
11
|
/** @public */
|
|
@@ -30,9 +30,9 @@ export async function watch(options: {
|
|
|
30
30
|
throw new Error('missing package.json')
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const pkg = await loadPkgWithReporting({cwd, logger})
|
|
33
|
+
const pkg = await loadPkgWithReporting({cwd, logger, strict})
|
|
34
34
|
const config = await loadConfig({cwd})
|
|
35
|
-
const extMap = getPkgExtMap(
|
|
35
|
+
const extMap = getPkgExtMap()
|
|
36
36
|
const tsconfig = tsconfigOption || config?.tsconfig || 'tsconfig.json'
|
|
37
37
|
|
|
38
38
|
return resolveBuildContext({config, cwd, extMap, logger, pkg, strict, tsconfig})
|