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

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.1",
3
+ "version": "6.13.3-canary.4",
4
4
  "description": "Simple utilities for modern npm packages.",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -145,8 +145,7 @@
145
145
  "ts-node": "^10.9.2",
146
146
  "typescript": "5.7.2",
147
147
  "vitest": "^2.1.8",
148
- "vitest-github-actions-reporter": "^0.11.1",
149
- "@sanity/pkg-utils": "6.13.3-canary.1"
148
+ "@sanity/pkg-utils": "6.13.3-canary.4"
150
149
  },
151
150
  "peerDependencies": {
152
151
  "babel-plugin-react-compiler": "*",
@@ -176,7 +175,7 @@
176
175
  "playground:build": "pnpm --filter './playground/**' build",
177
176
  "playground:clean": "pnpm --filter './playground/**' --silent clean",
178
177
  "pretest": "run-s playground:clean",
179
- "test": "vitest",
178
+ "test": "vitest run",
180
179
  "test:update-snapshots": "pnpm test run -- --update",
181
180
  "watch": "node -r esbuild-register scripts/watch"
182
181
  }
@@ -222,6 +222,9 @@ export interface PkgConfigOptions {
222
222
  bundledPackages?: PkgConfigProperty<string[]>
223
223
  customTags?: TSDocCustomTag[]
224
224
  rules?: {
225
+ /**
226
+ * @deprecated no longer needed since TypeScript 5.5 https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#consulting-package.json-dependencies-for-declaration-file-generation
227
+ */
225
228
  'ae-forgotten-export'?: PkgRuleLevel
226
229
  'ae-incompatible-release-tags'?: PkgRuleLevel
227
230
  'ae-internal-missing-underscore'?: PkgRuleLevel
@@ -25,20 +25,6 @@ export function createApiExtractorConfig(options: {
25
25
  tsconfig,
26
26
  tsconfigPath,
27
27
  } = options
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`),
29
- const workaroundPaths = !!tsconfig.options.paths
30
-
31
- const overrideTsconfig = {
32
- extends: tsconfigPath,
33
- compilerOptions: {},
34
- }
35
-
36
- if (workaroundPaths) {
37
- Object.assign(overrideTsconfig.compilerOptions, {
38
- // An empty object replaces whatever is in the original tsconfig file
39
- paths: {},
40
- })
41
- }
42
28
 
43
29
  return {
44
30
  apiReport: {
@@ -46,7 +32,18 @@ export function createApiExtractorConfig(options: {
46
32
  reportFileName: '<unscopedPackageName>.api.md',
47
33
  },
48
34
  bundledPackages,
49
- compiler: workaroundPaths ? {overrideTsconfig} : {tsconfigFilePath: tsconfigPath},
35
+ // 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`),
36
+ compiler: tsconfig.options.paths
37
+ ? {
38
+ overrideTsconfig: {
39
+ extends: tsconfigPath,
40
+ compilerOptions: {
41
+ // An empty object replaces whatever is in the original tsconfig file
42
+ paths: {},
43
+ },
44
+ },
45
+ }
46
+ : {tsconfigFilePath: tsconfigPath},
50
47
 
51
48
  docModel: {
52
49
  enabled: false,
@@ -38,7 +38,7 @@ export function getExtractMessagesConfig(options: {
38
38
  },
39
39
 
40
40
  'ae-forgotten-export': {
41
- logLevel: ruleToLogLevel('ae-forgotten-export', 'error' as ExtractorLogLevel),
41
+ logLevel: ruleToLogLevel('ae-forgotten-export', 'none' as ExtractorLogLevel),
42
42
  addToApiReportFile: false,
43
43
  },
44
44