router icon indicating copy to clipboard operation
router copied to clipboard

Release 2.0

Open dougwilson opened this issue 8 years ago • 7 comments

This is a tracking issue for release 2.0.

Try the latest beta with npm install [email protected]

Please keep feature requests in their own issues

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.

List of changes for release:

  • [x] Add basic support for returned, rejected Promises #47
  • [x] Add promise support to router.param #92
  • [x] Drop support for Node.js below 0.10
  • [x] Remove debug dependency
  • [x] Upgrade path-to-regexp to 3.x #42
  • [ ] Upgrade path-to-regexp to 7.x (~#102~ PR TBD)

List of things to refactor:

  • [x] Use standard style

Testing this release

If you want to try out this release, you can install it with the following commands:

$ npm cache clean router
$ npm install pillarjs/router#2.0

Owners/collaborators: please do not merge this PR :)

dougwilson avatar Oct 14 '17 01:10 dougwilson

Once the other two pending PR's are done I will do the final one "Use standard style". Can we look at setting a date as a goal to get out 2.0 on this?

wesleytodd avatar Jun 11 '18 20:06 wesleytodd

@dougwilson @wesleytodd Is there anything I can do to help move this forward?

edevil avatar Sep 10 '18 15:09 edevil

I'm looking forward to the new release with promise support.

markstos avatar Mar 20 '19 16:03 markstos

Would it be useful to explicitly test async functions?

I know there are many places where we test directly returning Promise.reject(). There are at least 2 scenarios I think that would be worth looking at:

For example all of these should be treated in the exact same way:

async function middleware1(req, res, next) {
   await Promise.reject(new Error("ok bye"));
}

async function middleware2(req, res, next) {
   throw new Error("ok bye");
}

function middleware3(req, res, next) {
   return Promise.reject(new Error("ok bye"));
}

function middleware4(req, res, next) {
   throw new Error("ok bye");
}

There are a few ways you can detect async function support if you want to do that, including some of the ones mentioned here: https://stackoverflow.com/a/46127053/496735

Happy to file a follow on PR with these tests as well.

xjamundx avatar Dec 12 '21 05:12 xjamundx

Hey, if there's anything I can help with to move this forward, I would love to contribute, but don't really know how :smile: (been using express since 2014, pretty familiar with how it works, happy to write some code or contribute in any other way).

Is the checklist in the original description accurate, or is there more to do?

hypesystem avatar Mar 16 '22 08:03 hypesystem

https://github.com/expressjs/express/commit/74beeac0718c928b4ba249aba3652c52fbe32ca8

This commit on express is breaking when I try to merge up to 4.19.0 on the 5.x branch. I don't see it associated with any PR or additional context. For now I am going to disable the test in the express side but wanted to flag it here so we could figure out the history and re-enable before landing this.

wesleytodd avatar Mar 20 '24 18:03 wesleytodd

https://github.com/expressjs/express/commit/631ada0c645dc84c6df8788f5a7eb2b8100acea5

This one is also looking to not be ported over and so failing the tests. Same as above, going to disable to get the branches synced up. Then I can port these here, publish a new router prerelease and then port it back to the other branch.

Just going to edit this now that there are more:

https://github.com/expressjs/express/commit/708ac4cdf5cd0a658d62490a9f4d78d3e1ec6612

wesleytodd avatar Mar 20 '24 18:03 wesleytodd