Repository navigation
feat(report): a JavaScript shipped line in every report format (squirrelscan/repo#3397) - #1205
Merged
Merged
Conversation
nc9
force-pushed
the
feat/3397-javascript-shipped
branch
from
November 18, 2026 12:42
eba3a4c to
7584ccc
Compare
nc9
marked this pull request as ready for review
November 18, 2026 13:03
nc9
force-pushed
the
feat/3397-javascript-shipped
branch
from
November 18, 2026 15:55
7584ccc to
9c90ff6
Compare
…relscan/repo#3397) Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
feat/3397-javascript-shipped
branch
from
November 18, 2026 17:05
9c90ff6 to
45305c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Public half of squirrelscan/repo#3397: a "JavaScript shipped" line in every report format.
Rebased onto main as one commit, after #1181 (link sections, renderers) and #1203 (Markdown escaping) landed.
What it says
<script src>files with a measured size. Same-site scripts count their decoded body (orContent-Lengthover the 5 MB fetch cap). Third-party scripts count theContent-Lengthfrom their HEAD check; those run withreliability/broken-resourcesand never offline. Inline scripts are not counted./_next/static/,/_nuxt/,/_astro/or/_app/immutable/. Gatsby and Remix have no unambiguous path, so they are not claimed. Its share is of the whole total.How
javascript-shipped.tsholds theJavascriptShippedtype and a purebuildJavascriptShipped. AddsAuditReport.javascriptandCrawlMetadata.javascript.JSON_REPORT_SCHEMA_VERSIONis now 1.28.runRulesOnStorage) put the block onRuleExecutionResult.javascriptfrom the fetched assets (a caller with no fetched scripts gets no block).buildV1ReportandbuildV2Reportattach it through one shared helper, falling back to the block stamped on the crawl.crawls.javascript_shipped(additive, nullable, also in the reconcile list), after main's 43.updateCrawlwrites it andgetCrawlreads it.squirrel auditandsquirrel analyzestamp it;reconstructReportrestores it, so the live report and a latersquirrel reportagree; the console prints the summary line under Scan details.javascript; llm and xml a<javascript>element with<page>children. Markdown escapes the framework name and URLs; HTML renders them as text; llm and xml escape attributes.Schema
The JSON report gains a top-level
javascriptfield, so this claims schema 1.28 (no other open PR claims it). The version tests anddocs/configuration/output.mdxare updated.Changelog
changelog.d/3397-javascript-shipped.added.md.CHANGELOG.mdis unchanged from main.Tests
javascript-shipped.test.ts: literal expected lines for text, Markdown (both lines in full), HTML, llm, xml and JSON; omission in every format; a hostile framework name or URL is escaped. Removing each renderer's wiring fails its test (checked for text, Markdown, HTML, JSON, llm, xml).console-javascript-shipped-3397.test.ts: the console line, literal; fails when the line is unwired.reconstruct-scan-scope-1050gains the round-trip.javascript-shipped-migration.test.ts: the v43 upgrade, the round-trip with status, an old-CLI insert, and the schema pinned at 44.javascript-shipped-report.test.ts: the rules phase measures, v1 and v2 agree, no scripts means no block, the stamped-crawl fallback.javascript-shipped.test.ts: totals, dedupe, unmeasured classes, framework paths, top 3 with ties.Checks
bun run scripts/test-suites.ts --check: covers every test file--run report: 1406 pass, 0 fail--run cli: 4516 pass, 14 skip, 0 fail--run audit-engine: 2317 pass, 3 skip, 0 fail--run crawler: 1150 pass, 0 failformat:checkandlintok; reportbuild:css:checkup to datemake validate: all checks passedDocs and skill
docs/reports.mdxhas a "JavaScript shipped" section;docs/configuration/output.mdxadds thejavascriptkey, its fields and the 1.28 note.llmandjsonformats gain a field agents read. Filed as squirrelscan/repo#3575 (labelskills).