svelte-vitals 0.42.0 → 0.43.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/bin.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  readCoreVersion,
9
9
  readPackageVersion,
10
10
  run
11
- } from "./chunk-J4JE5XJS.js";
11
+ } from "./chunk-6Y2E7QCQ.js";
12
12
  import {
13
13
  consoleIO
14
14
  } from "./chunk-SLUMRYUD.js";
@@ -1515,14 +1515,18 @@ async function analyzeProject(opts = {}) {
1515
1515
  });
1516
1516
  const selected = selectRules(allRules3, config);
1517
1517
  const rules = opts.categories ? selected.filter((r) => opts.categories.includes(r.category)) : selected;
1518
- const results = applyOverrides(
1519
- applyRuleSeverities(
1520
- await runRules(rules, { heads, images, headings, components, project, config, kitModules, sourceFiles }),
1521
- config
1522
- ),
1523
- config
1524
- );
1525
- return { results, config, version: readPackageVersion(), ruleIds: rules.map((r) => r.id), warnings };
1518
+ const { results: rawResults, examined } = await runRules(rules, {
1519
+ heads,
1520
+ images,
1521
+ headings,
1522
+ components,
1523
+ project,
1524
+ config,
1525
+ kitModules,
1526
+ sourceFiles
1527
+ });
1528
+ const results = applyOverrides(applyRuleSeverities(rawResults, config), config);
1529
+ return { results, config, version: readPackageVersion(), ruleIds: rules.map((r) => r.id), examined, warnings };
1526
1530
  }
1527
1531
  async function applyScope(results, opts) {
1528
1532
  const errorLog = opts.errorLog ?? ((line) => console.error(line));
@@ -1690,7 +1694,7 @@ async function run(opts = {}) {
1690
1694
  );
1691
1695
  }
1692
1696
  if (reporter === "json") {
1693
- log(formatJsonReport(results, config, { version }, analysis.ruleIds));
1697
+ log(formatJsonReport(results, config, { version }, analysis.ruleIds, analysis.examined));
1694
1698
  } else if (reporter === "agent") {
1695
1699
  log(formatAgentReport(results, config));
1696
1700
  } else if (reporter === "sarif") {
package/dist/index.d.ts CHANGED
@@ -238,6 +238,8 @@ interface AnalyzeResult {
238
238
  version: string;
239
239
  /** Ids of the rules that ran, after `--category` narrowing. The JSON report lists these so a rule that found nothing stays distinguishable from one that was never selected. */
240
240
  ruleIds: string[];
241
+ /** Per-rule, per-declaration counts of places examined, unfiltered by `--diff`/`--baseline`/suppressions. */
242
+ examined: Record<string, Record<string, number>>;
241
243
  /** Non-fatal config-file issues (unknown top-level keys, invalid enum values). Empty when no config file or none found. */
242
244
  warnings: string[];
243
245
  }
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  ruleOptionsSpec,
12
12
  run,
13
13
  spinnerEnabled
14
- } from "./chunk-J4JE5XJS.js";
14
+ } from "./chunk-6Y2E7QCQ.js";
15
15
  export {
16
16
  ProjectError,
17
17
  analyzeProject,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-vitals",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "A SvelteKit SEO checker — not a runtime Web Vitals reporter. Static analysis of your routes' head metadata.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "mri": "^1.2.0",
46
46
  "svelte": "^5.56.8",
47
47
  "tinyglobby": "^0.2.17",
48
- "@svelte-vitals/core": "0.36.1"
48
+ "@svelte-vitals/core": "0.37.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/estree": "^1.0.9",