[CLI] "Reserved Names" are Ignored When "Rename Globals" is Enabled
See original GitHub issueRelated to the closed javascript-obfuscator/javascript-obfuscator-ui#27 - Still happening for me @2.10.1
CLI
test.js --output test.min.js --reserved-names 'a' --rename-globals true --log true
test.js
var a;
test.min.js
var a0_0x2ffb6f;
CLI Output
[javascript-obfuscator-cli] Obfuscating file: test.js… [javascript-obfuscator] Version: 2.10.1_2021-01-01T13:47:46.265Z [javascript-obfuscator] Obfuscation started… [javascript-obfuscator] Random generator seed: 583819106… [javascript-obfuscator] Code transformation stage: PreparingTransformers… [javascript-obfuscator] AST transformation stage: Initializing… [javascript-obfuscator] AST transformation stage: Preparing… [javascript-obfuscator] AST transformation stage: Converting… [javascript-obfuscator] AST transformation stage: RenameIdentifiers… [javascript-obfuscator] AST transformation stage: StringArray… [javascript-obfuscator] AST transformation stage: Simplifying… [javascript-obfuscator] AST transformation stage: Finalizing… [javascript-obfuscator] Code transformation stage: FinalizingTransformers… [javascript-obfuscator] Obfuscation completed. Total time: 0.035 sec.
NPM
$ npm list -g | grep javascript
-- javascript-obfuscator@2.10.1 +-- @javascript-obfuscator/escodegen@2.1.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
I can’t reproduce. With your command and source code I got the following output:
Running the command from git bash works correctly
Changing
'a'
to"a"
in phpStorm fixed the issueThanks for following up.