sindresorhus / p-queue

Promise queue with concurrency control
MIT License
3.39k stars 182 forks source link

chore: add react native compat #188

Closed shamilovtim closed 1 year ago

sindresorhus commented 1 year ago

No thanks :)

shamilovtim commented 3 months ago

Hey @sindresorhus trying to understand the harm of this one liner. We already use a custom resolver to resolve your project transitively. This is simply codifying what already works and presents no additional effort or maintenance burden. We also support the "main" package.json entry-point, it doesn't have to be "react-native." but the project lacks "main".

shamilovtim commented 3 months ago

For instance in #58 a PR was accepted that modifies actual runtime logic in order to support additional runtimes. Why is a simple package.json entry-point worth declining a PR over, while #58 is accepted?

sindresorhus commented 3 months ago

The actual problem here is React Native not supporting the exports field, which is the standard field for exports in package.json. I'm simply not interested in adding workarounds for non-compliant tools, no matter how simple the workaround is. It's a slippery slope. In addition, adding back main, allows incorrect usage of the package, like accessing internal files, and accessing internal types in TypeScript.


For instance in https://github.com/sindresorhus/p-queue/pull/58 a PR was accepted that modifies actual runtime logic in order to support additional runtimes. Why is a simple package.json entry-point worth declining a PR over, while https://github.com/sindresorhus/p-queue/pull/58 is accepted?

It was added to support browsers, which are the majority of consumers of this package.


I'm going to lock this as there are no arguments that will convince me to add back main or add react-native. Sorry.