Commit 569bfae
fix hyper-spec: preserve newlines in hyperspec_compile for ASI correctness
Opal 1.8.2 generates `(e = $err)\ntry { ... }` for begin/rescue in
expression position. The previous `.delete("\n")` stripped all newlines,
making this `(e = $err) try { ... }` — invalid JS since ASI rule #4
requires a newline before `try`. Chrome 145 rejects this with
"Unexpected token 'try'". Removing `.delete("\n")` fixes 2 NativeLibrary
tests and likely the 11 prop-type validation tests whose validators also
contain rescue blocks.
Also:
- Update componentStack assertion to be format-agnostic (React 18 changed
from "in ComponentName" to webpack source map format)
- Add goog:loggingPrefs to chrome_headless_github_actions driver so
browser console logs are captured for prop-type warning assertions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 5c30dcf commit 569bfae
3 files changed
Lines changed: 3 additions & 2 deletions
File tree
- ruby
- hyper-component/spec/client_features
- hyper-spec/lib
- hyper-spec/internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments