@sanity/pkg-utils 1.0.1 → 1.1.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": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "author": "Sanity.io <hello@sanity.io>",
5
5
  "license": "MIT",
6
6
  "description": "Simple utilities for modern npm packages.",
@@ -13,7 +13,6 @@ import {_createTSDocConfig} from './_createTSDocConfig'
13
13
  export async function _extractTypes(options: {
14
14
  cwd: string
15
15
  distPath: string
16
- // exportId: string
17
16
  exportPath: string
18
17
  files: _BuildFile[]
19
18
  projectPath: string
@@ -27,16 +27,15 @@ export interface _DtsTask {
27
27
  export async function _dtsTask(ctx: _BuildContext, task: _DtsTask): Promise<void> {
28
28
  const {cwd, dist, files, tsconfig} = ctx
29
29
  const exportPath = task.exportPath === '.' ? './index' : task.exportPath
30
+ const distPath = path.resolve(cwd, dist)
31
+ const tmpPath = path.resolve(cwd, dist, 'tmp')
32
+ const tsconfigPath = path.resolve(cwd, tsconfig || 'tsconfig.json')
30
33
 
31
34
  console.log('=================================================================================')
32
35
  console.log(chalk.gray('task '), 'd.ts')
33
36
  console.log(chalk.gray('source '), path.join('', task.source))
34
37
  console.log(chalk.gray('export '), path.join(dist, `${exportPath}.d.ts`))
35
-
36
- const distPath = path.resolve(cwd, dist)
37
- const tmpPath = path.resolve(cwd, dist, 'tmp')
38
-
39
- const tsconfigPath = path.resolve(cwd, tsconfig || 'tsconfig.json')
38
+ console.log(chalk.gray('tsconfig '), path.relative(cwd, tsconfigPath))
40
39
 
41
40
  const types = await _buildTypes({
42
41
  cwd,