Comparing version 3.0.5 to 3.0.6
180
History.md
3.0.5 / 2012-12-19 | ||
3.0.6 / 2013-01-04 | ||
================== | ||
* add http verb methods to Router | ||
* update connect | ||
* fix mangling of the `res.cookie()` options object | ||
* fix jsonp whitespace escape. Closes #1132 | ||
3.0.5 / 2012-12-19 | ||
================== | ||
* add throwing when a non-function is passed to a route | ||
@@ -9,3 +17,3 @@ * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses | ||
3.0.4 / 2012-12-05 | ||
3.0.4 / 2012-12-05 | ||
================== | ||
@@ -19,3 +27,3 @@ | ||
3.0.3 / 2012-11-13 | ||
3.0.3 / 2012-11-13 | ||
================== | ||
@@ -27,3 +35,3 @@ | ||
3.0.2 / 2012-11-08 | ||
3.0.2 / 2012-11-08 | ||
================== | ||
@@ -34,3 +42,3 @@ | ||
3.0.1 / 2012-11-01 | ||
3.0.1 / 2012-11-01 | ||
================== | ||
@@ -40,3 +48,3 @@ | ||
3.0.0 / 2012-10-23 | ||
3.0.0 / 2012-10-23 | ||
================== | ||
@@ -56,3 +64,3 @@ | ||
3.0.0rc5 / 2012-09-18 | ||
3.0.0rc5 / 2012-09-18 | ||
================== | ||
@@ -66,3 +74,3 @@ | ||
3.0.0rc4 / 2012-08-30 | ||
3.0.0rc4 / 2012-08-30 | ||
================== | ||
@@ -80,3 +88,3 @@ | ||
3.0.0rc3 / 2012-08-13 | ||
3.0.0rc3 / 2012-08-13 | ||
================== | ||
@@ -88,3 +96,3 @@ | ||
3.0.0rc2 / 2012-08-03 | ||
3.0.0rc2 / 2012-08-03 | ||
================== | ||
@@ -98,3 +106,3 @@ | ||
3.0.0rc1 / 2012-07-24 | ||
3.0.0rc1 / 2012-07-24 | ||
================== | ||
@@ -110,3 +118,3 @@ | ||
3.0.0beta7 / 2012-07-16 | ||
3.0.0beta7 / 2012-07-16 | ||
================== | ||
@@ -116,3 +124,3 @@ | ||
3.0.0beta6 / 2012-07-13 | ||
3.0.0beta6 / 2012-07-13 | ||
================== | ||
@@ -127,3 +135,3 @@ | ||
3.0.0beta5 / 2012-07-03 | ||
3.0.0beta5 / 2012-07-03 | ||
================== | ||
@@ -139,3 +147,3 @@ | ||
3.0.0beta4 / 2012-06-25 | ||
3.0.0beta4 / 2012-06-25 | ||
================== | ||
@@ -152,3 +160,3 @@ | ||
3.0.0beta3 / 2012-06-15 | ||
3.0.0beta3 / 2012-06-15 | ||
================== | ||
@@ -162,3 +170,3 @@ | ||
3.0.0beta2 / 2012-06-06 | ||
3.0.0beta2 / 2012-06-06 | ||
================== | ||
@@ -171,3 +179,3 @@ | ||
3.0.0beta1 / 2012-06-01 | ||
3.0.0beta1 / 2012-06-01 | ||
================== | ||
@@ -178,3 +186,3 @@ | ||
3.0.0alpha5 / 2012-05-30 | ||
3.0.0alpha5 / 2012-05-30 | ||
================== | ||
@@ -188,3 +196,3 @@ | ||
3.0.0alpha4 / 2012-05-09 | ||
3.0.0alpha4 / 2012-05-09 | ||
================== | ||
@@ -196,3 +204,3 @@ | ||
3.0.0alpha3 / 2012-05-04 | ||
3.0.0alpha3 / 2012-05-04 | ||
================== | ||
@@ -212,3 +220,3 @@ | ||
3.0.0alpha2 / 2012-04-26 | ||
3.0.0alpha2 / 2012-04-26 | ||
================== | ||
@@ -229,3 +237,3 @@ | ||
3.0.0alpha1 / 2012-04-15 | ||
3.0.0alpha1 / 2012-04-15 | ||
================== | ||
@@ -285,3 +293,3 @@ | ||
2.5.9/ 2012-04-02 | ||
2.5.9/ 2012-04-02 | ||
================== | ||
@@ -292,3 +300,3 @@ | ||
2.5.8 / 2012-02-08 | ||
2.5.8 / 2012-02-08 | ||
================== | ||
@@ -298,3 +306,3 @@ | ||
2.5.7 / 2012-02-06 | ||
2.5.7 / 2012-02-06 | ||
================== | ||
@@ -304,3 +312,3 @@ | ||
2.5.6 / 2012-01-13 | ||
2.5.6 / 2012-01-13 | ||
================== | ||
@@ -310,3 +318,3 @@ | ||
2.5.5 / 2012-01-08 | ||
2.5.5 / 2012-01-08 | ||
================== | ||
@@ -316,3 +324,3 @@ | ||
2.5.4 / 2012-01-02 | ||
2.5.4 / 2012-01-02 | ||
================== | ||
@@ -322,3 +330,3 @@ | ||
2.5.3 / 2011-12-30 | ||
2.5.3 / 2011-12-30 | ||
================== | ||
@@ -328,3 +336,3 @@ | ||
2.5.2 / 2011-12-10 | ||
2.5.2 / 2011-12-10 | ||
================== | ||
@@ -334,3 +342,3 @@ | ||
2.5.1 / 2011-11-17 | ||
2.5.1 / 2011-11-17 | ||
================== | ||
@@ -341,3 +349,3 @@ | ||
2.5.0 / 2011-10-24 | ||
2.5.0 / 2011-10-24 | ||
================== | ||
@@ -351,3 +359,3 @@ | ||
2.4.7 / 2011-10-05 | ||
2.4.7 / 2011-10-05 | ||
================== | ||
@@ -363,3 +371,3 @@ | ||
2.4.6 / 2011-08-22 | ||
2.4.6 / 2011-08-22 | ||
================== | ||
@@ -369,3 +377,3 @@ | ||
2.4.5 / 2011-08-19 | ||
2.4.5 / 2011-08-19 | ||
================== | ||
@@ -375,3 +383,3 @@ | ||
* Added `app.routes.all()`. Closes #803 | ||
* Added "basepath" setting to work in conjunction with reverse proxies etc. | ||
* Added "basepath" setting to work in conjunction with reverse proxies etc. | ||
* Refactored `Route` to use a single array of callbacks | ||
@@ -384,3 +392,3 @@ * Added support for multiple callbacks for `app.param()`. Closes #801 | ||
2.4.4 / 2011-08-05 | ||
2.4.4 / 2011-08-05 | ||
================== | ||
@@ -392,3 +400,3 @@ | ||
2.4.3 / 2011-07-14 | ||
2.4.3 / 2011-07-14 | ||
================== | ||
@@ -399,3 +407,3 @@ | ||
2.4.2. / 2011-07-06 | ||
2.4.2. / 2011-07-06 | ||
================== | ||
@@ -405,3 +413,3 @@ | ||
2.4.1 / 2011-07-06 | ||
2.4.1 / 2011-07-06 | ||
================== | ||
@@ -418,3 +426,3 @@ | ||
2.4.0 / 2011-06-28 | ||
2.4.0 / 2011-06-28 | ||
================== | ||
@@ -426,3 +434,3 @@ | ||
2.3.12 / 2011-06-22 | ||
2.3.12 / 2011-06-22 | ||
================== | ||
@@ -439,3 +447,3 @@ | ||
2.3.11 / 2011-06-04 | ||
2.3.11 / 2011-06-04 | ||
================== | ||
@@ -448,3 +456,3 @@ | ||
2.3.10 / 2011-05-27 | ||
2.3.10 / 2011-05-27 | ||
================== | ||
@@ -456,3 +464,3 @@ | ||
2.3.9 / 2011-05-25 | ||
2.3.9 / 2011-05-25 | ||
================== | ||
@@ -476,3 +484,3 @@ | ||
2.3.6 / 2011-05-20 | ||
2.3.6 / 2011-05-20 | ||
================== | ||
@@ -485,3 +493,3 @@ | ||
2.3.5 / 2011-05-20 | ||
2.3.5 / 2011-05-20 | ||
================== | ||
@@ -491,3 +499,3 @@ | ||
2.3.4 / 2011-05-08 | ||
2.3.4 / 2011-05-08 | ||
================== | ||
@@ -498,3 +506,3 @@ | ||
2.3.3 / 2011-05-03 | ||
2.3.3 / 2011-05-03 | ||
================== | ||
@@ -506,3 +514,3 @@ | ||
2.3.2 / 2011-04-27 | ||
2.3.2 / 2011-04-27 | ||
================== | ||
@@ -512,3 +520,3 @@ | ||
2.3.1 / 2011-04-26 | ||
2.3.1 / 2011-04-26 | ||
================== | ||
@@ -523,3 +531,3 @@ | ||
2.3.0 / 2011-04-25 | ||
2.3.0 / 2011-04-25 | ||
================== | ||
@@ -533,3 +541,3 @@ | ||
* Fixed caching of views when using several apps. Closes #637 | ||
* Fixed gotcha invoking `app.param()` callbacks once per route middleware. | ||
* Fixed gotcha invoking `app.param()` callbacks once per route middleware. | ||
Closes #638 | ||
@@ -539,3 +547,3 @@ * Fixed partial lookup precedence. Closes #631 | ||
2.2.2 / 2011-04-12 | ||
2.2.2 / 2011-04-12 | ||
================== | ||
@@ -546,3 +554,3 @@ | ||
2.2.1 / 2011-04-04 | ||
2.2.1 / 2011-04-04 | ||
================== | ||
@@ -561,3 +569,3 @@ | ||
2.2.0 / 2011-03-30 | ||
2.2.0 / 2011-03-30 | ||
================== | ||
@@ -570,3 +578,3 @@ | ||
2.1.1 / 2011-03-29 | ||
2.1.1 / 2011-03-29 | ||
================== | ||
@@ -578,3 +586,3 @@ | ||
2.1.0 / 2011-03-24 | ||
2.1.0 / 2011-03-24 | ||
================== | ||
@@ -590,3 +598,3 @@ | ||
2.0.0 / 2011-03-17 | ||
2.0.0 / 2011-03-17 | ||
================== | ||
@@ -597,3 +605,3 @@ | ||
2.0.0rc3 / 2011-03-17 | ||
2.0.0rc3 / 2011-03-17 | ||
================== | ||
@@ -605,3 +613,3 @@ | ||
2.0.0rc2 / 2011-03-17 | ||
2.0.0rc2 / 2011-03-17 | ||
================== | ||
@@ -615,3 +623,3 @@ | ||
2.0.0rc / 2011-03-14 | ||
2.0.0rc / 2011-03-14 | ||
================== | ||
@@ -623,3 +631,3 @@ | ||
2.0.0beta3 / 2011-03-09 | ||
2.0.0beta3 / 2011-03-09 | ||
================== | ||
@@ -642,3 +650,3 @@ | ||
2.0.0beta2 / 2011-03-07 | ||
2.0.0beta2 / 2011-03-07 | ||
================== | ||
@@ -649,3 +657,3 @@ | ||
2.0.0beta / 2011-03-03 | ||
2.0.0beta / 2011-03-03 | ||
================== | ||
@@ -683,3 +691,3 @@ | ||
1.0.8 / 2011-03-01 | ||
1.0.8 / 2011-03-01 | ||
================== | ||
@@ -691,3 +699,3 @@ | ||
1.0.7 / 2011-02-07 | ||
1.0.7 / 2011-02-07 | ||
================== | ||
@@ -698,3 +706,3 @@ | ||
1.0.6 / 2011-02-07 | ||
1.0.6 / 2011-02-07 | ||
================== | ||
@@ -704,3 +712,3 @@ | ||
1.0.5 / 2011-02-05 | ||
1.0.5 / 2011-02-05 | ||
================== | ||
@@ -710,3 +718,3 @@ | ||
1.0.4 / 2011-02-05 | ||
1.0.4 / 2011-02-05 | ||
================== | ||
@@ -717,3 +725,3 @@ | ||
1.0.3 / 2011-01-13 | ||
1.0.3 / 2011-01-13 | ||
================== | ||
@@ -723,3 +731,3 @@ | ||
1.0.2 / 2011-01-10 | ||
1.0.2 / 2011-01-10 | ||
================== | ||
@@ -729,3 +737,3 @@ | ||
1.0.1 / 2010-12-29 | ||
1.0.1 / 2010-12-29 | ||
================== | ||
@@ -738,3 +746,3 @@ | ||
1.0.0 / 2010-11-16 | ||
1.0.0 / 2010-11-16 | ||
================== | ||
@@ -753,3 +761,3 @@ | ||
template engine to use. | ||
* Added _--css_ flag to express(1) to specify the | ||
* Added _--css_ flag to express(1) to specify the | ||
stylesheet engine to use (or just plain css by default). | ||
@@ -767,3 +775,3 @@ * Added `app.all()` support [thanks aheckmann] | ||
1.0.0rc4 / 2010-10-14 | ||
1.0.0rc4 / 2010-10-14 | ||
================== | ||
@@ -787,3 +795,3 @@ | ||
1.0.0rc3 / 2010-09-20 | ||
1.0.0rc3 / 2010-09-20 | ||
================== | ||
@@ -811,3 +819,3 @@ | ||
1.0.0rc2 / 2010-08-17 | ||
1.0.0rc2 / 2010-08-17 | ||
================== | ||
@@ -825,3 +833,3 @@ | ||
* Fixed; `make install` creating ~/.node_libraries when not present | ||
* Fixed issue preventing error handlers from being defined anywhere. Closes #387 | ||
* Fixed issue preventing error handlers from being defined anywhere. Closes #387 | ||
@@ -844,3 +852,3 @@ 1.0.0rc / 2010-07-28 | ||
* Fixed; _configure()_ callbacks called immediately. Closes #368 | ||
1.0.0beta2 / 2010-07-23 | ||
@@ -980,3 +988,3 @@ ================== | ||
* Removed utils.mixin(); use Object#mergeDeep() | ||
0.8.0 / 2010-03-19 | ||
@@ -1048,12 +1056,12 @@ ================== | ||
* Added HTTP client query string support when method is GET. Closes #205 | ||
* Added support for arbitrary view engines. | ||
For example "foo.engine.html" will now require('engine'), | ||
the exports from this module are cached after the first require(). | ||
* Added async plugin support | ||
* Removed usage of RESTful route funcs as http client | ||
get() etc, use http.get() and friends | ||
* Removed custom exceptions | ||
@@ -1060,0 +1068,0 @@ |
@@ -400,3 +400,3 @@ /** | ||
/** | ||
* Delegate `.VERB(...)` calls to `.route(VERB, ...)`. | ||
* Delegate `.VERB(...)` calls to `router.VERB(...)`. | ||
*/ | ||
@@ -407,5 +407,8 @@ | ||
if ('get' == method && 1 == arguments.length) return this.set(path); | ||
var args = [method].concat([].slice.call(arguments)); | ||
// if no router attacked yet, attach the router | ||
if (!this._usedRouter) this.use(this.router); | ||
this._router.route.apply(this._router, args); | ||
// setup route | ||
this._router[method].apply(this._router, arguments); | ||
return this; | ||
@@ -412,0 +415,0 @@ }; |
@@ -226,3 +226,5 @@ /** | ||
var spaces = app.get('json spaces'); | ||
var body = JSON.stringify(obj, replacer, spaces); | ||
var body = JSON.stringify(obj, replacer, spaces) | ||
.replace(/\u2028/g, '\\u2028') | ||
.replace(/\u2029/g, '\\u2029'); | ||
var callback = this.req.query[app.get('jsonp callback name')]; | ||
@@ -575,3 +577,3 @@ | ||
res.cookie = function(name, val, options){ | ||
options = options || {}; | ||
options = utils.merge({}, options); | ||
var secret = this.req.secret; | ||
@@ -582,5 +584,7 @@ var signed = options.signed; | ||
if (signed) val = 's:' + sign(val, secret); | ||
if ('maxAge' in options) options.expires = new Date(Date.now() + options.maxAge); | ||
if ('maxAge' in options) { | ||
options.expires = new Date(Date.now() + options.maxAge); | ||
options.maxAge /= 1000; | ||
} | ||
if (null == options.path) options.path = '/'; | ||
options.maxAge /= 1000; | ||
this.set('Set-Cookie', cookie.serialize(name, String(val), options)); | ||
@@ -587,0 +591,0 @@ return this; |
@@ -7,2 +7,3 @@ /** | ||
, utils = require('../utils') | ||
, methods = require('methods') | ||
, debug = require('debug')('express:router') | ||
@@ -19,3 +20,3 @@ , parse = require('connect').utils.parseUrl; | ||
* Initialize a new `Router` with the given `options`. | ||
* | ||
* | ||
* @param {Object} options | ||
@@ -144,3 +145,3 @@ * @api private | ||
param(err); | ||
// single param callbacks | ||
@@ -250,5 +251,7 @@ function paramCallback(err) { | ||
// ensure all callbacks are functions | ||
callbacks.forEach(function(fn){ | ||
callbacks.forEach(function(fn, i){ | ||
if ('function' == typeof fn) return; | ||
throw new Error('Router#' + method + '() requires all callbacks to be functions'); | ||
var type = {}.toString.call(fn); | ||
var msg = '.' + method + '() requires callback functions but got a ' + type; | ||
throw new Error(msg); | ||
}); | ||
@@ -267,1 +270,9 @@ | ||
}; | ||
methods.forEach(function(method){ | ||
Router.prototype[method] = function(path){ | ||
var args = [method].concat([].slice.call(arguments)); | ||
this.route.apply(this, args); | ||
return this; | ||
}; | ||
}); |
{ | ||
"name": "express", | ||
"description": "Sinatra inspired web development framework", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -13,3 +13,3 @@ "contributors": [ | ||
"dependencies": { | ||
"connect": "2.7.1", | ||
"connect": "2.7.2", | ||
"commander": "0.6.1", | ||
@@ -16,0 +16,0 @@ "range-parser": "0.0.4", |
@@ -9,11 +9,8 @@ | ||
app.get('/\\d+', function(req, res){ | ||
res.send('digit ' + req.url); | ||
app.get('/:type/size::size', ['test'], function(req, res){ | ||
console.log(req.params.type); | ||
console.log(req.params.size); | ||
}); | ||
app.get('/\\w+', function(req, res){ | ||
res.send('word ' + req.url); | ||
}); | ||
app.listen(3000); | ||
console.log('listening on 3000'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113950
2277
+ Addedconnect@2.7.2(transitive)
- Removedconnect@2.7.1(transitive)
- Removedcrc@0.2.0(transitive)
Updatedconnect@2.7.2