Closed jimmywarting closed 2 years ago
I don't really like the idea of exposing native FormData when it's available, because it may introduce different behaviour depending on Node.js version, just because I replaced my implementation with the Node.js'. I'd rather keep my package consistent and pure, which is why I still can't switch to fetch-blob and drop my re-implementation of Blob. I believe this is the same case scenario and those who don't need formdata-node
anymore can make a decision to switch to Node.js' implementation themeselves, as they want to.
Given that NodeJS v18 now have shipped FormData built in and also supporting 3th party blobs like fetch-blob, I'm going to start suggesting folks to use that instead if it's avalible
I'm also going to export the builtin if avalible in my own formdata-polyfill pkg and and do something like
export const FormData = globalThis.FormData || Polyfill