stripe-node icon indicating copy to clipboard operation
stripe-node copied to clipboard

consider replacing `qs` dependency

Open EddyVinck opened this issue 1 year ago • 1 comments

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

EddyVinck avatar Jun 24 '24 14:06 EddyVinck

I see there even is a PR for it already https://github.com/stripe/stripe-node/pull/2116

EddyVinck avatar Jun 24 '24 14:06 EddyVinck

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!

Image

artemtam avatar Sep 08 '25 17:09 artemtam

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%.

Image

KhafraDev avatar Sep 29 '25 21:09 KhafraDev

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?

pozylon avatar Oct 09 '25 06:10 pozylon