express icon indicating copy to clipboard operation
express copied to clipboard

Release 5.0

Open dougwilson opened this issue 9 years ago • 105 comments

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
  • [ ] ~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 of mime
  • [x] Use path-is-absolute module for absolute path detection #2620

List of deprecated things removed:

  • [x] Leading : in name for app.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 (new keygrip and cookies modules; new req.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 :)

dougwilson avatar Jul 14 '14 16:07 dougwilson

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 and keygrip and use them in Express
  • finish refactoring body-parser into the request-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

jonathanong avatar Jul 14 '14 21:07 jonathanong

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

dougwilson avatar Jul 14 '14 21:07 dougwilson

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.

ilanbiala avatar Oct 20 '14 02:10 ilanbiala

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.

dougwilson avatar Oct 20 '14 02:10 dougwilson

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 avatar Oct 20 '14 03:10 rlidwka

@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

dougwilson avatar Oct 20 '14 03:10 dougwilson

:+1:

Fishrock123 avatar Oct 20 '14 03:10 Fishrock123

Can someone link me to the docs for the new router?

ilanbiala avatar Oct 20 '14 10:10 ilanbiala

@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.

dougwilson avatar Oct 20 '14 14:10 dougwilson

Everyone on this thread: The first Express 5.0 alpha has been released to npm!

$ npm install [email protected]

dougwilson avatar Nov 07 '14 02:11 dougwilson

Is there an approx ETA for 5.0?

hacksparrow avatar Nov 07 '14 04:11 hacksparrow

Is there an approx ETA for 5.0?

Yep; whenever Pillarjs is complete enough to make express one file. XD

Fishrock123 avatar Nov 07 '14 04:11 Fishrock123

Haha, is it getting close?

hacksparrow avatar Nov 07 '14 04:11 hacksparrow

@Fishrock123 What's pillarjs?

ilanbiala avatar Nov 07 '14 04:11 ilanbiala

@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 avatar Nov 07 '14 04:11 dougwilson

@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".

hacksparrow avatar Nov 07 '14 04:11 hacksparrow

@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

Fishrock123 avatar Nov 07 '14 04:11 Fishrock123

@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 avatar Nov 07 '14 04:11 dougwilson

@dougwilson sounds good!

hacksparrow avatar Nov 07 '14 04:11 hacksparrow

@dougwilson are we still keeping static in here?

Fishrock123 avatar Nov 21 '14 14:11 Fishrock123

Probably.

dougwilson avatar Nov 22 '14 00:11 dougwilson

Is this still up to date?

Twipped avatar Dec 18 '14 21:12 Twipped

Yep.

dougwilson avatar Dec 18 '14 21:12 dougwilson

Isn't req.param() being removed?

Twipped avatar Dec 18 '14 21:12 Twipped

@ChiperSoft see #2450

Fishrock123 avatar Dec 18 '14 21:12 Fishrock123

@Fishrock123 right. is it only being deprecated and not removed in 5.0?

Twipped avatar Dec 18 '14 21:12 Twipped

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.

dougwilson avatar Dec 18 '14 21:12 dougwilson

Is 5.0 going to come with new features/big performance fixes, or is it just more modular?

ilanbiala avatar Jan 10 '15 19:01 ilanbiala

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 avatar Jan 10 '15 19:01 Fishrock123

@Fishrock123 not saying it's slow, but there's always up, right? :)

ilanbiala avatar Jan 10 '15 19:01 ilanbiala