-
Notifications
You must be signed in to change notification settings - Fork 5
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
Rewrite library to fix vulnerable dependencies #19
base: main
Are you sure you want to change the base?
Conversation
Create action to test generated file matches
Is it not possible to avoid the axios dependency and make it compatible with serverless environments? |
Still waiting to hear back from Brevo about it, but it would be possible to switch by changing the generate file. Main question would be do you expect users to provide their own fetch version, or do you install a polyfill. It would look something like this: const brevo = new Brevo({
baseApiParams: {
headers: {
"api-key": "",
},
},
// optional fetch polyfill for node versions < 18
customFetch: fetch,
}); |
Hi @shubhamUpadhyayInBlue and @aayush-sib — you need to communicate with the community. Please, give us and @alexbrazier a feedback on how you gonna deal with his PR. |
I've updated this PR to fix the merge conflicts and also switched to a newer version of the swagger url which has the new brevo domain. I've also updated the description to include the contributing document which explains how to generate the new code when the swagger spec changes and how to easily release via github actions |
Closes #1
Closes #16
Closes #15
Closes #5
Rewrite library using swagger-typescript-api with only dependency being
axios
.There is a test version published on npm at @groupcards/brevo
This is basically a full rewrite, but should be easy to maintain as it is fully generated by running
yarn generate
and is based on the swagger spec. It also has a github action check to make sure no-one has modified the generated file.As in the updated readme, it is similar to the old api and fairly easy to use with full typescript support:
Contributing
Please see the updated contributing file to explain how to regenerate api when there are new changes and publishing npm package https://github.com/squareda/brevo-node/blob/updates/CONTRIBUTING.md