Commit f4a9616
[static blocks] Do not inject new static fields after static code (#17443)
* [static blocks] Do not inject new static fields after static code
* Update fixtures
* Less parentheses
* Avoid temp variable
* Preserve class name
* Fix Babel 8
* Fix ts
* fix ts again
* harden new-target test
* Fix old Babel 7 compat
---------
Co-authored-by: Huáng Jùnliàng <[email protected]>1 parent 764084a commit f4a9616
File tree
26 files changed
+412
-97
lines changed- packages
- babel-helper-create-class-features-plugin/src
- babel-plugin-proposal-decorators/test/fixtures/2023-11-misc/outer-class-binding-mutated
- babel-plugin-transform-class-static-block
- src
- test/fixtures/class-static-block
- before-static-fields
- class-binding
- class-declaration
- class-inferred-name
- in-class-heritage
- multiple-static-initializers
- name-conflict
- new-target
- preserve-comments
- var-scope
- babel-preset-env/test/fixtures
- bugfixes-always-enabled/static-class-fields-chrome-90
- preset-options-babel-7/deno-1_0
- preset-options/deno-1_0
- shipped-proposals/new-class-features-chrome-90
26 files changed
+412
-97
lines changedLines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2238 | 2238 | | |
2239 | 2239 | | |
2240 | 2240 | | |
2241 | | - | |
2242 | | - | |
2243 | | - | |
| 2241 | + | |
| 2242 | + | |
2244 | 2243 | | |
2245 | 2244 | | |
2246 | 2245 | | |
| |||
2288 | 2287 | | |
2289 | 2288 | | |
2290 | 2289 | | |
2291 | | - | |
| 2290 | + | |
2292 | 2291 | | |
2293 | 2292 | | |
2294 | 2293 | | |
| |||
2298 | 2297 | | |
2299 | 2298 | | |
2300 | 2299 | | |
2301 | | - | |
| 2300 | + | |
2302 | 2301 | | |
2303 | 2302 | | |
2304 | 2303 | | |
| |||
2313 | 2312 | | |
2314 | 2313 | | |
2315 | 2314 | | |
2316 | | - | |
| 2315 | + | |
2317 | 2316 | | |
2318 | 2317 | | |
2319 | 2318 | | |
| |||
2329 | 2328 | | |
2330 | 2329 | | |
2331 | 2330 | | |
2332 | | - | |
| 2331 | + | |
2333 | 2332 | | |
2334 | 2333 | | |
2335 | 2334 | | |
| |||
2358 | 2357 | | |
2359 | 2358 | | |
2360 | 2359 | | |
2361 | | - | |
| 2360 | + | |
2362 | 2361 | | |
2363 | 2362 | | |
2364 | 2363 | | |
| |||
2367 | 2366 | | |
2368 | 2367 | | |
2369 | 2368 | | |
2370 | | - | |
| 2369 | + | |
2371 | 2370 | | |
2372 | 2371 | | |
2373 | 2372 | | |
| |||
2396 | 2395 | | |
2397 | 2396 | | |
2398 | 2397 | | |
2399 | | - | |
| 2398 | + | |
2400 | 2399 | | |
2401 | 2400 | | |
2402 | 2401 | | |
| |||
2455 | 2454 | | |
2456 | 2455 | | |
2457 | 2456 | | |
2458 | | - | |
| 2457 | + | |
2459 | 2458 | | |
2460 | 2459 | | |
2461 | 2460 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
Lines changed: 21 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
111 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
156 | 163 | | |
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 168 | + | |
165 | 169 | | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| |||
0 commit comments