stripe-node
stripe-node copied to clipboard
consider replacing `qs` dependency
Is your feature request related to a problem? Please describe.
The qs library includes a lot of polyfills via subdependencies. Polyfills that are required for very old versions of Node.js below the Node.js version that Stripe intends to support (v12 according to the README). These polyfills are likely slowing down the Stripe library unnecessarily.
Describe the solution you'd like
The package is replaced.
Describe alternatives you've considered
Additional context
The maintainer of qs is also acting without the interest of his users in mind for a package he just became a maintainer of: https://x.com/Jordy_vD_/status/1804906230940569952
I see there even is a PR for it already https://github.com/stripe/stripe-node/pull/2116
Hi @helenye-stripe! I see there are 2 PRs open, any blockers from landing either of them?
qs brings ~20 dependencies, including some completely useless polyfills. It can be replaced by native URLSearchParams or at least with neoqs (zero-dependency drop-in replacement). Lmk if you need any help!
Not only is it bringing in tons of dependencies, it brings in around 94 KB of garbage when bundling with esbuild. If qs was removed, a bundle for one of my apps on Cloudflare Workers would decrease by 12.6%.
I back this, especially in a world of supply-chain-attacks every package one can easily get rid of should be removed immediately. this is one of those dependencies. also stripe should not support node.js versions older than v20 for newer releases, why not let users just install older versions if they need v12 support?