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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom querystring #1270
Custom querystring #1270
Conversation
- Dropped url.parse API - Use the querystring module - Exposed a querystring parser option
Given that this is a semver major, I agree that we should be using the |
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
The reason why we are doing this is to remove url.parse. That is the library that is deprecated and should not really be used.
Parsing the querystring via new URL is unfortunately an harder change, as the result is exposed as a Map-like object. We need to pass that into our schema validator, and I fear we cannot use that with some good throughput yet.
(IMHO this is not semver-major, url.parse use querystring internally).
Okay. |
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
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.
This feature is not plugin encapsulated. Is there a reason for it?
|
I think there are only so many ways that a querystring could be converted to JS objects. Within a single HTTP server, those should be the same throughout the system. It's kind of the same reason why We could make this encapsulated, but I'm not convinced it would be worthwhile. I might be wrong. |
1d6302a
to
69af569
Compare
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 very nice feature 馃憤
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, good work
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
Please update the typings in the future if flags are added. Since the typings are shipped with fastify they should be updated with every change made. I would understand not updating them if types were shipped via @types. |
@jannikkeye pr are welcome! |
@jannikkeye the Fastify project relies on the TypeScript community to maintain the typings. The majority of the Fastify core team does not know TypeScript. |
thanks for this update))))))))) |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Implementation of what has been proposed in #1268.
We are also dropping the use of
url.parse
, so this change will be flagged assemver-major
.With this change, the querystring parsing is twice faster than before 馃殌
Checklist
npm run test
andnpm run benchmark