@svelte-vitals/core 0.47.1 → 0.47.2
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/internal.js +5 -3
- package/package.json +2 -2
package/dist/internal.js
CHANGED
|
@@ -67,7 +67,7 @@ function applyInlineDirectives(results, index, rules, config) {
|
|
|
67
67
|
function unknownDirectiveIds(index, rules) {
|
|
68
68
|
const known = new Set(rules.map((r) => r.id));
|
|
69
69
|
const seen = /* @__PURE__ */ new Set();
|
|
70
|
-
for (const [file, directives] of index) for (const d of directives) for (const id of d.ruleIds ?? []) if (!known.has(id)) seen.add(`${file}:${d.line - 1} disables unknown rule "${id}"
|
|
70
|
+
for (const [file, directives] of index) for (const d of directives) for (const id of d.ruleIds ?? []) if (!known.has(id)) seen.add(`${file}:${d.line - 1} disables unknown rule "${id}" — run \`svelte-vitals explain --list\` for the ids.`);
|
|
71
71
|
return [...seen].sort();
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
@@ -904,13 +904,15 @@ function formatAgentReport(results, config) {
|
|
|
904
904
|
rs.sort((x, y) => SEVERITY_RANK[effectiveSeverity(x, config)] - SEVERITY_RANK[effectiveSeverity(y, config)] || x.id.localeCompare(y.id));
|
|
905
905
|
lines.push(`## ${mdEscape(loc)}`, "");
|
|
906
906
|
for (const r of rs) {
|
|
907
|
-
|
|
907
|
+
const at = r.line == null ? "" : `, line ${r.line}`;
|
|
908
|
+
lines.push(`### ${r.id} · ${mdEscape(r.message)} (${effectiveSeverity(r, config)}${at})`);
|
|
908
909
|
if (r.fix) {
|
|
909
910
|
lines.push(`- Fix: ${mdEscape(r.fix.description)}`);
|
|
910
911
|
if (r.fix.snippet) lines.push("", "```" + (r.fix.lang ?? "svelte"), r.fix.snippet, "```");
|
|
911
912
|
} else if (r.recommendation) lines.push(`- Fix: ${mdEscape(r.recommendation)}`);
|
|
912
913
|
if (r.docsUrl) lines.push(`- Docs: ${r.docsUrl}`);
|
|
913
|
-
|
|
914
|
+
const byReview = r.line == null ? "" : ` If the code is right as written, a reviewed \`svelte-vitals-disable-next-line ${r.id}\` comment directly above line ${r.line} resolves it instead.`;
|
|
915
|
+
lines.push(`- Accept: re-run svelte-vitals; ${r.id} passes${r.route ? ` for ${mdEscape(r.route)}` : ""}.${byReview}`, "");
|
|
914
916
|
}
|
|
915
917
|
}
|
|
916
918
|
return lines.join("\n").replace(/\n+$/, "\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svelte-vitals/core",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.2",
|
|
4
4
|
"description": "Shared, runtime-agnostic core for svelte-vitals (types, rule engine, scorer, reporter).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"aria-query": "5.3.2",
|
|
29
|
-
"svelte": "^5.56.
|
|
29
|
+
"svelte": "^5.56.10"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@markuplint/html-spec": "4.18.0",
|