Skip to content

"exclude" member of config file does not work as expected. #593

Closed

Description

@n2vram

Note: I've been searching for the official documentation on the config file syntax and have not found it, perhaps I'm using it wrong. Can you please point me to the config file documentation?

Expected Behavior

Using "exclude" in the config should work the same as if provided on the command line.

Current Behavior

The "exclude" member of the config file is ignored.

Steps to Reproduce

$ mkdir -pv a/{b,c}
$ for f in a{,/b,/c}/{d,e,f}.js;do echo "console.log('this is $f');" > $f;done
$ javascript-obfuscator a --exclude a/b
[javascript-obfuscator-cli] Obfuscating file: a/c/d.js... 
[javascript-obfuscator-cli] Obfuscating file: a/c/e.js... 
[javascript-obfuscator-cli] Obfuscating file: a/c/f.js... 
[javascript-obfuscator-cli] Obfuscating file: a/d.js... 
[javascript-obfuscator-cli] Obfuscating file: a/e.js... 
[javascript-obfuscator-cli] Obfuscating file: a/f.js... 
$ echo 'module.exports = {exclude:["a/b"]};' > cfg.js
$ javascript-obfuscator a --config cfg.js
[javascript-obfuscator-cli] Obfuscating file: a/b/d.js... 
[javascript-obfuscator-cli] Obfuscating file: a/b/e.js... 
[javascript-obfuscator-cli] Obfuscating file: a/b/f.js... 
[javascript-obfuscator-cli] Obfuscating file: a/c/d.js... 
[javascript-obfuscator-cli] Obfuscating file: a/c/e.js... 
[javascript-obfuscator-cli] Obfuscating file: a/c/f.js... 
[javascript-obfuscator-cli] Obfuscating file: a/d.js... 
[javascript-obfuscator-cli] Obfuscating file: a/e.js... 
[javascript-obfuscator-cli] Obfuscating file: a/f.js... 

Your Environment

OS: Fedora 31

$ node --version
v12.16.1
$ javascript-obfuscator --version
0.27.2_2020-03-16T08:53:54.447Z

Stack trace

N/A

Minimal working example that will help to reproduce issue

see above.

Activity

  1. added a commit that references this issue on Apr 10, 2020
  2. sanex3339 commented on Apr 10, 2020

    @sanex3339
    Member

    Fix #594

  3. sanex3339 commented on Apr 10, 2020

    @sanex3339
    Member

    Expect a release tomorrow

  4. sanex3339 commented on Apr 11, 2020

    @sanex3339
    Member

    Released as 0.27.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions