mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
scriptc's resolver and tsgo must answer one runtime file for every opted-in npm edge; four disagreements left the file outside tsgo's program (SC2013 "did not join the type-checked program") for express, axios, body-parser, execa, fast-glob, globby, knex, uuid and tldts: - uuid: the node-condition hoist re-added the inner "types" key after the claims were deleted; tsgo then took the browser build. Delete the claims after the hoist. - tldts: tsgo's TypeScript-first lookup took the shipped root index.ts over "main". The fs shadow hides installed TypeScript sources of opted-in packages that have no same-stem runtime JavaScript. - express: tsgo redirected same-version duplicate installs to one copy, either dropping a copy or merging two Node module instances into one. The shadow serves opted-in package.json files without "version". - deep chains (get-intrinsic, dunder-proto, run-parallel, reusify, supports-color): maxNodeModuleJsDepth charges every node_modules hop. The program-root fixpoint also roots opted-in bare edges' runtime files that the program is missing. All changes are gated on --npm-static being active. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 lines
54 B
TypeScript
4 lines
54 B
TypeScript
import { depth } from "hop-1";
|
|
|
|
console.log(depth());
|