-
-
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
feat - new promise based api #140
Conversation
I rather prefer the original interface. This strikes me as too inflexible. |
Could you be more specific? What do you miss? |
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.
I like this API quite a lot, I think it'd be more usable for the majority of use cases. It also looks a lot like a new module to me.
It looks to me like this implementation assumes "file" uploads and always writes the data out to a file on the filesystem. Multipart isn't always about uploading files. In particular, I have a case where I need to look for a part named "json" and read the data attached to it as an object; I have no need of writing this to the filesystem. |
Oh no, please check out all examples. You can work with just streams or files in disk mode. |
At a minimum, I agree with this statement. One reason I think a major framework has recently been deprecated is due to the way it was routinely using semver major to release what amounted to new frameworks under the same name. This PR completely changes the API for this module, and will be a significant hinderance to people using the module. I think that is a worse developer experience than the current API. |
Wow, why so negative? Let focus at first on the PR. We can discuss afterward how we can incorporate that in the fastify ecosystem. |
I'm not seeing any negativity in my statement. I only stated that I agree this module should remain as-is. |
You made it already clear with your first comment. |
@mcollina on windows the tests E.g it will be stuck.
It looks like it's not related to a specific test. On my machine |
@mcollina I could fix it 😄 |
go for a fix! I don't have a clue - the first is likely due to difference in the network stack. |
On windows ci |
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.
Really good work! I've left some comments and a few nits.
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, let's wait for the others anyway.
@mcollina I will wait for one more. The activity here is extremely low. I'd like to use this module. |
Can you change the title of this PR? |
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
This is a preview of the new interface. I appreciate any feedback. Tests suite is incomplete but the features are working already.
Checkout the
examples
to get a better impression or play with theform.html
Related: #109, #139
Checklist
npm run test
andnpm run benchmark
and the Code of conduct