You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version (complete output of terser -V or specific git commit)
$ terser -Vterser 5.15.1
Complete CLI command or minify() options used
I turned off the unsafe option.
$ terser input.js -c unsafe=false
terser input
--(x=>0?.())().x;
terser output or error
--0?.().x;
Expected result
Input code throws TypeError:
$ node input.jsinput.js:1-- ( x => 0 ?. ( ) ) ( ) . x ; ^TypeError: 0 is not a function at input.js:1:16 at Object.<anonymous> (/Users/p51lee/dev/javascript-test/input.js:1:22) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47Node.js v18.11.0
but output code throws SyntaxError:
$ terser input.js -c unsafe=false | node[stdin]:1--0?.().x; ^^^^^^^SyntaxError: Invalid left-hand side expression in prefix operation at new Script (node:vm:100:7) at createScript (node:vm:265:10) at Object.runInThisContext (node:vm:313:10) at node:internal/process/execution:79:19 at [stdin]-wrapper:6:22 at evalScript (node:internal/process/execution:78:60) at node:internal/main/eval_stdin:30:5 at Socket.<anonymous> (node:internal/process/execution:195:5) at Socket.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12)Node.js v18.11.0
The text was updated successfully, but these errors were encountered:
Bug report
Version (complete output of
terser -V
or specific git commit)Complete CLI command or
minify()
options usedI turned off the
unsafe
option.$ terser input.js -c unsafe=false
terser
inputterser
output or errorExpected result
Input code throws
TypeError
:but output code throws
SyntaxError
:The text was updated successfully, but these errors were encountered: