es-tooling / ecosystem-cleanup

A place to keep track of ongoing efforts to clean up the JS ecosystem
393 stars 2 forks source link

Remove cross-fetch from i18next-http-backend #53

Open talentlessguy opened 4 months ago

talentlessguy commented 4 months ago

Ongoing PR here: https://github.com/i18next/i18next-http-backend/pull/144

adrai commented 4 months ago

Will do this sooner or later, but why do you need that now? Is there a negative impact?

talentlessguy commented 4 months ago

@adrai I already submitted the PR (see description). The package has 1M weekly downloads and its used in of the projects I'm working on.

adrai commented 4 months ago

Ok, what is the negative impact of keeping it as is... not removing cross-fetch etc...?

talentlessguy commented 4 months ago

@adrai obsolete support for XMLHttpRequest that is barely used anywhere, and actually is unsupported in both Deno and Node.js, an extra dep of cross-fetch

adrai commented 4 months ago

At runtime you shouldn't see notable any difference: https://github.com/i18next/i18next-http-backend/pull/144#issuecomment-2197465621

43081j commented 4 months ago

i think if you have consumers still needing support for older runtimes, it probably needs to stay for now

although cross-fetch does pull in the fetch polyfill (node-fetch) which is a pretty large dependency. in a future major version, maybe you could have it as an optional peer dependency instead (so consumers without native fetch are required to pull it in themselves)