Expand description
JavaScript language plugin for Code Ranker.
Handles .js, .jsx, .mjs, .cjs files via tree-sitter-javascript.
Also exposes shared ECMAScript parsing helpers (ecmascript_level,
analyze_ecmascript, detect_with_marker) so the TypeScript plugin can
reuse the walker/resolver without any copy-paste.
Structs§
- Javascript
Plugin - The JavaScript language plugin (handles .js / .jsx / .mjs / .cjs).
Functions§
- analyze_
ecmascript - Walk
workspace, parse every file whose extension is inexts, and build an [api::Graph] of file + external nodes connected by"uses"edges. - detect_
with_ marker - Return
truewhenworkspacecontains the given marker file. - ecmascript_
is_ test_ path - ECMAScript test conventions, shared by the JS and TS plugins:
*.test.*/*.spec.*files and anything under__tests__,__mocks__,testsortestdirectories. - ecmascript_
level - Build the single “files”
Levelthat both JS and TS plugins expose. - external_
package - Extract the package name for a bare (non-relative, non-alias) import
specifier:
react→react,lodash/fp→lodash,@scope/pkg/sub→@scope/pkg. ReturnsNonefor relative (./,../) and@/alias specifiers.