Jimp: Remove dependency on core-js

Created on 6 Aug 2019  路  5Comments  路  Source: oliver-moran/jimp

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.

Expected Behavior

No dependency on core-js.

Current Behavior

Jimp crashes without core-js.

Failure Information (for bugs)

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

Steps to Reproduce

Use jimp.

Context

My application uses jimp.

  • Jimp Version: 0.6.4
  • Operating System: Any
  • Node version: v12.7.0

Failure Logs

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
bug

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

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maqboolkhan picture maqboolkhan  路  5Comments

jBernavaPrah picture jBernavaPrah  路  4Comments

DylanPiercey picture DylanPiercey  路  4Comments

Jimbly picture Jimbly  路  5Comments

Favna picture Favna  路  4Comments