svelte-docinfo 0.13.0 → 0.15.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.
Files changed (54) hide show
  1. package/LICENSE +10 -17
  2. package/README.md +52 -46
  3. package/dist/analyze-core.d.ts +17 -7
  4. package/dist/analyze-core.d.ts.map +1 -1
  5. package/dist/analyze-core.js +18 -9
  6. package/dist/cli.d.ts +2 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +21 -6
  9. package/dist/declaration-build.d.ts +6 -4
  10. package/dist/declaration-build.d.ts.map +1 -1
  11. package/dist/diagnostics.d.ts +38 -7
  12. package/dist/diagnostics.d.ts.map +1 -1
  13. package/dist/diagnostics.js +32 -6
  14. package/dist/postprocess.d.ts +8 -7
  15. package/dist/postprocess.d.ts.map +1 -1
  16. package/dist/postprocess.js +5 -3
  17. package/dist/session.d.ts.map +1 -1
  18. package/dist/session.js +1 -0
  19. package/dist/svelte-scripts.d.ts +12 -0
  20. package/dist/svelte-scripts.d.ts.map +1 -1
  21. package/dist/svelte-scripts.js +23 -0
  22. package/dist/svelte.d.ts +16 -7
  23. package/dist/svelte.d.ts.map +1 -1
  24. package/dist/svelte.js +136 -82
  25. package/dist/tsdoc.d.ts +55 -3
  26. package/dist/tsdoc.d.ts.map +1 -1
  27. package/dist/tsdoc.js +176 -10
  28. package/dist/types.d.ts +91 -37
  29. package/dist/types.d.ts.map +1 -1
  30. package/dist/types.js +45 -12
  31. package/dist/typescript-exports.d.ts +32 -19
  32. package/dist/typescript-exports.d.ts.map +1 -1
  33. package/dist/typescript-exports.js +381 -140
  34. package/dist/typescript-extract-class.d.ts +2 -0
  35. package/dist/typescript-extract-class.d.ts.map +1 -1
  36. package/dist/typescript-extract-class.js +2 -0
  37. package/dist/typescript-extract-function.d.ts +2 -0
  38. package/dist/typescript-extract-function.d.ts.map +1 -1
  39. package/dist/typescript-extract-function.js +2 -0
  40. package/dist/typescript-extract-shared.d.ts +31 -3
  41. package/dist/typescript-extract-shared.d.ts.map +1 -1
  42. package/dist/typescript-extract-shared.js +20 -5
  43. package/dist/typescript-extract-type-json.d.ts +3 -1
  44. package/dist/typescript-extract-type-json.d.ts.map +1 -1
  45. package/dist/typescript-extract-type-json.js +90 -19
  46. package/dist/typescript-extract-type-properties.d.ts +2 -0
  47. package/dist/typescript-extract-type-properties.d.ts.map +1 -1
  48. package/dist/typescript-extract-type-properties.js +2 -0
  49. package/dist/typescript-extract-type.d.ts +2 -0
  50. package/dist/typescript-extract-type.d.ts.map +1 -1
  51. package/dist/typescript-extract-type.js +2 -0
  52. package/dist/typescript-program.d.ts +1 -1
  53. package/dist/typescript-program.js +1 -1
  54. package/package.json +10 -9
package/LICENSE CHANGED
@@ -1,21 +1,14 @@
1
- MIT License
1
+ BSD Zero Clause License
2
2
 
3
3
  Copyright (c) fuz.dev
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission to use, copy, modify, and/or distribute this software for
6
+ any purpose with or without fee is hereby granted.
11
7
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
8
+ THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
9
+ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
10
+ OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
11
+ FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
12
+ DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
13
+ AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
14
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -18,8 +18,8 @@ in the [npm package](https://www.npmjs.com/package/svelte-docinfo).
18
18
  npm i -D svelte-docinfo
19
19
  ```
20
20
 
21
- Peer dependencies: `svelte` 5+, `svelte2tsx`, and `typescript` 5.9+ or 6 (npm 7+
22
- installs them automatically), plus an optional `vite` 6+ for the Vite plugin.
21
+ Peer dependencies: `svelte` 5+, `svelte2tsx`, and `typescript` 5.9+ or 6,
22
+ plus an optional `vite` 6+ for the Vite plugin.
23
23
 
24
24
  - [Quick start](#quick-start)
25
25
  - [Vite plugin](#vite-plugin)
@@ -28,6 +28,7 @@ installs them automatically), plus an optional `vite` 6+ for the Vite plugin.
28
28
  - [Features](#features)
29
29
  - [Documentation](#documentation)
30
30
  - [Credits](#credits)
31
+ - [Contributing](#contributing)
31
32
  - [License](#license)
32
33
 
33
34
  svelte-docinfo is largely inspired by [`sveld`](https://github.com/carbon-design-system/sveld),
@@ -53,23 +54,24 @@ which was more limited, lacking the fancy TS compiler usage, and grew slowly ove
53
54
 
54
55
  ## Quick start
55
56
 
56
- Given a project with a `tsconfig.json` (at or above the project root) and a couple of files in `src/lib/`:
57
+ Given a project with a `tsconfig.json` (at or above the project root) and two files,
58
+ `src/lib/math.ts`:
57
59
 
58
60
  ```ts
59
- // src/lib/math.ts
60
-
61
61
  /**
62
62
  * Add two numbers.
63
63
  * @param a - first number
64
64
  * @param b - second number
65
65
  * @returns the sum
66
66
  */
67
- export const add = (a: number, b: number): number => a + b;
67
+ export function add(a: number, b: number): number {
68
+ return a + b;
69
+ }
68
70
  ```
69
71
 
70
- ```svelte
71
- <!-- src/lib/Calculator.svelte -->
72
+ and `src/lib/Calculator.svelte`:
72
73
 
74
+ ```svelte
73
75
  <!--
74
76
  @component
75
77
  Calculator component for demonstrating Svelte analysis.
@@ -96,6 +98,8 @@ Three ways to integrate `svelte-docinfo`:
96
98
 
97
99
  ```ts
98
100
  // vite.config.ts
101
+ import { defineConfig } from 'vite';
102
+ import { sveltekit } from '@sveltejs/kit/vite';
99
103
  import svelteDocinfo from 'svelte-docinfo/vite.js';
100
104
 
101
105
  export default defineConfig({ plugins: [sveltekit(), svelteDocinfo()] });
@@ -117,7 +121,8 @@ import { analyzeFromFiles } from 'svelte-docinfo';
117
121
  const { modules } = await analyzeFromFiles({ projectRoot: process.cwd() });
118
122
  ```
119
123
 
120
- All three produce the same JSON shape:
124
+ All three produce the same `AnalyzeResultJson` data. The CLI emits it compacted, as shown
125
+ here (the Vite module compacts `modules` only); the API returns it with defaults filled in:
121
126
 
122
127
  ```json
123
128
  {
@@ -186,9 +191,9 @@ All three produce the same JSON shape:
186
191
  }
187
192
  ```
188
193
 
189
- Defaulted fields are left out of the JSON: empty arrays and `false` flags. To restore them
190
- and validate the shape, parse it with `parseAnalyzeResult` (`parseModuleJson` for one module,
191
- `parseDiagnostics` for diagnostics alone):
194
+ The compact form leaves out defaulted fields: empty arrays (like `diagnostics` here) and
195
+ `false` flags. To restore them and validate the shape, parse it with `parseAnalyzeResult`
196
+ (`parseModuleJson` for one module, `parseDiagnostics` for diagnostics alone):
192
197
 
193
198
  ```ts
194
199
  import { parseAnalyzeResult } from 'svelte-docinfo';
@@ -245,19 +250,19 @@ Plugin options:
245
250
  | `resolveDependencies` | `true` | Resolve import dependencies. When `false`, `dependencies`/`dependents` stay empty. |
246
251
  | `hmrDebounceMs` | `100` | Dev re-analysis debounce delay in milliseconds. |
247
252
  | `onDuplicates` | — | Opt-in check that names are unique across modules, for packages with a flat export namespace: `'diagnostic'` \| `'warn'` \| `'throw'`. Off by default. |
248
- | `tsconfig` | `'tsconfig.json'` | Path to the tsconfig, relative to `projectRoot`, or `false` to analyze without one (built-in strict options, with `compilerOptions` merged on top). |
253
+ | `tsconfig` | `'tsconfig.json'` | Path to the tsconfig, relative to `projectRoot` and searched upward from it, or `false` to analyze without one (built-in strict options, with `compilerOptions` merged on top). |
249
254
  | `compilerOptions` | — | Compiler options merged over the tsconfig's, per key. |
250
255
  | `rootFileNames` | the tsconfig's roots | The program's root files in place of the tsconfig's: a list, or a function over the tsconfig's roots (`declarationFileRoots`, from `svelte-docinfo/typescript-program.js`, keeps the declaration files). Narrowing speeds up cold analysis; an ambient type declared in a dropped root resolves to `any`. |
251
256
 
252
257
  Source-scope notes (shared with the [CLI](#cli) and `analyzeFromFiles`):
253
258
 
254
- - Explicit `include` patterns **widen the source scope**: each pattern's static base joins `sourceOptions.sourcePaths`, so include-discovered files emit modules (with paths relative to the widened set's common root) and the dev-mode watcher tracks them. A pattern with no base (`'**/*.ts'`, a literal root file) scopes the whole project root as source and logs an info line naming it.
255
- - An **always-on baseline** applies beneath any `exclude`: `node_modules` and dot-directories below a matched source path are never source. It's matched relative to the matched source path — an explicit dot-directory source path (`sourcePaths: ['.hidden/src']`) still works — and is independent of `exclude` overrides. `dist`/`build`/`coverage` are ordinary names and stay in.
256
- - The **`src/lib/internal/` convention**: `internal/` directories are excluded by default (the `**/internal/**` default pattern) — internal modules ship in the package for public modules to import but aren't documented. Packages typically pair the directory with an `"./internal/*": null` package.json exports entry blocking consumer imports; exports-based discovery honors null-target keys with Node's best-match resolution semantics, so blocked subpaths are never discovered. Internal modules stay live in dev: the analysis session owns them as watched context files, so editing an internal type re-analyzes the public modules that use it. A public re-export of an internal symbol (`export { x } from './internal/helper.js'`) documents at the re-export site as a full synthesized declaration. Re-include internal modules wholesale with the exclude callback: `exclude: (defaults) => defaults.filter((p) => p !== '**/internal/**')`.
257
- - Paths and patterns resolve against `projectRoot`: absolute entries inside the root are accepted (stored root-relative), and anything resolving outside the root **throws** at options creation instead of silently emitting nothing — a root-anchored `'/src/lib'` is filesystem-absolute, not shorthand for `'src/lib'`.
259
+ - `include` **widens the source scope**: each pattern's static base joins `sourceOptions.sourcePaths`, so the files it finds emit modules (with paths relative to the widened set's common root) and the dev watcher tracks them. A pattern with no base (`'**/*.ts'`, a literal root file) makes the whole project root source and logs an info line.
260
+ - Beneath any `exclude`, `node_modules` and dot-directories below a source path are never source. The rule is relative to the source path, so an explicit dot-directory source path (`sourcePaths: ['.hidden/src']`) still works. `dist`, `build`, and `coverage` are ordinary names.
261
+ - **`src/lib/internal/`** holds modules that ship for public modules to import but aren't documented, excluded by the default `**/internal/**` pattern. Packages typically block consumer imports with an `"./internal/*": null` exports entry, which exports discovery honors with Node's best-match semantics. Internal modules stay live in dev: editing one re-analyzes the public modules that use it. A public re-export of an internal symbol documents as a full declaration at the re-export site. To document them anyway: `exclude: (defaults) => defaults.filter((p) => p !== '**/internal/**')`.
262
+ - Paths and patterns resolve against `projectRoot`. Absolute entries inside the root are accepted, and anything outside it **throws** at options creation instead of silently emitting nothing. `'/src/lib'` is filesystem-absolute, not shorthand for `'src/lib'`.
258
263
 
259
264
  The options interface is `VitePluginSvelteDocinfoOptions` from `svelte-docinfo/vite.js` (not re-exported from the main barrel).
260
- See the [docs site](https://svelte-docinfo.fuz.dev/) and [examples/vite/](examples/vite/README.md) for more.
265
+ See the [Vite plugin docs](https://svelte-docinfo.fuz.dev/docs/vite-plugin) and [examples/vite/](examples/vite/README.md) for more.
261
266
 
262
267
  > If TypeScript reports `Cannot find module 'virtual:svelte-docinfo'`, ensure the `/// <reference>` line is in your `app.d.ts`.
263
268
 
@@ -297,18 +302,20 @@ All CLI options:
297
302
  | `--only <pattern>` | Glob filter applied to module paths in output (repeatable). Full project is still analyzed (re-exports/dependents stay correct); diagnostics aren't filtered |
298
303
  | `--no-resolve-dependencies` | Disable dependency resolution |
299
304
  | `--pretty` | Pretty-print JSON output (default: compact) |
300
- | `--tsconfig <path>` | Path to the tsconfig, relative to project root (default: `tsconfig.json`, searched upward from project root) |
305
+ | `--tsconfig <path>` | Path to the tsconfig, relative to project root and searched upward from it (default: `tsconfig.json`) |
301
306
  | `--no-tsconfig` | Analyze without a tsconfig, using built-in strict compiler options |
302
307
  | `-q, --quiet` | Suppress info messages on stderr (warnings and errors still print) |
303
308
  | `--on-duplicates <mode>` | Opt-in check that names are unique across modules, for packages with a flat export namespace: `diagnostic` \| `warn` \| `throw` (default: off) |
304
309
  | `-V, --version` | Show version number |
310
+ | `-h, --help` | Show help |
305
311
 
306
- The [Vite plugin](#vite-plugin)'s source-scope notes apply here too: explicit `--include` patterns widen the source scope (module paths become relative to the widened root, and a pattern with no base scopes the whole project root and logs an info line); `node_modules` and dot-directories below a source dir are always excluded regardless of `--exclude`; absolute paths and patterns inside the project root are accepted, and out-of-root ones fail loudly.
312
+ The [Vite plugin](#vite-plugin)'s source-scope notes apply here too, with `--include`, `--exclude`, and `--source-dir` in place of the options. `--exclude` always replaces the defaults (there's no callback form), so to document `internal/`, re-list the others: `-e '**/*.test.ts' -e '**/*.spec.ts'`.
307
313
 
308
- Exit codes: 0 (success), 1 (analysis errors), 2 (CLI errors or a thrown analysis error, like a
309
- missing or unloadable `tsconfig.json`).
314
+ Exit codes: 0 (success), 1 (analysis errors), 2 (a usage error, like an unknown flag or a
315
+ missing or invalid option value, or a thrown analysis error, like a missing or unloadable
316
+ `tsconfig.json`).
310
317
 
311
- See [examples/cli/](examples/cli/README.md) for more usage patterns.
318
+ See the [CLI docs](https://svelte-docinfo.fuz.dev/docs/cli) and [examples/cli/](examples/cli/README.md) for more.
312
319
 
313
320
  ## API
314
321
 
@@ -338,7 +345,8 @@ For just the discovery step (without running analysis), use
338
345
 
339
346
  For long-lived consumers (a Vite plugin reacting to file edits, an LSP-style tool),
340
347
  `createAnalysisSession` returns a persistent handle that reuses parsed ASTs across calls
341
- — see [examples/api/analyze-session.js](examples/api/analyze-session.js).
348
+ — see the [session docs](https://svelte-docinfo.fuz.dev/docs/session) and
349
+ [examples/api/analyze-session.js](examples/api/analyze-session.js).
342
350
 
343
351
  See [examples/api/](examples/api/README.md) for more patterns
344
352
  including custom discovery, diagnostics, sessions, and error handling.
@@ -349,30 +357,28 @@ See the [API docs](https://svelte-docinfo.fuz.dev/docs/api) for the full referen
349
357
 
350
358
  ## Features
351
359
 
352
- - **Full type resolution**: infers complex types without manual annotations, including generics, imported types, and inferred return types
353
- - **Structured types**: an optional `typeInfo` tree (`TypeJson`) beside the flat type strings on props, parameters, return types (`returnTypeInfo`, overloads included), members, and variable/type declarations — union and intersection members (alias names kept), reference type arguments, and array/tuple elements, so a union alias documents more than its own name. Absent wherever the flat string already says everything; `typeJsonToTokens`/`typeJsonToText` render it
354
- - **TSDoc/JSDoc parsing**: the common doc tags (`@param`, `@returns`, `@throws`, `@example`, `@deprecated`, `@internal`, `@see`, `@since`, `@default`) plus `@nodocs`, `@mutates`, and `@module` for file-level comments; divergent spellings parse as synonyms (`@return`, `@defaultValue`). `@internal` marks unstable API (`internalMessage`) but stays documented — `@nodocs` is the exclusion. Dotted `@param obj.prop` tags fill `propertyDescriptions`, and inline `{@link}` survives in extracted text
355
- - **Alias-lost name recovery**: TypeScript drops the name of an alias over an indexed access or conditional (`type Foo = z.infer<typeof S>`, or valibot's `v.InferOutput<typeof S>`) and expands its structure at every use. `typeInfo` recovers it as `{kind: 'reference', name}`, from the written annotation where there is one and otherwise from a registry of the project's exported aliases (those references also carry `module` for exact linking). Losses nothing recovers surface as `alias_lost` warnings
356
- - **Merged value+type symbols**: `export const Foo = z.strictObject({...})` + `export type Foo = z.infer<typeof Foo>` documents the type meaning (structure and members), with `mergedValue: true` marking the name as also a runtime value; JSDoc falls back to the const's docs, and `generateImport` emits a value import
357
- - **Svelte 5 component props**: extracts prop types, descriptions, defaults, and bindability via svelte2tsx, in source order (destructured external props follow, in destructuring order); generic components carry `genericParams`, and JS components (no `lang="ts"`) are supported — props come from the JSDoc `@type` on `$props()` or are inferred from untyped destructuring
358
- - **External types**: props and members contributed by external packages (e.g. `HTMLButtonAttributes`) are filtered out and named in `externalTypes` — on components, type aliases, interfaces, and classes, including bags reached through local base types. A component prop named in the `$props()` destructuring (`let {type = 'button', ...rest} = $props()`) is documented anyway, since the component handles it
359
- - **Svelte 5 snippets**: `kind: 'snippet'` for template snippets (with structured parameters), `acceptsChildren` on components
360
- - **Svelte 5 reactivity runes**: detects `$state`, `$state.raw`, `$derived`, `$derived.by` on variables and class fields (`reactivity` field) — syntactic detection, surfaces wherever the rune pattern appears
361
- - **Class members**: public + protected fields, methods, constructors, getters/setters, generics; private (`private` and `#field`) excluded
362
- - **Enums**: regular and const, with member values and per-member JSDoc
363
- - **Function overloads**: all public overload signatures with per-overload JSDoc
364
- - **Dependency graphs**: tracks imports between modules and computes dependents
365
- - **Re-export tracking**: `alsoExportedFrom` arrays on canonical declarations plus the forward view `ModuleJson.reExports` (so barrels are self-describing), `aliasOf` for renames, `starExports` for `export * from './x'`, and `externalReExports`/`externalStarExports` for direct re-exports from packages — with `resolveExportSurface()` to combine them all into a module's full export surface using ES star semantics
366
- - **Namespace re-exports**: `export * as ns from './x'` synthesized as `kind: 'namespace'`
367
- - **Source locations**: file and line for every declaration
368
- - **Build-tool agnostic**: works with any source: file system, build pipeline, or in-memory
369
- - **Diagnostic collection**: accumulates warnings and errors without halting; `partial: true` flags incomplete declarations
360
+ - **Full type resolution**: generics, imported types, and inferred return types, without manual annotations
361
+ - **Structured types**: an optional `typeInfo` tree (`TypeJson`) beside the flat type strings, with union and intersection members (alias names kept), type arguments, and array/tuple elements. Absent where the flat string says everything; `typeJsonToTokens`/`typeJsonToText` render it
362
+ - **Alias-lost name recovery**: TypeScript drops the name of an alias over an indexed access or conditional (`z.infer<typeof S>`, valibot's `v.InferOutput<typeof S>`) and expands it at every use. `typeInfo` recovers it as `{kind: 'reference', name}`, from the written annotation or from a registry of the project's exported aliases. Losses nothing recovers surface as `alias_lost` warnings
363
+ - **TSDoc/JSDoc**: `@param`, `@returns`, `@throws`, `@example`, `@deprecated`, `@internal`, `@see`, `@since`, `@default`, `@module`, plus the custom `@nodocs` (exclude from docs) and `@mutates`; `@return` and `@defaultValue` parse as synonyms. `@internal` is a marker (`internalMessage`), not an exclusion. Inline `{@link}` survives in the text
364
+ - **Merged value+type symbols**: `const Foo = z.strictObject({...})` + `type Foo = z.infer<typeof Foo>` documents the type, with `mergedValue: true` marking the name as also a runtime value; JSDoc falls back to the const's
365
+ - **Svelte 5 components**: prop types, descriptions, defaults, bindability, and callback signatures via svelte2tsx, plus generics and `acceptsChildren`. JS components take props from the JSDoc `@type` on `$props()` or infer them from the destructuring
366
+ - **External types**: props and members from external packages (`HTMLButtonAttributes`) are filtered out and named in `externalTypes` (on components, type aliases, interfaces, and classes, including bags reached through local base types), unless the `$props()` destructuring names them
367
+ - **Svelte 5 snippets**: `kind: 'snippet'` for snippets exported from `<script module>`, with structured parameters
368
+ - **Runes**: `$state`, `$state.raw`, `$derived`, and `$derived.by` on variables and class fields (`reactivity`), detected syntactically in any file
369
+ - **Classes, enums, and overloads**: public and protected class members (`private` and `#` excluded), regular and const enums with member values, and every public overload signature with its own JSDoc
370
+ - **Re-exports**: `alsoExportedFrom` on canonical declarations and `ModuleJson.reExports` on barrels, `aliasOf` for renames, `starExports`, `kind: 'namespace'` for `export * as ns`, and external re-exports, with `resolveExportSurface()` combining them using ES star semantics
371
+ - **Dependency graphs**: imports between modules and the computed dependents
372
+ - **Source locations**: the source line of every declaration
373
+ - **Build-tool agnostic**: files can come from disk, a build pipeline, or memory
374
+ - **Diagnostics**: warnings and errors accumulate without halting; `partial: true` flags incomplete declarations
370
375
 
371
376
  Known gaps:
372
377
 
373
- - context tracking (transitive detection of common patterns seems tractable)
374
- - standalone `namespace Foo {}` declarations and decorators are not yet supported
375
- - legacy `export let` components document their props (all `bindable`), and a legacy component's default `<slot />` sets `acceptsChildren`, but named slots, slot props, events, and `$$restProps` aren't modeled — Svelte 5 snippets and callback props replace most of them
378
+ - Svelte context (`setContext`/`getContext`) isn't captured yet; investigation is planned, and
379
+ a [request](https://github.com/fuzdev/svelte-docinfo/discussions) would bump its priority
380
+ - standalone `namespace Foo {}` declarations document as a bare variable with no members, and decorators aren't modeled
381
+ - legacy `export let` components document their props (all `bindable`), and a legacy component's default `<slot />` sets `acceptsChildren` (a runes component's is ignored), but named slots, slot props, events, and `$$restProps` aren't modeled
376
382
  - `@nodocs` applies to declarations and export statements only; on a member or component prop it's ignored without a warning
377
383
 
378
384
  [Issues](https://github.com/fuzdev/svelte-docinfo/issues) for bugs and
@@ -408,4 +414,4 @@ see [package.json](package.json) for full dependencies.
408
414
 
409
415
  ## License
410
416
 
411
- [MIT](LICENSE)
417
+ [0BSD](LICENSE)
@@ -43,7 +43,7 @@ import { type SvelteVirtualFile } from './svelte.js';
43
43
  import { type SourceFileInfo } from './source.js';
44
44
  import { type ModuleSourceOptions } from './source-config.js';
45
45
  import type { AliasRegistry } from './typescript-extract-type-json.js';
46
- import { type IsEmittedFile } from './typescript-extract-shared.js';
46
+ import { type FileExists, type IsEmittedFile } from './typescript-extract-shared.js';
47
47
  /**
48
48
  * Opt-in check that declaration names are unique across modules.
49
49
  *
@@ -65,14 +65,14 @@ import { type IsEmittedFile } from './typescript-extract-shared.js';
65
65
  export type OnDuplicates = 'diagnostic' | 'warn' | 'throw';
66
66
  declare const AnalyzeResultJsonEntries: v.StrictObjectSchema<{
67
67
  readonly modules: v.OptionalSchema<v.ArraySchema<import("./types.js").ModuleJsonSchema, undefined>, () => never[]>;
68
- readonly diagnostics: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"kind", [import("./diagnostics.js").TypeExtractionDiagnosticSchema, import("./diagnostics.js").SignatureAnalysisDiagnosticSchema, import("./diagnostics.js").ClassMemberDiagnosticSchema, import("./diagnostics.js").SveltePropDiagnosticSchema, import("./diagnostics.js").ModuleSkippedDiagnosticSchema, import("./diagnostics.js").ModuleUnreadableDiagnosticSchema, import("./diagnostics.js").ImportParseDiagnosticSchema, import("./diagnostics.js").DuplicateCommentDiagnosticSchema, import("./diagnostics.js").MisplacedTagDiagnosticSchema, import("./diagnostics.js").UnknownParamDiagnosticSchema, import("./diagnostics.js").SourceMapFailedDiagnosticSchema, import("./diagnostics.js").DuplicateDeclarationDiagnosticSchema, import("./diagnostics.js").TransformFailedDiagnosticSchema, import("./diagnostics.js").ResolverFailedDiagnosticSchema, import("./diagnostics.js").AliasLostDiagnosticSchema], undefined>, undefined>, () => never[]>;
68
+ readonly diagnostics: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"kind", [import("./diagnostics.js").TypeExtractionDiagnosticSchema, import("./diagnostics.js").SignatureAnalysisDiagnosticSchema, import("./diagnostics.js").ClassMemberDiagnosticSchema, import("./diagnostics.js").SveltePropDiagnosticSchema, import("./diagnostics.js").ModuleSkippedDiagnosticSchema, import("./diagnostics.js").ModuleUnreadableDiagnosticSchema, import("./diagnostics.js").ImportParseDiagnosticSchema, import("./diagnostics.js").DuplicateCommentDiagnosticSchema, import("./diagnostics.js").ComponentCommentMismatchDiagnosticSchema, import("./diagnostics.js").MisplacedTagDiagnosticSchema, import("./diagnostics.js").UnknownParamDiagnosticSchema, import("./diagnostics.js").SourceMapFailedDiagnosticSchema, import("./diagnostics.js").DuplicateDeclarationDiagnosticSchema, import("./diagnostics.js").TransformFailedDiagnosticSchema, import("./diagnostics.js").ResolverFailedDiagnosticSchema, import("./diagnostics.js").AliasLostDiagnosticSchema], undefined>, undefined>, () => never[]>;
69
69
  }, undefined>;
70
70
  /** @nodocs */
71
71
  export interface AnalyzeResultJsonEntriesInput extends Named<v.InferInput<typeof AnalyzeResultJsonEntries>> {
72
72
  }
73
73
  declare const AnalyzeResultJsonImpl: v.SchemaWithPipe<readonly [v.CustomSchema<AnalyzeResultJsonEntriesInput, v.ErrorMessage<v.CustomIssue> | undefined>, v.StrictObjectSchema<{
74
74
  readonly modules: v.OptionalSchema<v.ArraySchema<import("./types.js").ModuleJsonSchema, undefined>, () => never[]>;
75
- readonly diagnostics: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"kind", [import("./diagnostics.js").TypeExtractionDiagnosticSchema, import("./diagnostics.js").SignatureAnalysisDiagnosticSchema, import("./diagnostics.js").ClassMemberDiagnosticSchema, import("./diagnostics.js").SveltePropDiagnosticSchema, import("./diagnostics.js").ModuleSkippedDiagnosticSchema, import("./diagnostics.js").ModuleUnreadableDiagnosticSchema, import("./diagnostics.js").ImportParseDiagnosticSchema, import("./diagnostics.js").DuplicateCommentDiagnosticSchema, import("./diagnostics.js").MisplacedTagDiagnosticSchema, import("./diagnostics.js").UnknownParamDiagnosticSchema, import("./diagnostics.js").SourceMapFailedDiagnosticSchema, import("./diagnostics.js").DuplicateDeclarationDiagnosticSchema, import("./diagnostics.js").TransformFailedDiagnosticSchema, import("./diagnostics.js").ResolverFailedDiagnosticSchema, import("./diagnostics.js").AliasLostDiagnosticSchema], undefined>, undefined>, () => never[]>;
75
+ readonly diagnostics: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"kind", [import("./diagnostics.js").TypeExtractionDiagnosticSchema, import("./diagnostics.js").SignatureAnalysisDiagnosticSchema, import("./diagnostics.js").ClassMemberDiagnosticSchema, import("./diagnostics.js").SveltePropDiagnosticSchema, import("./diagnostics.js").ModuleSkippedDiagnosticSchema, import("./diagnostics.js").ModuleUnreadableDiagnosticSchema, import("./diagnostics.js").ImportParseDiagnosticSchema, import("./diagnostics.js").DuplicateCommentDiagnosticSchema, import("./diagnostics.js").ComponentCommentMismatchDiagnosticSchema, import("./diagnostics.js").MisplacedTagDiagnosticSchema, import("./diagnostics.js").UnknownParamDiagnosticSchema, import("./diagnostics.js").SourceMapFailedDiagnosticSchema, import("./diagnostics.js").DuplicateDeclarationDiagnosticSchema, import("./diagnostics.js").TransformFailedDiagnosticSchema, import("./diagnostics.js").ResolverFailedDiagnosticSchema, import("./diagnostics.js").AliasLostDiagnosticSchema], undefined>, undefined>, () => never[]>;
76
76
  }, undefined>]>;
77
77
  /** @nodocs */
78
78
  export interface AnalyzeResultJsonSchema extends Named<typeof AnalyzeResultJsonImpl> {
@@ -175,14 +175,16 @@ export interface AnalyzeResultJsonWire {
175
175
  * modules themselves get written-name recovery only, while `analyzeCore`
176
176
  * passes the registry its pre-pass built (see `buildAliasRegistry`).
177
177
  * `isEmittedFile` likewise: `analyzeCore` answers from its emitted set, and a
178
- * direct caller falls back to `isSource` (see `IsEmittedFile`).
178
+ * direct caller falls back to `isSource` (see `IsEmittedFile`). `fileExists`
179
+ * too: `analyzeCore` sees its inputs' in-memory content, and a direct caller
180
+ * falls back to the disk (see `SvelteFileStatus`).
179
181
  *
180
182
  * @internal Importable from `svelte-docinfo/analyze-core.js` for tests and
181
183
  * power users; not stable API.
182
184
  */
183
185
  export declare const analyzeModule: (sourceFile: SourceFileInfo & {
184
186
  dependents?: ReadonlyArray<string>;
185
- }, program: ts.Program, options: ModuleSourceOptions, diagnostics: Array<Diagnostic>, log?: AnalysisLog, aliasRegistry?: AliasRegistry, isEmittedFile?: IsEmittedFile) => ModuleJson | undefined;
187
+ }, program: ts.Program, options: ModuleSourceOptions, diagnostics: Array<Diagnostic>, log?: AnalysisLog, aliasRegistry?: AliasRegistry, isEmittedFile?: IsEmittedFile, fileExists?: FileExists) => ModuleJson | undefined;
186
188
  /**
187
189
  * Inputs to `analyzeCore`. The caller (one-shot wrapper or session.query)
188
190
  * is responsible for normalizing `sourceOptions`, obtaining the program,
@@ -213,10 +215,18 @@ export interface AnalyzeCoreInputs {
213
215
  *
214
216
  * Resolution requires the component's virtual to exist — via the context
215
217
  * closure (`analyzeFromFiles` included) or by passing the file as `analyze()`
216
- * input. Without it a gated component re-export degrades silently to an
217
- * empty `kind: 'variable'` husk.
218
+ * input. Without it a gated component re-export documents as a `partial`
219
+ * component with nothing filled.
218
220
  */
219
221
  contextSvelteFiles?: ReadonlyArray<SourceFileInfo>;
222
+ /**
223
+ * Whether a path exists — owned in-memory content or disk. It tells a
224
+ * `.svelte` file with no svelte2tsx virtual from a mistyped specifier (see
225
+ * `SvelteFileStatus`). Defaults to the files handed in plus the disk; a
226
+ * session passes its whole owned set, which also holds files that emit
227
+ * nothing and aren't offered as context.
228
+ */
229
+ fileExists?: FileExists;
220
230
  onDuplicates?: OnDuplicates;
221
231
  log?: AnalysisLog;
222
232
  }
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-core.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/analyze-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAmB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAIN,KAAK,iBAAiB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGN,KAAK,cAAc,EAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,mBAAmB,EAAoC,MAAM,oBAAoB,CAAC;AAGhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAY1F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAqE3D,QAAA,MAAM,wBAAw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;;;;;;;;;GA2BG;AACH,eAAO,MAAM,wBAAwB,GACpC,aAAa,KAAK,CAAC,UAAU,CAAC,EAC9B,aAAa,MAAM,KACjB,IAuBF,CAAC;AAiPF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,2BAA2B,GACvC,SAAS,KAAK,CAAC,UAAU,CAAC,EAC1B,SAAS,mBAAmB,EAC5B,SAAS,EAAE,CAAC,OAAO,KACjB,IAKF,CAAC"}
@@ -40,6 +40,7 @@ import { ModuleJson, parseModuleJson } from './types.js';
40
40
  import { parseWithSummary } from './schema.js';
41
41
  import { Diagnostic } from './diagnostics.js';
42
42
  import { analyzeTypescriptModule } from './typescript-exports.js';
43
+ import { toModuleDocFields } from './tsdoc.js';
43
44
  import { analyzeSvelteModule, reclassifySnippetDeclaration, remapVirtualDiagnosticPositions } from './svelte.js';
44
45
  import { scrubVirtualSuffixes, stripVirtualSuffix, getComponentName } from './source.js';
45
46
  import { extractPath, extractDependencies } from './source-config.js';
@@ -186,7 +187,7 @@ const toModuleJson = (raw) => {
186
187
  reExports,
187
188
  externalReExports,
188
189
  externalStarExports: raw.externalStarExports,
189
- ...(raw.moduleComment ? { moduleComment: raw.moduleComment } : {})
190
+ ...toModuleDocFields(raw.moduleDoc)
190
191
  });
191
192
  };
192
193
  // Module dispatch
@@ -211,12 +212,14 @@ const toModuleJson = (raw) => {
211
212
  * modules themselves get written-name recovery only, while `analyzeCore`
212
213
  * passes the registry its pre-pass built (see `buildAliasRegistry`).
213
214
  * `isEmittedFile` likewise: `analyzeCore` answers from its emitted set, and a
214
- * direct caller falls back to `isSource` (see `IsEmittedFile`).
215
+ * direct caller falls back to `isSource` (see `IsEmittedFile`). `fileExists`
216
+ * too: `analyzeCore` sees its inputs' in-memory content, and a direct caller
217
+ * falls back to the disk (see `SvelteFileStatus`).
215
218
  *
216
219
  * @internal Importable from `svelte-docinfo/analyze-core.js` for tests and
217
220
  * power users; not stable API.
218
221
  */
219
- export const analyzeModule = (sourceFile, program, options, diagnostics, log, aliasRegistry, isEmittedFile) => {
222
+ export const analyzeModule = (sourceFile, program, options, diagnostics, log, aliasRegistry, isEmittedFile, fileExists) => {
220
223
  const checker = program.getTypeChecker();
221
224
  const modulePath = extractPath(sourceFile.id, options);
222
225
  // diagnostics carry the absolute id (see the `Diagnostic.file` schema doc);
@@ -254,7 +257,7 @@ export const analyzeModule = (sourceFile, program, options, diagnostics, log, al
254
257
  }
255
258
  // the pass-scoped extraction context — constructed here because the
256
259
  // dispatcher is where the program is in hand (see `analyzeExports`)
257
- const ctx = createExtractContext(program, checker, options, diagnostics, aliasRegistry, isEmittedFile);
260
+ const ctx = createExtractContext(program, checker, options, diagnostics, aliasRegistry, isEmittedFile, fileExists);
258
261
  raw = analyzeTypescriptModule(sourceFile, tsSourceFile, modulePath, ctx, options);
259
262
  // a TS module can't declare a snippet, but it can re-export one from a
260
263
  // component that emits nothing, and the synthesized alias is analyzed
@@ -297,7 +300,7 @@ export const analyzeModule = (sourceFile, program, options, diagnostics, log, al
297
300
  * entirely; analysis diagnostics are dropped — the canonical's `partial`
298
301
  * flag propagates through the fill, which is the emitted signal.
299
302
  */
300
- const analyzeContextComponents = (contextSvelteFiles, emittedModules, inputs, aliasRegistry, isEmittedFile) => {
303
+ const analyzeContextComponents = (contextSvelteFiles, emittedModules, inputs, aliasRegistry, isEmittedFile, fileExists) => {
301
304
  const { sourceOptions, program, svelteVirtualFiles } = inputs;
302
305
  const referenced = new Set();
303
306
  for (const mod of emittedModules) {
@@ -317,7 +320,7 @@ const analyzeContextComponents = (contextSvelteFiles, emittedModules, inputs, al
317
320
  if (!virtualFile)
318
321
  continue;
319
322
  const droppedDiagnostics = [];
320
- const raw = analyzeSvelteModule(sourceFile, modulePath, program.getTypeChecker(), sourceOptions, droppedDiagnostics, program, virtualFile, aliasRegistry, isEmittedFile);
323
+ const raw = analyzeSvelteModule(sourceFile, modulePath, program.getTypeChecker(), sourceOptions, droppedDiagnostics, program, virtualFile, aliasRegistry, isEmittedFile, fileExists);
321
324
  if (raw)
322
325
  contextModules.push(toModuleJson(raw));
323
326
  }
@@ -352,6 +355,12 @@ export const analyzeCore = (inputs) => {
352
355
  // link to from one they have to document in place.
353
356
  const emittedIds = new Set(sourceFiles.map((f) => toPosixPath(f.id)));
354
357
  const isEmittedFile = (file) => emittedIds.has(file);
358
+ // Existence for `SvelteFileStatus`: the caller's answer, else the files
359
+ // handed in (in-memory content counts) plus the disk.
360
+ const knownIds = new Set(emittedIds);
361
+ for (const f of contextSvelteFiles ?? [])
362
+ knownIds.add(toPosixPath(f.id));
363
+ const fileExists = inputs.fileExists ?? ((file) => knownIds.has(file) || ts.sys.fileExists(file));
355
364
  // Registry pre-pass: register the emitted set's exported lost aliases
356
365
  // before any extraction, so every `resolveTypeInfo` call this cycle can
357
366
  // consult a complete registry. Svelte modules are reached through their
@@ -416,7 +425,7 @@ export const analyzeCore = (inputs) => {
416
425
  const virtualFile = svelteVirtualFiles.get(sourceFile.id);
417
426
  if (virtualFile) {
418
427
  const modulePath = extractPath(sourceFile.id, sourceOptions);
419
- const raw = analyzeSvelteModule(sourceFile, modulePath, checker, sourceOptions, diagnostics, program, virtualFile, aliasRegistry, isEmittedFile);
428
+ const raw = analyzeSvelteModule(sourceFile, modulePath, checker, sourceOptions, diagnostics, program, virtualFile, aliasRegistry, isEmittedFile, fileExists);
420
429
  if (raw) {
421
430
  mod = toModuleJson(raw);
422
431
  }
@@ -425,7 +434,7 @@ export const analyzeCore = (inputs) => {
425
434
  }
426
435
  }
427
436
  else {
428
- mod = analyzeModule(sourceFile, program, sourceOptions, diagnostics, log, aliasRegistry, isEmittedFile);
437
+ mod = analyzeModule(sourceFile, program, sourceOptions, diagnostics, log, aliasRegistry, isEmittedFile, fileExists);
429
438
  }
430
439
  if (!mod)
431
440
  continue;
@@ -435,7 +444,7 @@ export const analyzeCore = (inputs) => {
435
444
  // `mergeReExports` (their edges would back-link modules absent from
436
445
  // output) and out of the emitted set.
437
446
  const contextModules = contextSvelteFiles?.length
438
- ? analyzeContextComponents(contextSvelteFiles, modules, inputs, aliasRegistry, isEmittedFile)
447
+ ? analyzeContextComponents(contextSvelteFiles, modules, inputs, aliasRegistry, isEmittedFile, fileExists)
439
448
  : [];
440
449
  // Phase 2a: build alsoExportedFrom arrays from the modules' forward edges
441
450
  const mergedModules = mergeReExports(modules);
package/dist/cli.d.ts CHANGED
@@ -103,7 +103,8 @@ export interface CliOptions {
103
103
  * Run the CLI with the given arguments.
104
104
  *
105
105
  * @param argv - command line arguments (defaults to `process.argv`)
106
- * @returns exit code: 0 for success, 1 if errors in diagnostics, 2 for CLI errors or any
106
+ * @returns exit code: 0 for success (including `--help` and `--version`), 1 if errors in
107
+ * diagnostics, 2 for CLI errors (an unknown flag, a missing or invalid option value) or any
107
108
  * thrown analysis error (including an `--on-duplicates throw` collision)
108
109
  */
109
110
  export declare const runCli: (argv?: Array<string>) => Promise<number>;
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAwBhD;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;I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C1B;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,sFAAsF;IACtF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAU,OAAM,KAAK,CAAC,MAAM,CAAgB,KAAG,OAAO,CAAC,MAAM,CAmP/E,CAAC"}
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * @module
19
19
  */
20
- import { Command } from 'commander';
20
+ import { Command, CommanderError } from 'commander';
21
21
  import { writeFile, readFile } from 'node:fs/promises';
22
22
  import { resolve } from 'node:path';
23
23
  import picomatch from 'picomatch';
@@ -42,7 +42,8 @@ const isDiscoveryFlag = (value) => DISCOVERY_VALUES.includes(value);
42
42
  * Run the CLI with the given arguments.
43
43
  *
44
44
  * @param argv - command line arguments (defaults to `process.argv`)
45
- * @returns exit code: 0 for success, 1 if errors in diagnostics, 2 for CLI errors or any
45
+ * @returns exit code: 0 for success (including `--help` and `--version`), 1 if errors in
46
+ * diagnostics, 2 for CLI errors (an unknown flag, a missing or invalid option value) or any
46
47
  * thrown analysis error (including an `--on-duplicates throw` collision)
47
48
  */
48
49
  export const runCli = async (argv = process.argv) => {
@@ -68,6 +69,11 @@ export const runCli = async (argv = process.argv) => {
68
69
  }
69
70
  throw new Error(`svelte-docinfo: failed to load package.json for version. Attempted: ${attempted.join(', ')}`);
70
71
  })();
72
+ // Commander exits 1 on its own parse errors; throw instead so they map to 2,
73
+ // keeping 1 for analysis errors. Its messages go through `console.error`
74
+ // like the CLI's own errors.
75
+ program.exitOverride();
76
+ program.configureOutput({ writeErr: (s) => console.error(s.trimEnd()) });
71
77
  program
72
78
  .name('svelte-docinfo')
73
79
  .description('Static analysis for TypeScript and Svelte source code')
@@ -83,7 +89,8 @@ export const runCli = async (argv = process.argv) => {
83
89
  .option('--no-resolve-dependencies', 'Disable dependency resolution')
84
90
  .option('--discovery <mode>', `Source file discovery strategy: ${DISCOVERY_VALUES.join('|')} ` +
85
91
  '(default: auto — exports first, glob fallback). ' +
86
- '`exports` is strict and fails if package.json exports is missing or empty ' +
92
+ '`exports` is strict and fails if package.json exports is missing ' +
93
+ 'or resolves to no files ' +
87
94
  '(also incompatible with --include).')
88
95
  .option('--dist-dir <dir>', 'Dist directory for exports discovery (default: dist)')
89
96
  .option('--source-dir <dir>', 'Source directory, relative to project root or absolute inside it ' +
@@ -112,8 +119,8 @@ Examples:
112
119
  $ svelte-docinfo --source-dir src Non-SvelteKit project (src/ root)
113
120
  $ svelte-docinfo --source-dir src/lib --source-dir src/routes
114
121
  Multiple source dirs (source-root auto-derived as 'src')
115
- $ svelte-docinfo --source-dir src/lib --source-dir lib/utils --source-root .
116
- No common prefix — module paths stay project-relative
122
+ $ svelte-docinfo --source-dir src/lib --source-dir lib/utils
123
+ No common prefix — module paths are project-relative
117
124
  $ svelte-docinfo --discovery glob Skip package.json exports
118
125
  $ svelte-docinfo --discovery exports Strict — fail if exports missing
119
126
  $ svelte-docinfo --tsconfig tsconfig.lib.json Use a specific tsconfig
@@ -217,6 +224,14 @@ Examples:
217
224
  exitCode = 2;
218
225
  }
219
226
  });
220
- await program.parseAsync(argv);
227
+ try {
228
+ await program.parseAsync(argv);
229
+ }
230
+ catch (error) {
231
+ if (!(error instanceof CommanderError))
232
+ throw error;
233
+ // `--help` and `--version` throw with exit code 0
234
+ return error.exitCode === 0 ? 0 : 2;
235
+ }
221
236
  return exitCode;
222
237
  };
@@ -13,6 +13,7 @@
13
13
  * @module
14
14
  */
15
15
  import type { DeclarationKind, DeclarationModifier, GenericParamJson, MemberKind, ParameterJsonInput, OverloadJsonInput, ComponentPropJsonInput, Reactivity, ReExportJsonInput, ExternalReExportJsonInput, TypeJson } from './types.js';
16
+ import type { TsdocParsedComment } from './tsdoc.js';
16
17
  /**
17
18
  * Permissive type for constructing members incrementally before schema validation.
18
19
  *
@@ -131,11 +132,12 @@ export interface DeclarationAnalysis {
131
132
  */
132
133
  export interface ModuleExportsAnalysis {
133
134
  /**
134
- * Module-level documentation comment. Always `undefined` for svelte2tsx
135
- * virtual files — `analyzeSvelteModule` extracts Svelte module comments
136
- * from the original source instead.
135
+ * The parsed module-level comment, projected onto `ModuleJson` by
136
+ * `toModuleDocFields`. Always `undefined` for svelte2tsx virtual files —
137
+ * `analyzeSvelteModule` extracts Svelte module comments from the original
138
+ * source instead.
137
139
  */
138
- moduleComment?: string;
140
+ moduleDoc?: TsdocParsedComment;
139
141
  /** All exported declarations with `@nodocs` flags — consumer filters based on policy. */
140
142
  declarations: Array<DeclarationAnalysis>;
141
143
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"declaration-build.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/declaration-build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,iBAAiB,EACjB,yBAAyB,EACzB,QAAQ,EACR,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAe;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,KA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CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,mBAAmB;IACnC,0DAA0D;IAC1D,WAAW,EAAE,oBAAoB,CAAC;IAClC,2FAA2F;IAC3F,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,YAAY,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACzC;;;;;;OAMG;IACH,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,2FAA2F;IAC3F,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;;OAGG;IACH,iBAAiB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACpD,6EAA6E;IAC7E,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAC5D,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,gFAAgF;IAChF,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B"}
1
+ {"version":3,"file":"declaration-build.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/declaration-build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV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