Skip to content

Fix capacity under-allocation in ESMConditions.init with user conditions - #30479

Closed
robobun wants to merge 1 commit into
mainfrom
farm/00611ee7/fix-esm-conditions-capacity
Closed

Fix capacity under-allocation in ESMConditions.init with user conditions#30479
robobun wants to merge 1 commit into
mainfrom
farm/00611ee7/fix-esm-conditions-capacity

Fix capacity under-allocation in ESMConditions.init

00b7eab
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed May 11, 2026 in 8m 31s

Code review found 1 potential issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 0
🟣 Pre-existing 1
Severity File:Line Issue
🟣 Pre-existing src/bundler/options.zig:1090 Same if-else precedence footgun remains in loadersFromTransformOptions

Annotations

Check notice on line 1090 in src/bundler/options.zig

See this annotation in the file changed.

@claude claude / Claude Code Review

Same if-else precedence footgun remains in loadersFromTransformOptions

Heads up: the same `if ... else 0 + ...` precedence footgun this PR fixes also exists in `loadersFromTransformOptions` in this file (lines 1575-1578). It's harmless there — the under-reserved capacity still covers the `putAssumeCapacity` calls and the remaining inserts use `getOrPutValue` which grows the map — so it's just a missed pre-allocation, but you may want to fix both occurrences together. (Pre-existing, not introduced by this PR.)