Commit aadee81
committed
fix(build): releaseProd died on nullish coalescing - terser 3 can't parse it
gulp-minify@3.1.0 bundles terser 3.17 (2019), which predates ES2020
syntax. A single `?? 9` in VulnerabilityInspection.js (part of the core
bundle via extensionsIntegrated) crashed makeJSDist with the line-less
"Cannot read properties of undefined (reading 'replace')" error. Dev
builds run unminified in Chromium, which parses `??` natively - so this
only surfaces in the prod pipeline.
Replaced with an `in`-guarded rank lookup (same semantics: critical maps
to rank 0, which is falsy, so a plain || fallback would mis-sort it -
covered by the existing dedup/sort spec).
Swept all shipped src for other ES2020+ syntax (?. / ?? / logical
assignment): this was the only real occurrence. Constraint: shipped src/
must stay at ES2019 syntax until the minifier is upgraded; src-node,
tests and src-mdviewer are exempt.
releaseProd now completes: 53s, dist size validation green (72.94 MB).
unit:JSONSupport 18/18.1 parent 86604fc commit aadee81
1 file changed
Lines changed: 6 additions & 2 deletions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| |||
0 commit comments