svelte-vitals
Version updated for https://github.com/oekazuma/svelte-vitals-action to version v0.9.0.
- This action is used across all versions by ? repositories.
Action Type
This is a Node action using Node version 24.
Go to the GitHub Marketplace to find the latest changes.
Action Summary
The svelte-vitals-action is a GitHub Action that automates static SvelteKit code health checks on pull requests. It provides inline annotations, a job summary, and a single sticky PR comment that updates in place on each push. The action uses the svelte-vitals CLI for analysis and supports configuration via committed files, such as svelte-vitals.config.* and svelte-vitals-suppressions.json. It fails the job when gating findings are present and provides a report regardless of whether it’s a pull request or fork PR.
What’s Changed
Minor Changes
9f513e6: Update the bundled analyzer to
svelte-vitals0.45.1 /@svelte-vitals/core0.41.1, a wide range covering several upstream releases. The action’s inputs and outputs are unchanged, and the step still fails onfailOnseverity rather than on any score — but that severity table itself moved, so read the first two entries before upgrading a workflow you rely on:- The default gate loosens:
seo/description-presencedrops fromcriticaltowarning. Under the defaultfailOn: critical, a project whose only failure was a missing<meta name="description">now passes the step where it used to fail it. If you were relying on that block, setfailOn: warningor override the rule’s severity in your config. Three more severities moved, and they only bite under a non-defaultfailOn: warning:seo/og-urlinfo→warning(the one tightening — a previously green run can turn red),seo/og-descriptionwarning→info, andseo/single-h1splitting per finding so that two or more<h1>is nowinfowhile a missing one stayswarning. Theseo::routescoring pair’s total weight drops from 110 to 100 as a result, so SEO and Health can shift a point or two with no finding change at all. - A previously green run can turn red from files that were never analyzed. A parse crash on argument-less
$state()—let el = $state();, the idiomaticbind:thisdeclaration — used to make the whole component invisible to every rule, silently. Those files are analyzed now, and what surfaces in them can includecriticalfindings that fail the default gate. That is the fix working. - A rule that throws no longer fails the whole step. The run completes without that rule and its weight is removed from the Health denominator, so the score is not silently inflated. Previously the exception propagated and the action failed the job outright. Note the tradeoff: the action does not yet surface the analyzer’s non-fatal warnings, so the skipped rule’s id is not reported anywhere — a rule that fails now goes unmentioned instead of loud.
- The job summary and the sticky PR comment are hardened against the analyzed project’s own content. Strings quoted from the repo under analysis — file paths, route ids, and rule messages embedding page content such as
<title>text or JSON-LD values — can no longer forge report structure: an embedded newline, code fence, heading,[text](url)link or bare<tag>renders as inert quoted text. Visible on well-behaved projects in one place: a message containing a literal tag (Missing <title>) now renders as inline code, which also fixes table cells silently dropping such tags. - More of the project is reachable, so findings move in both directions. Head and heading resolution now follows a component imported through a
kit.alias/kit.files.libalias ($components,$ui, …) instead of only$lib/…and relative paths; everyapplication/ld+jsonscript on a route is analyzed instead of only the last one; andseo/single-h1counts headings rendered by imported local components. False “Missing” findings on routes whose content lives in such components disappear and Health can rise, while defects inside them — an empty<title>, invalid JSON-LD, a second<h1>— become visible for the first time. seo/json-ld-validitynow checks@typeagainst the schema.org vocabulary. A bare type name that is not an exact, case-sensitive schema.org type produces awarning, with a did-you-mean hint for a casing slip or a typo within edit distance 2. IRI and prefixed forms are never flagged, and a document whose@contextnames a non-schema.org vocabulary is exempt.- Several false positives removed.
seo/json-ld-required-propswas stale against Google’s current requirements — theArticle/BlogPosting/NewsArticle,OrganizationandPersonrows are gone,Productnow accepts any one ofreview/aggregateRating/offers,Recipeneeds onlyname+image,VideoObjectdropsdescription.security/handler-state-writeandsecurity/shared-state-importno longer fire on a universal+page.ts/+layout.tsthat exportsssr = false; since the former iscritical, that can turn a red run green.performance/render-blocking-scriptno longer flags non-executing script types (text/partytown,importmap,speculationrules).correctness/effect-as-onmountno longer flags an$effectreading reactive state through a member expression on an imported binding or anew …()local.
- The default gate loosens:
Patch Changes
e40f45c: Fix the
baselineinput reporting every finding as new on projects whosesvelte-vitals.config.*importssvelte-vitals— the shape theinstallwizard scaffolds.The baseline ref is analyzed inside a temporary git worktree, and that worktree has no
node_modulesin its ancestry, so re-loading the config file from within it threw on the import. The comparison caught the error and fell back to reporting everything, which is the opposite of what the input is for: a gate meant to show only new findings showed all of them. The action now hands its own config-file load to the baseline analysis instead of letting it look for one.Both sides of the comparison therefore run under the same config, so editing
svelte-vitals.config.*between the baseline ref and the current commit no longer makes findings look new on its own.f2f9314: Update the bundled analyzer to
svelte-vitals0.46.0 /@svelte-vitals/core0.42.0. Nothing the action reports changes: no rule severity, score, finding, annotation, job summary or sticky-comment output moves. Upstream’s visible work in this range is CLI-only (shell completion, spinner cursor restore, theci installworkflow scaffold, and the dispatch layer’s exit code), and the rest is internal refactoring plus two new library exports the action does not use yet.18d8dea: Surface the analyzer’s non-fatal warnings as workflow annotations.
analyzeProjectreports config-file problems, version-floor notices, unparseable files it skipped, and rules that crashed and were dropped from the run — the action collected all of it and printed none of it.The crashed-rule case is why this matters now. A rule that throws no longer aborts the analysis; the run completes without it and its weight leaves the Health denominator, so nothing about the report looks wrong. Before, the exception propagated and failed the job outright. Without this, an incomplete scan passed the gate with no trace of which rule was missing.
The gate is unchanged — these are annotations, not failures.