OR flattenArray's needsUnwrap with nested results instead of overwriting (#3133) - #3149
OR flattenArray's needsUnwrap with nested results instead of overwriting (#3133)#3149ryansolid wants to merge 1 commit into
Conversation
…ing (#3133) Under doNotUnwrap, an accessor child followed at the same level by a function-free fragment reset the flag, so flatten returned a plain array with the raw accessor inside instead of the resolving wrapper. Every renderer crashes on the raw function: universal hosts receive it in insertNode (as reported), and the DOM renderer throws insertBefore 'parameter 1 is not of type Node' — the protective function branch remembered from 1.x dom-expressions does not exist in 2.0, so this was not universal-specific. Fix as proposed in the report; pinned at both the signals and web layers. Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 2ecedf4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Coverage Report for CI Build 33371165631Coverage remained the same at 71.652%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Merging this PR will degrade performance by 28.59%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | merge |
225.1 µs | 326.7 µs | -31.11% |
| ❌ | merge |
264.7 µs | 364.2 µs | -27.33% |
| ❌ | merge |
265.2 µs | 364.6 µs | -27.27% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/flatten-needsunwrap-or (2ecedf4) with next (28a1eaf)
Footnotes
-
132 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Summary
Fixes #3133; supersedes #3142.
flattenArrayOR-s itsneedsUnwrapflag with a nested call's result instead of overwriting it, so an accessor followed at the same level by a function-free fragment still gets the resolving wrapper.@solidjs/webwas protected byinsertExpression's function branch — that branch is 1.x dom-expressions and does not exist in 2.0. The DOM renderer crashes on the same shape (Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'), verified pre-fix in jsdom. So this was a crash across every renderer, not a universal-only defect.flattentests (wrapper kept for accessor-then-fragment and fragment-nested-accessor orders, plain array when nothing unwraps — both wrapper pins fail pre-fix) and a web/jsdom render test (fails pre-fix with the insertBefore TypeError).Test plan
Made with Cursor