yangshun/tree-node-cli

License issue

slorber opened this issue · 2 comments

Hi @yangshun

We use this package on Docusaurus (dev only) but its dependency "fast-folder-size" moved from license ISC to Anti-War ISC:

Being related to "anti war" is a concern for some users as reported here: facebook/docusaurus#8247

We only use it in dev/tests, but just having to download such package may be frightening for users.
We run it in CIs for tests, and I don't even know if all GitHub Actions CI servers run in countries that respect that license...

Note, the dependency was just "ISC" at 1.6.1, maybe we could freeze deps to that specific version instead?
https://github.com/simoneb/fast-folder-size/tree/v1.6.1


On Docusaurus (and many other projects?) we don't even use the sizes option.

My suggestion would be to have no dependency and allow providing a callback for computing the folderSize. Docs can recommend "fast-folder-size" as a possible implementation.

tree('path/to/dir',{
  sizes: true,
  getFolderSize: require("fast-folder-size/sync"),
});

(maybe the API could be adjusted as well)

Does it make sense?

Let's freeze it I guess. Agreed file size isn't even widely used.

Thanks, should be good enough for now 👍 . Fixed in 1.6.0