Skip to content

pkg/cjsexports: pure-Go CJS export detection using esbuild parser#5

Merged
paralin merged 1 commit intoaperturefrom
cjsexports
Feb 18, 2026
Merged

pkg/cjsexports: pure-Go CJS export detection using esbuild parser#5
paralin merged 1 commit intoaperturefrom
cjsexports

Conversation

@paralin
Copy link
Member

@paralin paralin commented Feb 18, 2026

Adds a public API for detecting CommonJS named exports by walking the esbuild AST. Handles exports.X, module.exports, Object.defineProperty, annotation pattern, variable aliasing, IIFE, conditionals, NODE_ENV, call mode, and function return analysis.

Adds a public API for detecting CommonJS named exports by walking the esbuild
AST. Handles exports.X, module.exports, Object.defineProperty, annotation
pattern, variable aliasing, IIFE, conditionals, NODE_ENV, call mode, and
function return analysis.

Signed-off-by: Christian Stewart <christian@aperture.us>
@paralin paralin merged commit 296d3ad into aperture Feb 18, 2026
10 of 18 checks passed
@paralin paralin deleted the cjsexports branch February 18, 2026 02:06
paralin added a commit that referenced this pull request Feb 18, 2026
…#5)

Adds a public API for detecting CommonJS named exports by walking the esbuild
AST. Handles exports.X, module.exports, Object.defineProperty, annotation
pattern, variable aliasing, IIFE, conditionals, NODE_ENV, call mode, and
function return analysis.

Signed-off-by: Christian Stewart <christian@aperture.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants