Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove qs package and implement URLSearchParams serializer #2168

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

QuentinLemCode
Copy link
Contributor

@QuentinLemCode QuentinLemCode commented Sep 5, 2024

Hello

This pull request removes the qs package and replaces it with a custom implementation of URLSearchParams serializer.

The stringifyRequestData function now serializes an object or string into URL-encoded parameters, accommodating nested objects and arrays.

The goal of this change is to remove the qs dependency which was used for this single function.
It will allow to reduce the size of the stripe-node library.

URLSearchParams is available in all evergreen browser, NodeJS since v10, Deno since v1, and Bun.

Source : https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
https://bun.sh/docs/runtime/nodejs-apis#urlsearchparams

This PR would close #2117

implemented an URLSearchParams serializer
@QuentinLemCode QuentinLemCode requested a review from a team as a code owner September 5, 2024 10:15
@QuentinLemCode QuentinLemCode requested review from prathmesh-stripe and removed request for a team September 5, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consider replacing qs dependency
1 participant