fix(semantics): recognize Node builtin default namespaces (#769)

* fix(semantics): recognize Node builtin default namespaces

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>

* style(semantics): keep Babel imports before local helpers

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>

---------

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
This commit is contained in:
Rudy Mizrahi Celekli authored and GitHub committed 2026-10-07 10:25:59 +08:00
1 parent 630bdafcac
commit 24a0bf9a61
8 files changed
+118 -5

No files matched your search

@@ -1,5 +1,7 @@
import * as t from "@babel/types";
import { semanticBuiltinNamespacePath } from "./javascriptSemanticProvenance.js";
import { semanticCallableIdForNode } from "./javascriptSemanticProjection.js";
import {
resolveSemanticBindingState,
@@ -157,7 +159,8 @@ export const builtinDataEffectMethod = (
);
const namespace = binding?.directOrigins.some(
({ specifier, importedPath }) =>
specifiers.includes(specifier) && importedPath.length === 0,
specifiers.includes(specifier) &&
semanticBuiltinNamespacePath(importedPath),
);
return namespace
? semanticStaticPropertyName(callee.property, callee.computed)