-
-
Notifications
You must be signed in to change notification settings - Fork 103
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 legacy addToBody and callback API #465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it the beginner feature?
That would be attachFieldsToBody: true or even better attachFieldsToBody: “keyValues” https://github.com/fastify/fastify-multipart#parse-all-fields-and-assign-them-to-the-body addToBody is an undocumented option that uses a deprecated method (ref: #289) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I think we could start a next
branch here
Can we merge this?
|
CC @climba03003 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…en attachFieldsToBody is set to keyValues (#481) * Return buffers directly when `attachFieldsToBody` is set to `'keyValues'` (#468) * return buffer directly * add test * move tap path to taprc * update README.md * typo * refactor keyValues handler * use already set variable * use for...of * ditch for...of for Arrays * use keys rather than entries * Remove legacy addToBody and callback API (#465) * remove deprecated method * remove unused package * revert modification * remove addToBody documentation * remove request.multipart type * remove legacy comment * Use for loop for arrays and fix schema option for `keyValues` (#474) * only add schema when attachfieldstobody is true * fs/promises * use `for` for arrays * conditionally call Object.values * fix lint * Update test/multipart-attach-body.test.js Co-authored-by: Frazer Smith <[email protected]> * Update README.md Co-authored-by: Frazer Smith <[email protected]> --------- Co-authored-by: Uzlopak <[email protected]> Co-authored-by: Frazer Smith <[email protected]>
I saw #464 and got excited about this plugin again 🤠
We can start by removing the
addToBody
option that has been deprecated (or at least undocumented) for nearly 2 years nowAFAICT, this closes #289, closes #202 (line coverage gets to 100%), and maybe even #435 (by removing the related part of the code)
Checklist
npm run test
andnpm run benchmark
and the Code of conduct