javascript-obfuscator / grunt-contrib-obfuscator

Grunt plugin for the javascript-obfuscator package.
MIT License
29 stars 20 forks source link

Please update package.json to latest #6

Closed ghost closed 4 years ago

ghost commented 6 years ago

JavaScript-obfuscator is now on 0.17.x , while your package.JSON is at ^0.10.0. Please update it to "latest" so it remains up-to-date.

slig commented 6 years ago

I don't think that using "latest" is the best option, as each future install of this plugin will possibly install different versions of javascript-obfuscator, and those might have a different API and break this plugin.

Ideally the user installing grunt-contrib-obfuscator might add a different version of javascript-obfuscatorto their package.json and this plugin would use that version. I'm not sure if that's possible or not.

ascandal commented 5 years ago

I'm facing this same issue. I would like to use the latest version 0.18.1 in my grunt tasks. Is there any known reasons why this version would not be compatible with grunt-contrib-obfuscator?

slig commented 5 years ago

Hi,

I'm thinking of setting the javascript-obfuscator in the peerDependencies. What do you think?

ascandal commented 5 years ago

That may make it easier to maintain while satisfying update requests.

This reference gives a general rule to help decide when to use peerDependencies.

if the type of a function in a package’s public interface somehow depends on a dependency, it should be a peer dependency.

I think I saw something elsewhere to use it with plugins like grunt.

rvalitov commented 4 years ago

In my case I simply specify the required version of javascript-obfuscator in the package.json file, for example below is a piece of the JSON file:

{
  "devDependencies": {
    "grunt": "^1.0.4",
    "grunt-contrib-obfuscator": "^4.0.0",
    "javascript-obfuscator": "^0.18.8"
  }
}

And all works fine. It worked with different 0.18.x versions (0.23.2 tested, also fine). I think it can work the same way with the newer versions of javascript-obfuscator.

P.S. Using peerDependencies is a great idea!

sanex3339 commented 4 years ago

Updated. Should wait for the release

@slig can you release a new version?

slig commented 4 years ago

Hi! Thanks for updating this package.

Can I invite you to the NPM package and later transfer it to you? I'm not at my machine at this moment.

sanex3339 commented 4 years ago

It will be good

slig commented 4 years ago

Done.