@svelte-vitals/core 0.40.0 → 0.40.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/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -486,6 +486,8 @@ interface ComponentFacts {
|
|
|
486
486
|
url: string;
|
|
487
487
|
line: number;
|
|
488
488
|
}[];
|
|
489
|
+
/** Set when the file failed to read or parse and these facts are the empty fallback — the file was NOT analyzed. */
|
|
490
|
+
parseFailed?: true;
|
|
489
491
|
}
|
|
490
492
|
|
|
491
493
|
/** What the per-file parsers produce — `ComponentFacts` minus `file`, with `suppressions` always present. */
|
|
@@ -606,6 +608,8 @@ interface KitModuleFacts {
|
|
|
606
608
|
};
|
|
607
609
|
/** Inline `svelte-vitals-disable-next-line` directives in this file. */
|
|
608
610
|
suppressions: SuppressionDirective[];
|
|
611
|
+
/** Set when the file failed to read or parse and these facts are the empty fallback — the file was NOT analyzed. */
|
|
612
|
+
parseFailed?: true;
|
|
609
613
|
}
|
|
610
614
|
|
|
611
615
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1587,7 +1587,7 @@ async function collectComponentFacts(rt, cwd) {
|
|
|
1587
1587
|
const source = await rt.readFile(rt.join(cwd, rel));
|
|
1588
1588
|
return { file: rel, ...parseComponentFacts(source, rel) };
|
|
1589
1589
|
} catch {
|
|
1590
|
-
return emptyComponentFacts(rel);
|
|
1590
|
+
return { ...emptyComponentFacts(rel), parseFailed: true };
|
|
1591
1591
|
}
|
|
1592
1592
|
})
|
|
1593
1593
|
);
|
|
@@ -2167,7 +2167,7 @@ async function collectKitModuleFacts(rt, cwd, aliases) {
|
|
|
2167
2167
|
const source = await rt.readFile(rt.join(cwd, rel));
|
|
2168
2168
|
return { file: rel, kind, ...parseKitModuleFacts(source, rel, aliases) };
|
|
2169
2169
|
} catch {
|
|
2170
|
-
return emptyKitModuleFacts(rel, kind);
|
|
2170
|
+
return { ...emptyKitModuleFacts(rel, kind), parseFailed: true };
|
|
2171
2171
|
}
|
|
2172
2172
|
})
|
|
2173
2173
|
);
|