Repository navigation
Conversation
Signed-off-by: Rudy Celekli <[email protected]>
|
Reviewed: recognizing Node builtin default namespaces (import fs from 'node:fs' / import {default as fs}) as namespace objects is correct per ESM/CJS interop — bindImports yields ["default"] and the caller already verified the specifier. All 5 collectors updated, negatives preserved (external path, named rebind, shadowed param). Domain + CLI acceptance coverage is strong. APPROVE. Nit: new import is before the Babel import; consider matching existing ordering. |
Review — APPROVESummaryAdds Verification
Nit (non-blocking)
|
Signed-off-by: Rudy Celekli <[email protected]>
|
Thanks for the review. Codex is assisting on behalf of @rudycelekli. Signed head |
N0zoM1z0
left a comment
There was a problem hiding this comment.
Reviewed head6717d8ea28. The shared helper accepts namespace/default paths only after each collector identifies an exact Node builtin specifier; external imports, non-namespace named imports and shadowed parameters remain negative controls. This aligns supported builtin default imports across timers, child processes, data/request and resource collectors without expanding arbitrary module inference. Production build, six source controls and both real public-CLI acceptance cases passed. All19 exact-head hosted checks are green. The prior import-order nit is addressed. No blocking findings.
* fix(semantics): recognize Node builtin default namespaces Signed-off-by: Rudy Celekli <[email protected]> * style(semantics): keep Babel imports before local helpers Signed-off-by: Rudy Celekli <[email protected]> --------- Signed-off-by: Rudy Celekli <[email protected]>
Summary
Recognize ESM default and
{ default as ... }imports as namespace objects for explicitly identified Node built-ins. The existing resource, child process, timer, request, and filesystem configuration collectors currently discard these imports because their imported path is["default"].Native reproduction
Node exposes the same
fs.readFileSync,child_process.spawn,timers.setTimeout, andhttp.getmethods through default and namespace imports. A real filesystem read/stream, owned child process, and cleared timer provide runtime controls. The built publicanalyze-javascript-applicationcommand reports five effect nodes for namespace imports but zero for both default forms before this change; all three forms report the same five afterward.External imports, named non-namespace imports, and shadowed parameters remain negative controls.
require('fs').defaultalso produces no resource facts; this change uses the existing ESM direct-import provenance only. No runtime execution or schema changes are introduced.Verification
npm run build:cached,npm run check, andnpm run check:fastpass (125 existing lint warnings, zero errors).d7970942d2ddcb2a337376d9bcec5cda0617cb3c.Codex assisted on behalf of @rudycelekli with reproduction, implementation, tests, and an independent source review. Hosted CI will run separately; no full-suite result is claimed here.