Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace fmin package dependency with local code #56

Closed
wants to merge 25 commits into from

Conversation

rwillingeprins
Copy link

Moved only the relevant code of the fmin dependency directly into this repo with minor fixes. Besides reducing bloat, this fixes a high severity vulnerability and a couple of deprecation warnings.

@sgratzl sgratzl changed the base branch from main to develop November 9, 2024 00:56
@sgratzl
Copy link
Member

sgratzl commented Nov 9, 2024

what is the license/copyright of fmin? at least this needs a clear indication in the code that this is from another repository.

@sgratzl
Copy link
Member

sgratzl commented Nov 9, 2024

can you elaborate why this approach is better than updating fmin to the latest version only? shouldn't tree-shaking handle removal of all the unused code?

@sgratzl
Copy link
Member

sgratzl commented Nov 9, 2024

it seems the fmin is licensed under BSD-3 while this package is MIT.

@sgratzl
Copy link
Member

sgratzl commented Nov 9, 2024

@rwillingeprins have you thought of forking fmin, cleaning it up and pubhsling the fork on maintained fork on NPM? the this repo can just reference that one instead of getting into a grey zone of copying code.

@rwillingeprins
Copy link
Author

rwillingeprins commented Nov 10, 2024

can you elaborate why this approach is better than updating fmin to the latest version only?

I think you already noticed it yourself but there was an error in the latest version of fmin as well as some remaining bloat.

shouldn't tree-shaking handle removal of all the unused code?

Well even though this package is published with a single bundled file including the (partially) filtered dependencies, those dependencies (and their dependencies) are all still installed into node_modules because they are also listed in package.json. Would it make sense to list them under devDependencies instead if they are only needed during development to build the published venn.js?

what is the license/copyright of fmin? at least this needs a clear indication in the code that this is from another repository.

I must confess I did not consider the license. My naive thinking was that both packages were authored by the same person and so if I kept the original commit history it would be clear enough who wrote the code.

@rwillingeprins have you thought of forking fmin, cleaning it up and pubhsling the fork on maintained fork on NPM? the this repo can just reference that one instead of getting into a grey zone of copying code.

I have no experience with publishing NPM packages but I would consider it if I actually used it directly. Right now though I haven't even looked into what the fmin code does exactly and I can't justify putting much more time into it.

@rwillingeprins
Copy link
Author

One way to address your concerns about the license mismatch might be to include the license from the fmin repo in this PR's fmin directory. Perhaps with a note in the main license file of this repo as suggested here.

If you dont like that idea it might make sense for you to fork and publish it under the same @upsetjs scope as this package. I would be happy to help with that if I can.

Otherwise we can hope that @benfred is willing to accept benfred/fmin#17 and publish a patch.

@rwillingeprins
Copy link
Author

@sgratzl, shall I just close this then?

@sgratzl
Copy link
Member

sgratzl commented Nov 17, 2024

closing in favor of #57 which patches and inlines fmin in the build

@sgratzl sgratzl closed this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants