@svelte-vitals/vite 0.23.3 → 0.25.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.
- package/dist/index.js +11 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -209,9 +209,10 @@ async function analyze(prerenderPagesDir, cwd, options, extraProjectFacts) {
|
|
|
209
209
|
const components = await collectComponentFacts(cwd);
|
|
210
210
|
const kitModules = await collectKitModuleFacts(cwd, project.kitAliases);
|
|
211
211
|
const sourceFiles = await collectSourceFiles(cwd);
|
|
212
|
+
const selected = selectRules(allRules, config);
|
|
212
213
|
const results = applyOverrides(
|
|
213
214
|
applyRuleSeverities(
|
|
214
|
-
await runRules(
|
|
215
|
+
await runRules(selected, {
|
|
215
216
|
heads,
|
|
216
217
|
headings,
|
|
217
218
|
images,
|
|
@@ -231,7 +232,12 @@ async function analyze(prerenderPagesDir, cwd, options, extraProjectFacts) {
|
|
|
231
232
|
const coverageNote = `Analyzed ${heads.length} prerendered route(s). SSR/dynamic routes are not covered \u2014 run \`npx svelte-vitals\` for those.
|
|
232
233
|
Scanned ${components.length} component(s) under src/ for Correctness/Security/Architecture/Bundle findings.`;
|
|
233
234
|
const consoleReport = formatConsoleReport(results, config, { mode: "rendered / plugin" }) + "\n" + coverageNote + "\n";
|
|
234
|
-
const jsonReport = formatJsonReport(
|
|
235
|
+
const jsonReport = formatJsonReport(
|
|
236
|
+
results,
|
|
237
|
+
config,
|
|
238
|
+
{ version: readPackageVersion() },
|
|
239
|
+
selected.map((r) => r.id)
|
|
240
|
+
);
|
|
235
241
|
return {
|
|
236
242
|
score,
|
|
237
243
|
summary,
|
|
@@ -281,6 +287,9 @@ function sanitizeReport(report) {
|
|
|
281
287
|
}
|
|
282
288
|
function buildSnapshot(store, config, meta) {
|
|
283
289
|
return {
|
|
290
|
+
// No rule-id list threaded through: `report.rules` is seeded from `store.snapshot()`
|
|
291
|
+
// alone here, so presence means "produced a result", not "was selected" — unlike the
|
|
292
|
+
// `json` reporter (design doc 2026-08-03-json-rule-evidence-design.md, Not in scope).
|
|
284
293
|
report: sanitizeReport(buildJsonReport(store.snapshot(), config, meta)),
|
|
285
294
|
badges: store.badges(),
|
|
286
295
|
analyzing: store.isAnalyzing(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svelte-vitals/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Vite/SvelteKit plugin for svelte-vitals — analyzes prerendered HTML during vite build.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"esm-env": "^1.2.2",
|
|
43
43
|
"node-html-parser": "^9.0.1",
|
|
44
44
|
"tinyglobby": "^0.2.17",
|
|
45
|
-
"@svelte-vitals/core": "0.
|
|
46
|
-
"svelte-vitals": "0.
|
|
45
|
+
"@svelte-vitals/core": "0.34.0",
|
|
46
|
+
"svelte-vitals": "0.39.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@sveltejs/kit": "^2.70.2",
|