Skip to content
Myr

deps: path-to-regexp@0.1.6

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixes #2491 fixes #2617 closes #2637 closes #2683

authored by Blake Embrey · committed by Douglas Christopher Wilson · parent e66bb4f · Browse files · 4 files+49 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+49 added−12 removed

  • tests:+41 added−0 removed
  • other:+8 added−12 removed

4 files+49 added−12 removed

modified:lib/router/layer.js+4 added-10 removed
modified:test/app.router.js+41 added
639 unmodified lines
640 request(app)641 .get('/file')642 .expect(404, done);643 })644645 it('should keep correct parameter indexes', function(done){646 var app = express();647648 app.get('/*/user/:id', function (req, res) {649 res.send(req.params);650 });651652 request(app)653 .get('/1/user/2')654 .expect(200, '{"0":"1","id":"2"}', done);655 })656657 it('should work within arrays', function(done){658 var app = express();659660 app.get(['/user/:id', '/foo/*', '/:bar'], function (req, res) {661 res.send(req.params.bar);662 });663664 request(app)665 .get('/test')666 .expect(200, 'test', done);667 })668 })669670 describe(':name', function(){671 it('should denote a capture group', function(done){
31 unmodified lines
703 .get('/user/tj/edit')704 .expect('editing tj', done);705 })706707 it('should work following a partial capture group', function(done){708 var app = express();709 var cb = after(2, done);710711 app.get('/user(s)?/:user/:op', function(req, res){712 res.end(req.params.op + 'ing ' + req.params.user + (req.params[0] ? ' (old)' : ''));713 });714715 request(app)716 .get('/user/tj/edit')717 .expect('editing tj', cb);718719 request(app)720 .get('/users/tj/edit')721 .expect('editing tj (old)', cb);722 })723724 it('should work in array of paths', function(done){725 var app = express();726 var cb = after(2, done);727
259 unmodified lines
modified:History.md+3 added-1 removed
1 unmodified line
2==========34 * Fix `res.format` error when only `default` provided5 * Fix issue where `next('route')` in `app.param` would incorrectly skip values6 * Fix using `*` before params in routes7 * Fix using capture groups before params in routes8 * Use `array-flatten` module for flattening arrays9 * deps: accepts@~1.2.910 - deps: mime-types@~2.1.111 - perf: avoid argument reassignment & argument slice
25 unmodified lines
37 * deps: on-finished@~2.3.038 - Add defined behavior for HTTP `CONNECT` requests39 - Add defined behavior for HTTP `Upgrade` requests40 - deps: ee-first@1.1.139 * deps: path-to-regexp@0.1.441 * deps: path-to-regexp@0.1.642 * deps: send@0.13.043 - Allow Node.js HTTP server to set `Date` response header44 - Fix incorrectly removing `Content-Location` on 304 response45 - Improve the default redirect response headers
2908 unmodified lines
modified:package.json+1 added-1 removed
41 unmodified lines
42 "merge-descriptors": "1.0.0",43 "methods": "~1.1.1",44 "on-finished": "~2.3.0",45 "parseurl": "~1.3.0",46 "path-to-regexp": "0.1.4",46 "path-to-regexp": "0.1.6",47 "proxy-addr": "~1.0.8",48 "qs": "2.4.2",49 "range-parser": "~1.0.2",50 "send": "0.13.0",
41 unmodified lines