svelte-docinfo 0.5.3 → 0.5.5
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 +19 -19
- package/dist/analyze-core.d.ts.map +1 -1
- package/dist/analyze-core.js +11 -11
- package/dist/analyze.d.ts.map +1 -1
- package/dist/analyze.js +8 -8
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -5
- package/dist/declaration-build.d.ts.map +1 -1
- package/dist/declaration-helpers.d.ts.map +1 -1
- package/dist/dep-resolver.js +2 -2
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +18 -18
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +2 -2
- package/dist/error.d.ts +15 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +14 -0
- package/dist/exports.d.ts.map +1 -1
- package/dist/exports.js +42 -6
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/logo.js +3 -3
- package/dist/postprocess.d.ts.map +1 -1
- package/dist/postprocess.js +12 -12
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +16 -15
- package/dist/source-config.d.ts.map +1 -1
- package/dist/source-config.js +2 -2
- package/dist/svelte.d.ts.map +1 -1
- package/dist/svelte.js +181 -162
- package/dist/tsdoc.d.ts.map +1 -1
- package/dist/tsdoc.js +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +29 -29
- package/dist/typescript-exports.d.ts.map +1 -1
- package/dist/typescript-exports.js +18 -18
- package/dist/typescript-extract-class.d.ts.map +1 -1
- package/dist/typescript-extract-class.js +8 -7
- package/dist/typescript-extract-function.d.ts.map +1 -1
- package/dist/typescript-extract-function.js +6 -5
- package/dist/typescript-extract-shared.d.ts.map +1 -1
- package/dist/typescript-extract-shared.js +8 -7
- package/dist/typescript-extract-type-properties.d.ts.map +1 -1
- package/dist/typescript-extract-type-properties.js +8 -6
- package/dist/typescript-extract-type.d.ts.map +1 -1
- package/dist/typescript-extract-type.js +13 -12
- package/dist/typescript-program.d.ts.map +1 -1
- package/dist/typescript-program.js +4 -4
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +13 -13
- package/package.json +15 -13
- package/virtual-svelte-docinfo.d.ts +1 -1
package/dist/exports.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOnD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,2GAA2G;IAC3G,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;;OAIG;IACH,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACpC,oEAAoE;IACpE,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,iCAAiC;IACjC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC5B,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAC;CACpB;AASD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,aAAa,CA+BpF,CAAC;AAoCF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,GAC3B,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAC7C,MAAM,GAAG,IAwCX,CAAC;AAkBF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,GAC/B,SAAS,uBAAuB,KAC9B,OAAO,CAAC,sBAAsB,CA0DhC,CAAC"}
|
package/dist/exports.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { readFile, access } from 'node:fs/promises';
|
|
13
13
|
import { join, relative, resolve } from 'node:path';
|
|
14
14
|
import { glob } from 'tinyglobby';
|
|
15
|
+
import { to_error_message } from './error.js';
|
|
15
16
|
import { toPosixPath } from './paths.js';
|
|
16
17
|
import { MAX_FILE_CONCURRENCY, map_concurrent } from './concurrency.js';
|
|
17
18
|
// Condition priority
|
|
@@ -51,7 +52,7 @@ export const parsePackageExports = async (projectRoot) => {
|
|
|
51
52
|
entries.push({
|
|
52
53
|
specifier,
|
|
53
54
|
isPattern: specifier.includes('*'),
|
|
54
|
-
conditions
|
|
55
|
+
conditions
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
return { entries, hasExports: true };
|
|
@@ -200,7 +201,7 @@ export const discoverFromExports = async (options) => {
|
|
|
200
201
|
kind: 'module_unreadable',
|
|
201
202
|
severity: 'error',
|
|
202
203
|
file: toPosixPath(relative(projectRoot, absPath)),
|
|
203
|
-
message: `Could not read file discovered via package.json exports: ${
|
|
204
|
+
message: `Could not read file discovered via package.json exports: ${to_error_message(err)}`
|
|
204
205
|
});
|
|
205
206
|
return null;
|
|
206
207
|
}
|
|
@@ -230,14 +231,49 @@ const resolveConcreteExport = async (distPath, condition, mappingOptions, projec
|
|
|
230
231
|
}
|
|
231
232
|
}
|
|
232
233
|
};
|
|
234
|
+
/**
|
|
235
|
+
* Widen an exports-derived source pattern into a directory-crossing glob.
|
|
236
|
+
*
|
|
237
|
+
* A package.json `exports` wildcard matches subpaths *including* `/` — the
|
|
238
|
+
* `./*.js` key resolves `./auth/session.js` with `*` capturing `auth/session`.
|
|
239
|
+
* A plain glob `*`, by contrast, stops at a directory separator, so globbing
|
|
240
|
+
* the mapped `src/lib/*.ts` would match only top-level modules and silently
|
|
241
|
+
* drop every nested one. When the wildcard sits after a directory separator
|
|
242
|
+
* (the ubiquitous `<dir>/*.ext` shape), splice in a globstar segment so the
|
|
243
|
+
* glob crosses directories the way Node's resolver does; the globstar matches
|
|
244
|
+
* zero-or-more segments, so top-level files still match.
|
|
245
|
+
*
|
|
246
|
+
* Two shapes are deliberately left un-widened:
|
|
247
|
+
* - A mid-segment wildcard (`prefix-*.ts`) has no faithful globstar translation.
|
|
248
|
+
* - A bare-root wildcard (`*.ts`, from an empty `sourceDir`) would widen to a
|
|
249
|
+
* project-root `**` that rakes in `node_modules`/`dist`. Empty `sourceDir`
|
|
250
|
+
* only arises from the multi-`sourcePaths` no-common-prefix layout (which
|
|
251
|
+
* `discoverSourceFiles` short-circuits before reaching here) or an explicit
|
|
252
|
+
* `sourceRoot: ''`; leaving it non-recursive matches the prior behavior
|
|
253
|
+
* without the explosion risk.
|
|
254
|
+
*
|
|
255
|
+
* Both fall through to matching same-directory files only.
|
|
256
|
+
*/
|
|
257
|
+
const toRecursiveExportGlob = (pattern) => {
|
|
258
|
+
const star = pattern.indexOf('*');
|
|
259
|
+
if (star === -1)
|
|
260
|
+
return pattern;
|
|
261
|
+
const before = pattern.slice(0, star);
|
|
262
|
+
const after = pattern.slice(star + 1);
|
|
263
|
+
if (before.endsWith('/'))
|
|
264
|
+
return `${before}**/*${after}`;
|
|
265
|
+
return pattern;
|
|
266
|
+
};
|
|
233
267
|
/**
|
|
234
268
|
* Expand a wildcard export pattern to matching source files.
|
|
235
269
|
*/
|
|
236
270
|
const expandWildcardExport = async (distPath, condition, mappingOptions, projectRoot, exclude, discovered) => {
|
|
237
|
-
const
|
|
238
|
-
if (!
|
|
271
|
+
const mappedPattern = mapDistToSource(distPath, condition, mappingOptions);
|
|
272
|
+
if (!mappedPattern)
|
|
239
273
|
return;
|
|
240
|
-
//
|
|
274
|
+
// The exports `*` crosses directory separators; a glob `*` does not — widen
|
|
275
|
+
// it so nested modules aren't silently dropped.
|
|
276
|
+
const sourcePattern = toRecursiveExportGlob(mappedPattern);
|
|
241
277
|
const patterns = [sourcePattern];
|
|
242
278
|
// For .ts patterns, also try .svelte and .js
|
|
243
279
|
if (sourcePattern.endsWith('.ts')) {
|
|
@@ -249,7 +285,7 @@ const expandWildcardExport = async (distPath, condition, mappingOptions, project
|
|
|
249
285
|
const filePaths = await glob(patterns, {
|
|
250
286
|
cwd: projectRoot,
|
|
251
287
|
ignore: exclude,
|
|
252
|
-
absolute: true
|
|
288
|
+
absolute: true
|
|
253
289
|
});
|
|
254
290
|
for (const rawAbsPath of filePaths) {
|
|
255
291
|
// Posixify before keying — tinyglobby returns native separators on
|
package/dist/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,GAAU,MAAM,MAAM,EAAE,aAAa,MAAM,KAAG,OAAO,CAAC,cAAc,CAQxF,CAAC;AASF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,aAAa,CAAC,MAAM,CAAC,KAAG,KAAK,CAAC,MAAM,CACvB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,yCAAyC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAexF,CAAC"}
|
package/dist/files.js
CHANGED
|
@@ -38,7 +38,7 @@ export const loadFile = async (path, projectRoot) => {
|
|
|
38
38
|
const content = await readFile(absolutePath, 'utf-8');
|
|
39
39
|
return {
|
|
40
40
|
id: toPosixPath(absolutePath),
|
|
41
|
-
content
|
|
41
|
+
content
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
@@ -84,7 +84,7 @@ export const globFiles = async (options) => {
|
|
|
84
84
|
const filePaths = await glob(include, {
|
|
85
85
|
cwd: projectRoot,
|
|
86
86
|
ignore: exclude,
|
|
87
|
-
absolute: true
|
|
87
|
+
absolute: true
|
|
88
88
|
});
|
|
89
89
|
// Bounded concurrency to keep FD pressure under the typical ulimit on
|
|
90
90
|
// large projects. See `concurrency.ts`.
|
package/dist/index.d.ts
CHANGED
|
@@ -13,19 +13,19 @@ export type { AnalyzeOptions, AnalyzeFromFilesOptions } from './analyze.js';
|
|
|
13
13
|
export { throwOnDuplicates, AnalyzeResultJson } from './analyze-core.js';
|
|
14
14
|
export type { AnalyzeResultJsonWire, OnDuplicates, OnDuplicatesCallback } from './analyze-core.js';
|
|
15
15
|
export { createAnalysisSession } from './session.js';
|
|
16
|
-
export type { AnalysisSession, AnalysisSessionOptions, SetFileOptions, SetFileResult, SetFilesResult, QueryOptions
|
|
16
|
+
export type { AnalysisSession, AnalysisSessionOptions, SetFileOptions, SetFileResult, SetFilesResult, QueryOptions } from './session.js';
|
|
17
17
|
export { normalizeResolveImport } from './dep-resolver.js';
|
|
18
18
|
export type { ImportResolver, ResolveImport, ResolveImportFn } from './dep-resolver.js';
|
|
19
|
-
export { DeclarationKind, DeclarationModifier, MemberKind, Reactivity, GenericParamJson, ParameterJson, ComponentPropJson, OverloadJson, FunctionMemberJson, VariableMemberJson, ConstructorMemberJson, MemberJson, FunctionDeclarationJson, ClassDeclarationJson, InterfaceDeclarationJson, TypeDeclarationJson, VariableDeclarationJson, EnumDeclarationJson, ComponentDeclarationJson, SnippetDeclarationJson, NamespaceDeclarationJson, DeclarationJson, ReExportJson, ExternalReExportJson, ModuleJson
|
|
20
|
-
export { getDisplayName, generateImport, compactReplacer, isKind, findTypeReferences, buildTypeReferencePatterns
|
|
19
|
+
export { DeclarationKind, DeclarationModifier, MemberKind, Reactivity, GenericParamJson, ParameterJson, ComponentPropJson, OverloadJson, FunctionMemberJson, VariableMemberJson, ConstructorMemberJson, MemberJson, FunctionDeclarationJson, ClassDeclarationJson, InterfaceDeclarationJson, TypeDeclarationJson, VariableDeclarationJson, EnumDeclarationJson, ComponentDeclarationJson, SnippetDeclarationJson, NamespaceDeclarationJson, DeclarationJson, ReExportJson, ExternalReExportJson, ModuleJson } from './types.js';
|
|
20
|
+
export { getDisplayName, generateImport, compactReplacer, isKind, findTypeReferences, buildTypeReferencePatterns } from './declaration-helpers.js';
|
|
21
21
|
export type { SourceFileInfo, AnalyzerType } from './source.js';
|
|
22
22
|
export { createSourceOptions, DEFAULT_SOURCE_OPTIONS } from './source-config.js';
|
|
23
23
|
export type { ModuleSourceOptions, SourceOptionsDefaults } from './source-config.js';
|
|
24
|
-
export { findDuplicates, mergeReExports, resolveComponentAliases, resolveExportSurface
|
|
24
|
+
export { findDuplicates, mergeReExports, resolveComponentAliases, resolveExportSurface } from './postprocess.js';
|
|
25
25
|
export type { DuplicateDeclaration, ExportSurface, ExportSurfaceEntry } from './postprocess.js';
|
|
26
26
|
export { deriveIncludePatterns } from './files.js';
|
|
27
27
|
export { discoverSourceFiles } from './discovery.js';
|
|
28
|
-
export type { Discovery, DiscoverSourceFilesOptions, DiscoverSourceFilesResult
|
|
29
|
-
export { hasErrors, hasWarnings, errorsOf, warningsOf, byKind, formatDiagnostic, DiagnosticSeverity, DiagnosticKind, Diagnostic
|
|
28
|
+
export type { Discovery, DiscoverSourceFilesOptions, DiscoverSourceFilesResult } from './discovery.js';
|
|
29
|
+
export { hasErrors, hasWarnings, errorsOf, warningsOf, byKind, formatDiagnostic, DiagnosticSeverity, DiagnosticKind, Diagnostic } from './diagnostics.js';
|
|
30
30
|
export type { AnalysisLog } from './log.js';
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBA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BAAgB,CAAC;AACrD,YAAY,EACX,SAAS,EACT,0BAA0B,EAC1B,yBAAyB,EACzB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,16 +14,16 @@ export { throwOnDuplicates, AnalyzeResultJson } from './analyze-core.js';
|
|
|
14
14
|
export { createAnalysisSession } from './session.js';
|
|
15
15
|
export { normalizeResolveImport } from './dep-resolver.js';
|
|
16
16
|
// Types (Zod schemas + TypeScript interfaces)
|
|
17
|
-
export { DeclarationKind, DeclarationModifier, MemberKind, Reactivity, GenericParamJson, ParameterJson, ComponentPropJson, OverloadJson, FunctionMemberJson, VariableMemberJson, ConstructorMemberJson, MemberJson, FunctionDeclarationJson, ClassDeclarationJson, InterfaceDeclarationJson, TypeDeclarationJson, VariableDeclarationJson, EnumDeclarationJson, ComponentDeclarationJson, SnippetDeclarationJson, NamespaceDeclarationJson, DeclarationJson, ReExportJson, ExternalReExportJson, ModuleJson
|
|
17
|
+
export { DeclarationKind, DeclarationModifier, MemberKind, Reactivity, GenericParamJson, ParameterJson, ComponentPropJson, OverloadJson, FunctionMemberJson, VariableMemberJson, ConstructorMemberJson, MemberJson, FunctionDeclarationJson, ClassDeclarationJson, InterfaceDeclarationJson, TypeDeclarationJson, VariableDeclarationJson, EnumDeclarationJson, ComponentDeclarationJson, SnippetDeclarationJson, NamespaceDeclarationJson, DeclarationJson, ReExportJson, ExternalReExportJson, ModuleJson } from './types.js';
|
|
18
18
|
// Declaration helpers
|
|
19
|
-
export { getDisplayName, generateImport, compactReplacer, isKind, findTypeReferences, buildTypeReferencePatterns
|
|
19
|
+
export { getDisplayName, generateImport, compactReplacer, isKind, findTypeReferences, buildTypeReferencePatterns } from './declaration-helpers.js';
|
|
20
20
|
// Source options
|
|
21
21
|
export { createSourceOptions, DEFAULT_SOURCE_OPTIONS } from './source-config.js';
|
|
22
22
|
// Post-processing
|
|
23
|
-
export { findDuplicates, mergeReExports, resolveComponentAliases, resolveExportSurface
|
|
23
|
+
export { findDuplicates, mergeReExports, resolveComponentAliases, resolveExportSurface } from './postprocess.js';
|
|
24
24
|
// File system constants
|
|
25
25
|
export { deriveIncludePatterns } from './files.js';
|
|
26
26
|
// File discovery
|
|
27
27
|
export { discoverSourceFiles } from './discovery.js';
|
|
28
28
|
// Diagnostics
|
|
29
|
-
export { hasErrors, hasWarnings, errorsOf, warningsOf, byKind, formatDiagnostic, DiagnosticSeverity, DiagnosticKind, Diagnostic
|
|
29
|
+
export { hasErrors, hasWarnings, errorsOf, warningsOf, byKind, formatDiagnostic, DiagnosticSeverity, DiagnosticKind, Diagnostic } from './diagnostics.js';
|
package/dist/logo.js
CHANGED
|
@@ -3,7 +3,7 @@ export const logo_svelte_docinfo = {
|
|
|
3
3
|
fill: '#1ec3d2',
|
|
4
4
|
paths: [
|
|
5
5
|
{
|
|
6
|
-
d: 'M 83,80.28 c -9.75,-34.41 2.18,-52.33 -3.76,-70 -2.31,-7.66 -48.25,-12 -70.25,-6 -12,6 -10,24 4,24 6,0 5.51,-13.67 6,-18 0,0 -1.43,59.52 5.13,80.21 1.2,3.8 2.91,5.28 4,5.92 3.93,2.31 63.48,3.74 68.01,0.54 1.18,-0.84 3.11,-5.38 2.63,-8.75 -0.42,-2.94 -3.27,-5.78 -5.28,-6.26 -1.74,-0.41 -0.62,-0.79 -5.37,-0.59 C 77.2,81.96 71.49,85.44 47.57,84.25 41.58,84.09 11.04,79.77 64.12,56.73 51.2,46.21 46.99,49.36 37.77,43.13 37.39,42.87 55,45.85 66.37,56.98 -10.84,93.94 82.99,80.29 82.99,80.29 Z'
|
|
7
|
-
}
|
|
8
|
-
]
|
|
6
|
+
d: 'M 83,80.28 c -9.75,-34.41 2.18,-52.33 -3.76,-70 -2.31,-7.66 -48.25,-12 -70.25,-6 -12,6 -10,24 4,24 6,0 5.51,-13.67 6,-18 0,0 -1.43,59.52 5.13,80.21 1.2,3.8 2.91,5.28 4,5.92 3.93,2.31 63.48,3.74 68.01,0.54 1.18,-0.84 3.11,-5.38 2.63,-8.75 -0.42,-2.94 -3.27,-5.78 -5.28,-6.26 -1.74,-0.41 -0.62,-0.79 -5.37,-0.59 C 77.2,81.96 71.49,85.44 47.57,84.25 41.58,84.09 11.04,79.77 64.12,56.73 51.2,46.21 46.99,49.36 37.77,43.13 37.39,42.87 55,45.85 66.37,56.98 -10.84,93.94 82.99,80.29 82.99,80.29 Z'
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postprocess.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/postprocess.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"postprocess.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/postprocess.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAA4B,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAuBlD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,qCAAqC;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;CACf;AA6CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,cAAc,GAC1B,SAAS,KAAK,CAAC,UAAU,CAAC,KACxB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAwCzC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,G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AK,CAAC,MAAM,CAAC,CAAC;IACrC;;;OAGG;IACH,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACnC;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,oBAAoB,GAChC,SAAS,KAAK,CAAC,UAAU,CAAC,EAC1B,MAAM,MAAM,KACV,aAAa,GAAG,IA+IlB,CAAC"}
|
package/dist/postprocess.js
CHANGED
|
@@ -118,7 +118,7 @@ export const findDuplicates = (modules) => {
|
|
|
118
118
|
allOccurrences.get(declaration.name).push({
|
|
119
119
|
declaration,
|
|
120
120
|
module: mod.path,
|
|
121
|
-
canonical: resolveCanonical(mod.path, declaration)
|
|
121
|
+
canonical: resolveCanonical(mod.path, declaration)
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -344,7 +344,7 @@ export const computeDependents = (files) => {
|
|
|
344
344
|
return {
|
|
345
345
|
...file,
|
|
346
346
|
id: posixId,
|
|
347
|
-
dependencies: posixDeps
|
|
347
|
+
dependencies: posixDeps
|
|
348
348
|
};
|
|
349
349
|
});
|
|
350
350
|
// Build a map of file id -> dependents (computed from dependencies)
|
|
@@ -377,7 +377,7 @@ export const computeDependents = (files) => {
|
|
|
377
377
|
const dependents = Array.from(computed).sort(compareStrings);
|
|
378
378
|
return {
|
|
379
379
|
...file,
|
|
380
|
-
dependents
|
|
380
|
+
dependents
|
|
381
381
|
};
|
|
382
382
|
});
|
|
383
383
|
};
|
|
@@ -427,7 +427,7 @@ export const resolveExportSurface = (modules, path) => {
|
|
|
427
427
|
const emptySurface = () => ({
|
|
428
428
|
entries: new Map(),
|
|
429
429
|
unresolvedStars: new Set(),
|
|
430
|
-
externalStars: new Set()
|
|
430
|
+
externalStars: new Set()
|
|
431
431
|
});
|
|
432
432
|
// Only surfaces resolved without hitting a cycle back-edge are memoized.
|
|
433
433
|
// A surface computed while one of its star ancestors is mid-resolution is
|
|
@@ -463,9 +463,9 @@ export const resolveExportSurface = (modules, path) => {
|
|
|
463
463
|
via: 'declaration',
|
|
464
464
|
module: modulePath,
|
|
465
465
|
declaration,
|
|
466
|
-
...(matchingEdge?.typeOnly ? { typeOnly: true } : {})
|
|
466
|
+
...(matchingEdge?.typeOnly ? { typeOnly: true } : {})
|
|
467
467
|
},
|
|
468
|
-
identity: resolveCanonicalIdentity(byIdentity, modulePath, declaration)
|
|
468
|
+
identity: resolveCanonicalIdentity(byIdentity, modulePath, declaration)
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
471
|
// 2. Same-name re-export edges not already covered by a declaration.
|
|
@@ -482,11 +482,11 @@ export const resolveExportSurface = (modules, path) => {
|
|
|
482
482
|
via: 'reExport',
|
|
483
483
|
module: edge.module,
|
|
484
484
|
...(canonical ? { declaration: canonical } : {}),
|
|
485
|
-
...(edge.typeOnly ? { typeOnly: true } : {})
|
|
485
|
+
...(edge.typeOnly ? { typeOnly: true } : {})
|
|
486
486
|
},
|
|
487
487
|
identity: canonical
|
|
488
488
|
? resolveCanonicalIdentity(byIdentity, edge.module, canonical)
|
|
489
|
-
: `${edge.module}\n${edge.name}
|
|
489
|
+
: `${edge.module}\n${edge.name}`
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
// 3. Direct external re-exports
|
|
@@ -499,9 +499,9 @@ export const resolveExportSurface = (modules, path) => {
|
|
|
499
499
|
via: 'external',
|
|
500
500
|
specifier: external.specifier,
|
|
501
501
|
...(external.originalName !== undefined ? { originalName: external.originalName } : {}),
|
|
502
|
-
...(external.typeOnly ? { typeOnly: true } : {})
|
|
502
|
+
...(external.typeOnly ? { typeOnly: true } : {})
|
|
503
503
|
},
|
|
504
|
-
identity: `ext\n${external.specifier}\n${external.originalName ?? external.name}
|
|
504
|
+
identity: `ext\n${external.specifier}\n${external.originalName ?? external.name}`
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
// 4. External stars — names unknowable, surface incompleteness recorded
|
|
@@ -545,7 +545,7 @@ export const resolveExportSurface = (modules, path) => {
|
|
|
545
545
|
}
|
|
546
546
|
entries.set(entry.name, {
|
|
547
547
|
entry: { ...entry, via: 'star', starFrom: target },
|
|
548
|
-
identity
|
|
548
|
+
identity
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -560,6 +560,6 @@ export const resolveExportSurface = (modules, path) => {
|
|
|
560
560
|
.map(({ entry }) => entry)
|
|
561
561
|
.sort((a, b) => compareStrings(a.name, b.name)),
|
|
562
562
|
unresolvedStarExports: Array.from(resolved.unresolvedStars).sort(compareStrings),
|
|
563
|
-
externalStarExports: Array.from(resolved.externalStars).sort(compareStrings)
|
|
563
|
+
externalStarExports: Array.from(resolved.externalStars).sort(compareStrings)
|
|
564
564
|
};
|
|
565
565
|
};
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAIN,KAAK,8BAA8B,EACnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAIN,KAAK,8BAA8B,EACnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAEN,KAAK,aAAa,EAMlB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,mBAAmB,EAAoC,MAAM,oBAAoB,CAAC;AAGhG,OAAO,E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a,CAAC,MAAM,CAAC,CAAC;IAC9B;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC;IAC9C;;;;;;;;OAQG;IACH,oBAAoB,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1C;;;OAGG;IACH,OAAO,IAAI,IAAI,CAAC;CAChB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CACnD,8BAA8B,EAC9B,aAAa,GAAG,cAAc,CAC9B;IACA;;;;;;;;;OASG;IACH,aAAa,EAAE,mBAAmB,CAAC;IACnC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,kDAAkD;IAClD,GAAG,CAAC,EAAE,WAAW,CAAC;CAClB;AA+FD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,sBAAsB,KAAG,eAsdvE,CAAC"}
|
package/dist/session.js
CHANGED
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
*
|
|
29
29
|
* @module
|
|
30
30
|
*/
|
|
31
|
-
import { createAnalysisLanguageService, loadTsconfig
|
|
31
|
+
import { createAnalysisLanguageService, loadTsconfig } from './typescript-program.js';
|
|
32
|
+
import { to_error_message } from './error.js';
|
|
32
33
|
import { transformSvelteSource } from './svelte.js';
|
|
33
|
-
import { createDefaultResolver, ensureLexerReady, isNodeBuiltin, lexImports, normalizeResolveImport
|
|
34
|
+
import { createDefaultResolver, ensureLexerReady, isNodeBuiltin, lexImports, normalizeResolveImport } from './dep-resolver.js';
|
|
34
35
|
import { isSource, normalizeSourceOptions } from './source-config.js';
|
|
35
36
|
import { toPosixPath } from './paths.js';
|
|
36
37
|
import { MAX_RESOLVE_CONCURRENCY, map_concurrent } from './concurrency.js';
|
|
37
|
-
import { analyzeCore, normalizeDiagnosticPaths, AnalyzeResultJson
|
|
38
|
+
import { analyzeCore, normalizeDiagnosticPaths, AnalyzeResultJson } from './analyze-core.js';
|
|
38
39
|
import { computeDependents } from './postprocess.js';
|
|
39
40
|
/**
|
|
40
41
|
* Element-wise equality on two readonly string arrays. Used for the
|
|
@@ -90,7 +91,7 @@ export const createAnalysisSession = (options) => {
|
|
|
90
91
|
projectRoot: sourceOptions.projectRoot,
|
|
91
92
|
tsconfig: options.tsconfig,
|
|
92
93
|
compilerOptions: options.compilerOptions,
|
|
93
|
-
documentRegistry: options.documentRegistry
|
|
94
|
+
documentRegistry: options.documentRegistry
|
|
94
95
|
}, options.log);
|
|
95
96
|
const owned = new Map();
|
|
96
97
|
// TODO: the owned-entry cache is in-memory only, so cold one-shot runs
|
|
@@ -117,7 +118,7 @@ export const createAnalysisSession = (options) => {
|
|
|
117
118
|
const { compilerOptions } = loadTsconfig({
|
|
118
119
|
projectRoot: sourceOptions.projectRoot,
|
|
119
120
|
tsconfig: options.tsconfig,
|
|
120
|
-
compilerOptions: options.compilerOptions
|
|
121
|
+
compilerOptions: options.compilerOptions
|
|
121
122
|
}, options.log);
|
|
122
123
|
lazyDefault = createDefaultResolver(compilerOptions, sourceOptions.projectRoot);
|
|
123
124
|
return lazyDefault;
|
|
@@ -174,7 +175,7 @@ export const createAnalysisSession = (options) => {
|
|
|
174
175
|
resolverIdentity: undefined,
|
|
175
176
|
cacheHit: true,
|
|
176
177
|
previousVirtualPath: undefined,
|
|
177
|
-
preResolvedDeps: usePreResolved ? preResolvedDeps : undefined
|
|
178
|
+
preResolvedDeps: usePreResolved ? preResolvedDeps : undefined
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
181
|
// Capture the prior virtual path before we replace the entry. If the new
|
|
@@ -214,8 +215,8 @@ export const createAnalysisSession = (options) => {
|
|
|
214
215
|
ingestDiagnostics.push({
|
|
215
216
|
kind: 'import_parse_failed',
|
|
216
217
|
file: file.id,
|
|
217
|
-
message: `Failed to parse imports: ${
|
|
218
|
-
severity: 'warning'
|
|
218
|
+
message: `Failed to parse imports: ${to_error_message(err)}`,
|
|
219
|
+
severity: 'warning'
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
222
|
}
|
|
@@ -228,7 +229,7 @@ export const createAnalysisSession = (options) => {
|
|
|
228
229
|
resolverIdentity: resolver?.identity,
|
|
229
230
|
cacheHit: false,
|
|
230
231
|
previousVirtualPath,
|
|
231
|
-
preResolvedDeps: usePreResolved ? preResolvedDeps : undefined
|
|
232
|
+
preResolvedDeps: usePreResolved ? preResolvedDeps : undefined
|
|
232
233
|
};
|
|
233
234
|
};
|
|
234
235
|
// Phase 3: serial per-file LS push + entry write
|
|
@@ -281,7 +282,7 @@ export const createAnalysisSession = (options) => {
|
|
|
281
282
|
virtual: pending.virtual,
|
|
282
283
|
unfilteredDeps,
|
|
283
284
|
preResolvedDepsSnapshot: pending.preResolvedDeps.slice(),
|
|
284
|
-
ingestDiagnostics: pending.ingestDiagnostics
|
|
285
|
+
ingestDiagnostics: pending.ingestDiagnostics
|
|
285
286
|
}
|
|
286
287
|
: {
|
|
287
288
|
mode: 'lex+resolve',
|
|
@@ -291,7 +292,7 @@ export const createAnalysisSession = (options) => {
|
|
|
291
292
|
// Non-null assert: lex+resolve branch implies the batch picked a
|
|
292
293
|
// resolver, so phase 1 stored its identity on the pending entry.
|
|
293
294
|
resolverIdentity: pending.resolverIdentity,
|
|
294
|
-
ingestDiagnostics: pending.ingestDiagnostics
|
|
295
|
+
ingestDiagnostics: pending.ingestDiagnostics
|
|
295
296
|
};
|
|
296
297
|
if (pending.transformFailed)
|
|
297
298
|
entry.transformFailed = true;
|
|
@@ -378,14 +379,14 @@ export const createAnalysisSession = (options) => {
|
|
|
378
379
|
return {
|
|
379
380
|
...t,
|
|
380
381
|
resolved: resolved === null ? null : toPosixPath(resolved),
|
|
381
|
-
error: undefined
|
|
382
|
+
error: undefined
|
|
382
383
|
};
|
|
383
384
|
}
|
|
384
385
|
catch (err) {
|
|
385
386
|
return {
|
|
386
387
|
...t,
|
|
387
388
|
resolved: null,
|
|
388
|
-
error:
|
|
389
|
+
error: to_error_message(err)
|
|
389
390
|
};
|
|
390
391
|
}
|
|
391
392
|
});
|
|
@@ -415,7 +416,7 @@ export const createAnalysisSession = (options) => {
|
|
|
415
416
|
file: pending.file.id,
|
|
416
417
|
message: `Import resolver threw for "${r.specifier}": ${r.error}`,
|
|
417
418
|
severity: 'warning',
|
|
418
|
-
specifier: r.specifier
|
|
419
|
+
specifier: r.specifier
|
|
419
420
|
});
|
|
420
421
|
}
|
|
421
422
|
// Phase 3: serial per-file LS push + entry write. Single LS mutator
|
|
@@ -494,7 +495,7 @@ export const createAnalysisSession = (options) => {
|
|
|
494
495
|
svelteVirtualFiles,
|
|
495
496
|
transformFailedIds,
|
|
496
497
|
onDuplicates: opts?.onDuplicates,
|
|
497
|
-
log: opts?.log ?? options.log
|
|
498
|
+
log: opts?.log ?? options.log
|
|
498
499
|
});
|
|
499
500
|
return result;
|
|
500
501
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-config.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/source-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,
|
|
1
|
+
{"version":3,"file":"source-config.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/source-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAsB,MAAM,aAAa,CAAC;AAIzF;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;;;;;;;;;;OAeG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;OAcG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,EAAE,KAAK,CAAC,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ANGED
|
@@ -30,7 +30,7 @@ import { compareStrings } from './postprocess.js';
|
|
|
30
30
|
export const DEFAULT_SOURCE_OPTIONS = {
|
|
31
31
|
sourcePaths: ['src/lib'],
|
|
32
32
|
exclude: ['**/*.test.ts', '**/*.spec.ts'],
|
|
33
|
-
getAnalyzerType: getDefaultAnalyzer
|
|
33
|
+
getAnalyzerType: getDefaultAnalyzer
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
36
|
* Create complete, normalized, validated source options from project root and optional overrides.
|
|
@@ -70,7 +70,7 @@ export const DEFAULT_SOURCE_OPTIONS = {
|
|
|
70
70
|
export const createSourceOptions = (projectRoot, overrides) => normalizeSourceOptions({
|
|
71
71
|
projectRoot,
|
|
72
72
|
...DEFAULT_SOURCE_OPTIONS,
|
|
73
|
-
...overrides
|
|
73
|
+
...overrides
|
|
74
74
|
});
|
|
75
75
|
/**
|
|
76
76
|
* Normalize and validate `ModuleSourceOptions`, returning a new options object.
|
package/dist/svelte.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAuB,MAAM,2BAA2B,CAAC;AAG1E,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,KAAK,EAA4C,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,KAAK,EAGX,cAAc,EACd,MAAM,wBAAwB,CAAC;AAShC,OAAO,EAAE,KAAK,cAAc,EAA2C,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,KAAK,mBAAmB,EAAuB,MAAM,oBAAoB,CAA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