This is not something you should do for the user of your library, ever.
It's my job to provide your lib an environment it can run in, it's not the job of an image library to go messing with it.
Let me worry about polyfilling stuff or not polyfilling stuff. Now I have to ship core-js just to get jimp working.
Maybe have a @jimp/polyfills repo if you want to provide auto-polyfilling.
No dependency on core-js.
Jimp crashes without core-js.
Error: Cannot find module 'core-js/modules/es6.object.define-property'
Aug 06 10:58:11 sales hub[11767]: Require stack:
Aug 06 10:58:11 sales hub[11767]: - /var/hub/node_modules/jimp/dist/index.js
Use jimp.
My application uses jimp.
Error: Cannot find module 'core-js/modules/es6.object.define-property'
Aug 06 10:58:11 sales hub[11767]: Require stack:
Aug 06 10:58:11 sales hub[11767]: - /var/hub/node_modules/jimp/dist/index.js
If you are using jimp for Node.js (not browser) you may try jimp-compact a repackaged version which is much smaller and also hasn't a dependency on jimp.
NOTE: This is NOT an official solution.
@pi0 @laino PRs very welcome
As far as core-js now prints a lot of spam messages through its postinstall script being a typical donationware, it is now even more reasonable to remove dependency on it:
https://github.com/zloirock/core-js/issues/548
I can add that this ended up being a deal-breaker for me when selecting an image-processing utility for my commercial project.
Between spam, bloated size, questionable practice and "added 62 packages from 93 contributors" it's was simply not acceptable, even if jimp looked like a good choice, I'm quite disappointed in this myself.
I can add that this ended up being a deal-breaker for me when selecting an image-processing utility for my commercial project.
Between spam, bloated size, questionable practice and "added 62 packages from 93 contributors" it's was simply not acceptable, even if jimp looked like a good choice, I'm quite disappointed in this myself.
It's absolutely the same story in our project. We had to remove jimp for the same reason.
Most helpful comment
As far as core-js now prints a lot of spam messages through its postinstall script being a typical donationware, it is now even more reasonable to remove dependency on it:
https://github.com/zloirock/core-js/issues/548