Comparar commits

..

17 Commits

Autor SHA1 Mensagem Data
Tj Holowaychuk bef6f208d1 Release 1.0.9 2011-03-23 11:02:34 -07:00
Tj Holowaychuk 2802221243 Fixed SlowBuffer support 2011-03-23 11:00:34 -07:00
Tj Holowaychuk 3ff35d74ee Added "main" to package.json 2011-03-04 08:53:25 -08:00
Tj Holowaychuk 1523b61723 node < 0.4.0 2011-03-02 14:30:23 -08:00
Tj Holowaychuk ff712f311d Release 1.0.8 2011-03-01 18:57:54 -08:00
Tj Holowaychuk 9e04488eb1 "connect": ">= 0.5.0 < 1.0.0". Closes #547 2011-03-01 18:56:12 -08:00
Tj Holowaychuk 314238f84f qs >= 0.0.5 2011-02-10 15:50:40 -08:00
Tj Holowaychuk 16f925f284 qs >= 0.0.3 2011-02-08 16:57:52 -08:00
Tj Holowaychuk 6fab7b53db Updated qs submodule 2011-02-08 16:57:43 -08:00
Tj Holowaychuk f4a15b2aed Allow req.query to be pre-defined (via middleware or other parent app) 2011-02-07 16:30:57 -08:00
Tj Holowaychuk 4d92fb76f3 fixed two tests 2011-02-07 15:30:20 -08:00
Tj Holowaychuk 4e827a12b1 Removed connects old Server header crap 2011-02-07 15:24:51 -08:00
Tj Holowaychuk 343dd28429 Removed the long deprecated EXPRESS_ENV support 2011-02-07 15:23:57 -08:00
Tj Holowaychuk 51a4881731 Fixed express(1) ENOENT reference for 0.3.x. Closes #524 2011-02-07 15:19:22 -08:00
Tj Holowaychuk 8c3ad12386 Release 1.0.7 2011-02-07 14:26:45 -08:00
Tj Holowaychuk c4bfd0e990 fixed another missing set() 2011-02-07 14:26:04 -08:00
Tj Holowaychuk 38c759be55 Fixed render() setting inheritance
using set() again
2011-02-07 14:25:20 -08:00
9 arquivos alterados com 47 adições e 27 exclusões
+18
Ver Arquivo
@@ -1,4 +1,22 @@
1.0.9 / 2011-03-01
==================
* Fixed `SlowBuffer` support for `res.send()`.
1.0.8 / 2011-03-01
==================
* Allow `req.query` to be pre-defined (via middleware or other parent app)
* "connect": ">= 0.5.0 < 1.0.0". Closes #547
* Removed the long deprecated __EXPRESS_ENV__ support
1.0.7 / 2011-02-07
==================
* Fixed `render()` setting inheritance.
Mounted apps would not inherit "view engine"
1.0.6 / 2011-02-07
==================
+12 -2
Ver Arquivo
@@ -8,11 +8,21 @@ var fs = require('fs')
, sys = require('sys')
, exec = require('child_process').exec;
/**
* COMPAT: constants
*/
try {
var constants = require('constants');
} catch (err) {
var constants = process;
}
/**
* Framework version.
*/
var version = '1.0.6';
var version = '1.0.8';
/**
* stdin stream.
@@ -352,7 +362,7 @@ function createApplicationAt(path) {
function emptyDirectory(path, fn) {
fs.readdir(path, function(err, files){
if (err && err.errno !== process.ENOENT) throw err;
if (err && err.errno !== constants.ENOENT) throw err;
fn(!files || !files.length);
});
}
+1 -1
Ver Arquivo
@@ -19,7 +19,7 @@ var exports = module.exports = require('connect').middleware;
* Framework version.
*/
exports.version = '1.0.6';
exports.version = '1.0.9';
/**
* Module dependencies.
+3 -3
Ver Arquivo
@@ -74,7 +74,7 @@ http.ServerResponse.prototype.send = function(body, headers, status){
}
break;
case 'object':
if (body instanceof Buffer) {
if (Buffer.isBuffer(body)) {
if (!this.headers['Content-Type']) {
this.contentType('.bin');
}
@@ -83,7 +83,7 @@ http.ServerResponse.prototype.send = function(body, headers, status){
this.contentType('.json');
}
body = JSON.stringify(body);
if (this.req.query.callback && this.app.settings['jsonp callback']) {
if (this.req.query.callback && this.app.set('jsonp callback')) {
this.header('Content-Type', 'text/javascript');
body = this.req.query.callback.replace(/[^\w$.]/g, '') + '(' + body + ');';
}
@@ -93,7 +93,7 @@ http.ServerResponse.prototype.send = function(body, headers, status){
// Populate Content-Length
if (!this.headers['Content-Length']) {
this.header('Content-Length', body instanceof Buffer
this.header('Content-Length', Buffer.isBuffer(body)
? body.length
: Buffer.byteLength(body));
}
+1 -10
Ver Arquivo
@@ -37,21 +37,12 @@ var Server = exports = module.exports = function Server(middleware){
// Default "home" to /
this.set('home', '/');
// DEPRECATED: remove in 1.0
if (process.env.EXPRESS_ENV) {
process.env.NODE_ENV = process.env.EXPRESS_ENV;
console.warn('\x1b[33mWarning\x1b[0m: EXPRESS_ENV is deprecated, use NODE_ENV.');
}
// TODO: remove when Connect removes "Server" ...
this.showVersion = false;
// Set "env" to NODE_ENV, defaulting to "development"
this.set('env', process.env.NODE_ENV || 'development');
// Expose objects to each other
this.use(function(req, res, next){
req.query = {};
req.query = req.query || {};
res.headers = { 'X-Powered-By': 'Express' };
req.app = res.app = self;
req.res = res;
+4 -4
Ver Arquivo
@@ -231,8 +231,8 @@ http.ServerResponse.prototype.render = function(view, options, fn){
var options = options || {}
, app = this.app
, viewOptions = app.settings['view options']
, defaultEngine = app.settings['view engine'];
, viewOptions = app.set('view options')
, defaultEngine = app.set('view engine');
// Mixin "view options"
if (viewOptions) options.__proto__ = viewOptions;
@@ -263,13 +263,13 @@ http.ServerResponse.prototype.render = function(view, options, fn){
options.scope = options.scope || this.req;
// Auto-cache in production
if ('production' == app.settings.env) {
if ('production' == app.set('env')) {
options.cache = true;
}
// Partials support
if (options.partial) {
root = app.settings.partials || root + '/partials';
root = app.set('partials') || root + '/partials';
}
// View path
+5 -4
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "express",
"description": "Sinatra inspired web development framework",
"version": "1.0.6",
"version": "1.0.9",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
{ "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" },
@@ -10,12 +10,13 @@
{ "name": "Guillermo Rauch", "email": "rauchg@gmail.com" }
],
"dependencies": {
"connect": ">= 0.5.0",
"qs": ">= 0.0.2"
"connect": ">= 0.5.0 < 1.0.0",
"qs": ">= 0.0.5"
},
"keywords": ["framework", "sinatra", "web", "rest", "restful"],
"directories": { "lib": "./lib/express" },
"main": "index",
"scripts": { "test": "make test" },
"bin": { "express": "./bin/express" },
"engines": { "node": ">= 0.2.0" }
"engines": { "node": ">= 0.2.0 < 0.4.0" }
}
+2 -2
Ver Arquivo
@@ -155,8 +155,8 @@ module.exports = {
assert.response(app,
{ url: '/nope' },
function(res){
assert.ok(res.body.indexOf('Error: ENOENT') >= 0);
assert.ok(res.body.indexOf('nope.jade') >= 0);
assert.ok(~res.body.indexOf('Error:'));
assert.ok(~res.body.indexOf('nope.jade'));
});
beforeExit(function(){