express
express copied to clipboard
Release 5.0
This is a tracking issue for release 5.0.
5.0.0-beta.1 published on npm
I am trying to give better visibility for upcoming changes and so am trying out making a PR for a release here, pulling from the official next release branch into 4.x. This allows for the current pending changes to be easily visible.
Please keep feature requests in their own issues
I'm also leaving this PR unlocked so people can make comments/etc. and we'll see how it goes :) If you want to make a comment on a particular change, please make the comment in the "Files changed" tab so comments are not lost during a rebase (they will occur frequently has 4.x progresses).
The goal of Express 5 is to be API tweaks & the removal of all code from the Express repository, moving into components in the pillarjs project (https://github.com/pillarjs), providing at least basic support for promise-returning handlers and complete HTTP/2 functionality. Express 5 would become a "view into pillarjs" and would be an arrangement of these components.
List of changes for release:
- [x] Add support for Promises in all handlers #2259 (though
[email protected]
) - [ ] Add support for Promises in
app.param
(though[email protected]
) - [x] Bring back
app.router
which is just generally useful for directly calling to the router- [ ] Make sure 3.x-style
app.use(app.router)
does not explode
- [ ] Make sure 3.x-style
- [ ] ~Fix views to resolve paths async #2653~
- [x] Make
query parser
option default to'simple'
#3361 - [x] Make
bodyParser.urlencoded
default to'simple'
(though[email protected]
) - [x] Make
req.host
actually return the host #2179 - [x] Make
req.query
a getter instead of added by middleware #2215 - [x] Make
res.render
always async callback, to hide sync view engines #2668 - [ ] ~Make
res.render
use the default engine even when an extension was found #2708~ - [ ] ~Make
res.sendFile
use the"etag"
application setting #2294~ - [ ] Make
res.status
throw on invalid argument type #4212 #2795 #2797 #3111 #3137 #3143 - [ ] ~Make
express.static
use the"etag"
application setting #2317~ - [x] New path matching syntax #2057 #2173 #4321 (though
[email protected]
) - [ ] ~Provide separate locals and options to view engine #2648~
- [x] Remove Express 3.x middleware error stubs #3217
- [x] Use
mime-types
instead ofmime
- [x] Use
path-is-absolute
module for absolute path detection #2620
List of deprecated things removed:
- [x] Leading
:
inname
forapp.param(name, fn)
- [x]
app.del
- [x]
app.param(fn)
- [x]
req.acceptsCharset
- [x]
req.acceptsEncoding
- [x]
req.acceptsLanguage
- [x]
res.json(obj, status)
- [x]
res.json(status, obj)
#2939 - [x]
res.jsonp(obj, status)
- [x]
res.jsonp(status, obj)
#2940 - [x]
req.param()
- [x]
res.redirect(url, status)
#2941 - [x]
res.send(body, status)
- [x]
res.send(status)
- [x]
res.send(status, body)
#2942 - [x]
res.sendfile
- [x]
res.vary()
(i.e. no arguments) #2943
List of things to refactor (still provided by express
):
- [ ] ~Better
res.cookie
and general cookie reading/setting (newkeygrip
andcookies
modules; newreq.cookies
or such)~ - [ ] ~Move prototype properties to own repo #2432~
- [x] Move
Router
to it's own repo #2411
Testing this release
If you want to try out this release, you can install it with the following command:
$ npm install expressjs/express#5.0
Owners/collaborators: please do not merge this PR :)
here's some mostly refactor-based changes i'd like to see. AFAIK you've got this covered @dougwilson, but let me know if you need help:
- refactor the router to a separate repository
- refactor the view system to a separate repository. maybe templation, maybe something else more backwards compatible
- finish next versions of
cookies
andkeygrip
and use them in Express - finish refactoring
body-parser
into therequest-body
module before including it here - refactor the router to use path-match or something else between
path-to-regexp
and the router itself - refactor proxy-addr. i just emailed npm to ask for the
trust
package
All great stuff @jonathanong :) I added all but the body-parser
one up there, because I really want to add that in a 4.x release, but time-dependent :D
How close is this to a prerelease? I just want to know if you think it's stable enough to start playing around with for future projects.
So you're always welcome to play around with npm install visionmedia/express#5.0
(and you can add "express": "visionmedia/express#5.0"
to your package.json
if you really wish). If you are looking for something published to npm
, just ask :) No one has really ask for it yet is all. Would you like an alpha or something published to npm? I can do it right after 4.10 (which is due something this week) so it'll include 4.10 stuff.
If you are looking for something published to npm
I'm looking for the router to be published to npm for the looong time now. :)
@rlidwka the docs are just about complete and I was just porting the recent changes to the router in here over yesterday :) I also really want it, haha
:+1:
Can someone link me to the docs for the new router?
@ilanbiala the 5.x router is the same as the 4.x router, so the main docs can be found at http://expressjs.com/4x/api.html#router ; the documentation talked about above is basically a rewrite of them to live with the extracted router.
Everyone on this thread: The first Express 5.0 alpha has been released to npm!
$ npm install [email protected]
Is there an approx ETA for 5.0?
Is there an approx ETA for 5.0?
Yep; whenever Pillarjs is complete enough to make express one file. XD
Haha, is it getting close?
@Fishrock123 What's pillarjs?
@hacksparrow there is no real ETA just yet, mostly because I don't want to have to commit to a date :) There have been people asking on IRC/Twitter/here about getting something on npm
from this branch, so the alpha 1 is that :) What do you think about making a 5x section on the website? I feel like it's probably too early, personally. Perhaps when it's beta, and definitely when it's RC, unless you think otherwise, lol.
@dougwilson, that's what I wanted to get a feel of. I am in agreement with "Perhaps when it's beta, and definitely when it's RC".
@ilanbiala pillarjs is a collection of framework components. It's being extracted from express: https://github.com/pillarjs - more info is available in this empirenode talk
@hacksparrow so my general feel was alpha Nov 1, beta Dec 1, RC Jan 1, release 1 week after RC unless issues brought up.
@dougwilson sounds good!
@dougwilson are we still keeping static in here?
Probably.
Is this still up to date?
Yep.
Isn't req.param() being removed?
@ChiperSoft see #2450
@Fishrock123 right. is it only being deprecated and not removed in 5.0?
So until I actually deprecate them and see how it blows over, I don't want to commit to removing them from 5.0. If there isn't enough time, they may just was well stay as deprecated.
Is 5.0 going to come with new features/big performance fixes, or is it just more modular?
New features: a few, yes. (Performant custom prototype extensions are one, more info soon)
"Big performance fixes": what? Do elaborate, express is by no means close to slow. The router will have some increased performance though.
@Fishrock123 not saying it's slow, but there's always up, right? :)