You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tech-detect: next/script props heuristic reads client components with a src or code-like prose (#1442 residual) #1444
Residual from the review of #1442 (Next.js flight scripts are read for the script elements they carry). A production Next build names the next/script component $L2 with a numeric module id, so the reader identifies it by its props: a strategy, an id with inline code, or a src. That shape can be matched by a client component that is not a script:
a component with an id and prose children that contain a ( and a ; or { (for example a note whose text mentions a vendor URL and some punctuation) is read as an inline loader;
any client component with a src prop (an embed, an avatar, a media wrapper) has its src read as a script URL.
So a vendor that the page only mentions or embeds as content can still be detected from a flight payload, narrower than before #1442 but not closed.
Acceptance Criteria
A client component with an id and prose children containing ( and ; (and no JavaScript token) is not read as an inline loader: a vendor URL in that prose does not detect the vendor, in a real next build fixture.
A client component with only a src prop (no strategy, no id) does not have its src read as a script URL.
A src on a component that also has a strategy or an id is still read, and the real-build loader positives (afterInteractive children, lazyOnload __html and src, body-placed, Next 14 and 15) are still detected.
String children of a component are read as code only when they contain a JavaScript token (function, =>, an assignment, .createElement, window.).
Tests cover parenthesised prose with an id, and a client component with a src, with the vendor URL as the only signal.
docs/cloud/technologies.mdx describes how a next/script component is recognised, accurately.
Activity
fix(tech-detect): next/script props need a JS token in children and a…
fix(tech-detect): next/script props need a JS token in children and a…
nc9 commentedon Oct 31, 2026
Shipped in v0.0.152 (
826306d7), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.152nik