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
A package.json without a name inside a dependency makes its symbols anonymous #525
A file under a nested package.json that has no name gets the anonymous package . ., even though a package.json with a name sits higher up. Published packages often have such files only to set the module type, for example {"type": "module"} in esm/.
That loses which package a symbol belongs to. Different packages can also end up with the same symbol: @simplewebauthn/browser/esm/index.d.ts and hono/dist/types/index.d.ts are both scip-typescript npm . . index.d.ts/.
Each of these directories has a package.json without name: {"type": "module"}, {"type": "commonjs"}, or zod's {"type", "main", "module", "types"}.
Expected
Packages.symbol passes over a package.json that has no name and keeps looking in the parent directories, the way Node does when it resolves a package's name. The symbols above would then be scip-typescript npm zod 4.1.12 v4/classic/external.d.cts/, scip-typescript npm hono 4.10.4 dist/types/hono.d.ts/Hono#, and so on.
Right now src/Packages.ts returns ScipSymbol.anonymousPackage() as soon as it finds a package.json that has no string name ("Fallback to an anonymous package because we found a package.json but were unable to parse the name and version"). The anonymous package could be kept for when no named package.json exists up to the project root.
Impact
Tools that read the index to tell which npm package a file depends on (cross-repository navigation, dependency checks) can't attribute these symbols. We hit this in easement and now recover the package from the import's string literal, but that can't work for uses of names like z.string().
Activity
linear-code commentedon Nov 2, 2026
OSS-24229