mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
A bundle that embeds fs-extra (build-utils does) compiled the package's own JavaScript, whose computed export table and graceful-fs internals the static model cannot follow. A __commonJS chunk whose key names a shimmed package's main file at a supported version now requires the shim instead, through a forwarder declaration beside the bundle: the checker follows it to the shim (a package's JavaScript cannot load TypeScript sources directly), and module resolution answers the shim for its path. The package's other chunks are no longer reached. Calls through such a require of a TypeScript module lower when the export never reads `this` (require() answers the module's namespace). package-shim-guard.test.ts compiles every registered shim module under both type worlds and fails on any lowering diagnostic or fence inside the shims, reached or not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 lines
362 B
JSON
8 lines
362 B
JSON
{
|
|
"name": "gtfsxbundle",
|
|
"version": "1.0.0",
|
|
"description": "real esbuild 0.27 output (--bundle --platform=node --format=cjs) of a TypeScript source that default-imports fs-extra 9.0.0 installed with pnpm, so fs-extra and its dependencies are bundled as __commonJS chunks keyed by package and version",
|
|
"main": "dist/index.js",
|
|
"types": "index.d.ts"
|
|
}
|