@sanity/pkg-utils 6.13.3-canary.0 → 6.13.3-canary.1

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": "6.13.3-canary.0",
3
+ "version": "6.13.3-canary.1",
4
4
  "description": "Simple utilities for modern npm packages.",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -146,7 +146,7 @@
146
146
  "typescript": "5.7.2",
147
147
  "vitest": "^2.1.8",
148
148
  "vitest-github-actions-reporter": "^0.11.1",
149
- "@sanity/pkg-utils": "6.13.3-canary.0"
149
+ "@sanity/pkg-utils": "6.13.3-canary.1"
150
150
  },
151
151
  "peerDependencies": {
152
152
  "babel-plugin-react-compiler": "*",
@@ -25,9 +25,6 @@ export function createApiExtractorConfig(options: {
25
25
  tsconfig,
26
26
  tsconfigPath,
27
27
  } = options
28
-
29
- // When the module is 'preserve' it's necessary to override the tsconfig file as api-extractor doesn't handle it out of the box
30
- const workaroundModulePreserve = tsconfig.options.module === ts.ModuleKind.Preserve
31
28
  // If `paths` are used for self-referencing imports (e.g. the module is named `sanity`, and the `sanity/structure` export is also importing from `sanity/router`),
32
29
  const workaroundPaths = !!tsconfig.options.paths
33
30
 
@@ -36,17 +33,6 @@ export function createApiExtractorConfig(options: {
36
33
  compilerOptions: {},
37
34
  }
38
35
 
39
- if (workaroundModulePreserve) {
40
- Object.assign(overrideTsconfig.compilerOptions, {
41
- // Set the equivalent options to `module: 'Preserve'`
42
- // https://github.com/microsoft/TypeScript/pull/56785/files?file-filters%5B%5D=.js&file-filters%5B%5D=.json&file-filters%5B%5D=.symbols&file-filters%5B%5D=.ts&file-filters%5B%5D=.types&show-viewed-files=true#diff-31d3c12bafea26bc9e8c8a77920c41af0c593206442add70c45a06c063767445
43
- module: 'ESNext',
44
- moduleResolution: 'Bundler',
45
- esModuleInterop: true,
46
- resolveJsonModule: true,
47
- })
48
- }
49
-
50
36
  if (workaroundPaths) {
51
37
  Object.assign(overrideTsconfig.compilerOptions, {
52
38
  // An empty object replaces whatever is in the original tsconfig file
@@ -60,10 +46,7 @@ export function createApiExtractorConfig(options: {
60
46
  reportFileName: '<unscopedPackageName>.api.md',
61
47
  },
62
48
  bundledPackages,
63
- compiler:
64
- workaroundModulePreserve || workaroundPaths
65
- ? {overrideTsconfig}
66
- : {tsconfigFilePath: tsconfigPath},
49
+ compiler: workaroundPaths ? {overrideTsconfig} : {tsconfigFilePath: tsconfigPath},
67
50
 
68
51
  docModel: {
69
52
  enabled: false,