-
Notifications
You must be signed in to change notification settings - Fork 15
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
Export location of express built-in middlewares #78
Comments
Yeah I think that I really like option 2, potentially named Naming things is always hard! |
Indeed! That's why I'm not going to prevent landing those (perhaps weird) names for the time being so folks can use them until there is a decision :) We can always rename them with an alias back to the old name. |
I am on the fence. I do agree it feels weird. But I am not sure it improves the situation to move it. This would cause churn, and unless there was some strong benefit I am not sure the churn is worth it. I could agree with any of the three options if someone else had a stronger opinion. |
Yea, I definitely agree on the churn point. That's why I realized I should open this with at least some time before express.raw and express.text became part of the API, haha |
I edited not thinking people would see this so quickly, so moving it to a separate comment. I know this is not really a helpful response in making the decision. So I guess if I was forced to pick one I would also go with option 2 but with the plural like @LinusU mentioned. |
One nice thing, thinking about the plural form, is that So it sounds like we're leaning (I used this uncertain term on purpose) towards the following set up, right?
The The |
617: 2019-05-28のJS: express 4.17.0、Firefox 67.0、TypeScriptのstrictNullCheckを有効化 r=azu a=azu * [Release 4.17.0 · expressjs/express](https://github.com/expressjs/express/releases/tag/4.17.0) * [Export location of express built-in middlewares · Issue #78 · expressjs/discussions](expressjs/discussions#78) * [Expose bodyParser.raw on express by amitzur · Pull Request #3708 · expressjs/express](https://github.com/expressjs/express/pull/3708/files) * [Strict null checking the Visual Studio Code codebase](https://code.visualstudio.com/blogs/2019/05/23/strict-null) * [Firefox 67.0, See All New Features, Updates and Fixes](https://www.mozilla.org/en-US/firefox/67.0/releasenotes/) * [Backward-Compatibility FIDO U2F support shipping soon in Firefox | Mozilla Security Blog](https://blog.mozilla.org/security/2019/04/04/shipping-fido-u2f-api-support-in-firefox/) * [Firefox 67 for developers - Mozilla | MDN](https://developer.mozilla.org/ja/docs/Mozilla/Firefox/Releases/67) * [Firefox 67 サイト互換性情報 | Firefox サイト互換性情報](https://www.fxsitecompat.com/ja/versions/67/) * [Deprecated tools - Firefox Developer Tools | MDN](https://developer.mozilla.org/ja/docs/Tools/Deprecated_tools) * [コンテンツブロッキング | Firefox ヘルプ](https://support.mozilla.org/ja/kb/content-blocking) Co-authored-by: azu <[email protected]> Co-authored-by: azu <[email protected]> Co-authored-by: probot-for-jser-info[bot] <probot-for-jser-info[bot]@users.noreply.github.com>
So I'm working to land expressjs/express#3708 in the 4.17 branch now and I thought that
express.raw()
seems like a strange name, which made me think that handing the middlewares right off theexpress
export itself is maybe weird?I was thinking maybe we could put them under like
.middleware
or, if not, corral the parsers under.bodyParser
maybe.The following are the current middlewares:
express.json
express.urlencoded
express.static
express.query
The following are the 4.17 proposed middlewares:
express.raw
express.text
So I was thinking we maybe could do
express.middleware.static
etc.express.static
andexpress.bodyParser.json
, etc.Maybe something else, even.
@LinusU @wesleytodd do you have any thoughts? This wouldn't block
express.raw
unless there was a general agreement likeexpress.middleware.raw
or something and the new ones could be landed under the new name up front and the rest moved instead of moving them all later, idk.The text was updated successfully, but these errors were encountered: