Skip to content

Fix #3: strip configured call-expression statements - #10

Merged
sam-parsons merged 1 commit into
mainfrom
feature/3-strip-configured-call-expressions
Apr 25, 2026
Merged

sam-parsons merged 1 commit into
mainfrom
feature/3-strip-configured-call-expressions

Conversation

@sam-parsons

Copy link
Copy Markdown
Owner

Summary

  • Added configured function-call stripping for standalone expression statements via functions option matching.
  • Supports dotted call targets like console.log and logger.debug.
  • Preserves non-target calls and inline call expressions, keeping issue scope focused.

Issues

How to test

  • npm run check
  • npm run build

Notes

  • Current implementation is regex-based and intentionally scoped to line-based standalone calls; AST-based handling and chain safety are tracked in later issues.

Learning notes

Scope-first implementation to avoid cross-issue coupling

What it is
Scope-first implementation means shipping one clearly bounded behavior per issue, even when you can see adjacent improvements. It keeps review size small and prevents hidden coupling between features.

Where it appears in this PR
src/index.ts adds stripConfiguredCallExpressions() for standalone configured calls, while explicitly leaving chain-edge handling out of this change.

Why it was the right call here
The alternative was combining call stripping with chained-call safety and map-generation refactors in one PR. That would increase risk and make regressions harder to attribute. By separating concerns, this PR validates core matching semantics first, and later issues can focus on correctness edges with targeted tests.

If you want to go deeper
Search: "incremental architecture" and "small batch size in code review".

Implement removal of configured standalone call-expression statements (including dotted paths like console.log) while keeping debugger and inline expression behavior unchanged for this issue scope.
@sam-parsons
sam-parsons merged commit c869d32 into main Apr 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue C: Strip configured function-call expression statements

1 participant