mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-26 06:34:20 +08:00
Leave an @types twin with no runtime package to the declaration bar in transitive selection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e2c7eac01d
commit
b4e25cdba0
@@ -214,7 +214,9 @@ function detectAutoPackages(
|
||||
continue;
|
||||
}
|
||||
if (judged?.has(npm.packageName)) continue;
|
||||
if (viaTransitive) {
|
||||
// An @types twin with no runtime package installed has nothing to
|
||||
// compile (Node cannot load it either).
|
||||
if (viaTransitive && !npm.packageName.startsWith("@types/")) {
|
||||
judged!.add(npm.packageName);
|
||||
sites!.set(npm.packageName, loc);
|
||||
transitive.add(npm.packageName);
|
||||
|
||||
Reference in New Issue
Block a user