Skip to content

bundler: handle keep-names edge cases - #44180

Open
in0vik wants to merge 1 commit into
oven-sh:claude/keep-names-implfrom
in0vik:codex/keep-names-pr40503
Open

in0vik wants to merge 1 commit into
oven-sh:claude/keep-names-implfrom
in0vik:codex/keep-names-pr40503

Conversation

@in0vik

@in0vik in0vik commented Sep 29, 2026

Copy link
Copy Markdown

What does this PR do?

Small follow-up to #40503 for three keepNames edge cases:

  • Count the synthetic __name() read so minification cannot inline away a block-scoped function binding.
  • Preserve inferred names through ??=, ||=, and &&= assignments.
  • Leave user-defined static name methods, accessors, and fields intact.

The patch adds focused runtime tests and keeps the existing tree-shaking test unchanged.

How did you verify your code works?

  • BUN_EXE="$PWD/build/debug/bun-debug" ./build/debug/bun-debug test test/bundler/bundler_minify.test.ts — 51 pass, 0 fail.
  • git diff --check b406b4bd..HEAD — clean.

Merge Danger

Door: Two-way. Blast radius: keepNames output and the __name runtime helper. This targets the feature branch, so #40503 can absorb or adjust it before landing on main.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

This branch has not been deployed

No deployments
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.

1 participant