Comparing version 0.13.0 to 0.14.0
@@ -44,3 +44,2 @@ /** | ||
this.subdomainOffset = 2; | ||
this.poweredBy = true; | ||
this.middleware = []; | ||
@@ -86,3 +85,2 @@ this.context = Object.create(context); | ||
'subdomainOffset', | ||
'poweredBy', | ||
'env' | ||
@@ -118,3 +116,3 @@ ]); | ||
var gen = compose(mw); | ||
var fn = co(gen); | ||
var fn = co.wrap(gen); | ||
var self = this; | ||
@@ -128,3 +126,3 @@ | ||
onFinished(res, ctx.onerror); | ||
fn.call(ctx, ctx.onerror); | ||
fn.call(ctx).catch(ctx.onerror); | ||
} | ||
@@ -153,2 +151,3 @@ }; | ||
context.accept = request.accept = accepts(req); | ||
context.state = {}; | ||
return context; | ||
@@ -181,4 +180,2 @@ }; | ||
function *respond(next) { | ||
if (this.app.poweredBy) this.set('X-Powered-By', 'koa'); | ||
yield *next; | ||
@@ -185,0 +182,0 @@ |
@@ -6,2 +6,3 @@ | ||
var contentDisposition = require('content-disposition'); | ||
var ensureErrorHandler = require('error-inject'); | ||
@@ -16,6 +17,4 @@ var getType = require('mime-types').contentType; | ||
var assert = require('assert'); | ||
var http = require('http'); | ||
var path = require('path'); | ||
var vary = require('vary'); | ||
var contentDisposition = require('content-disposition'); | ||
var basename = path.basename; | ||
@@ -262,2 +261,3 @@ var extname = path.extname; | ||
// text | ||
this.type = 'text/plain; charset=utf-8'; | ||
this.body = 'Redirecting to ' + url + '.'; | ||
@@ -264,0 +264,0 @@ }, |
{ | ||
"name": "koa", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"description": "Koa web app framework", | ||
@@ -22,7 +22,7 @@ "main": "lib/application.js", | ||
"accepts": "^1.1.0", | ||
"co": "^3.1.0", | ||
"content-disposition": "~0.3.0", | ||
"co": "^4.0.0", | ||
"content-disposition": "~0.5.0", | ||
"cookies": "~0.5.0", | ||
"debug": "*", | ||
"delegates": "0.0.3", | ||
"delegates": "0.1.0", | ||
"destroy": "^1.0.3", | ||
@@ -48,5 +48,5 @@ "error-inject": "~1.0.0", | ||
"make-lint": "^1.0.1", | ||
"mocha": "^1.17.0", | ||
"mocha": "^2.0.1", | ||
"should": "^3.1.0", | ||
"supertest": "~0.13.0", | ||
"supertest": "~0.15.0", | ||
"test-console": "^0.7.1" | ||
@@ -53,0 +53,0 @@ }, |
<img src="https://dl.dropboxusercontent.com/u/6396913/koa/logo.png" alt="koa middleware framework for nodejs" width="255px" /> | ||
[![gitter][gitter-image]][gitter-url] | ||
[![NPM version][npm-image]][npm-url] | ||
@@ -46,4 +47,5 @@ [![build status][travis-image]][travis-url] | ||
- [kick-off-koa](https://github.com/koajs/kick-off-koa) - An intro to koa via a set of self-guided workshops. | ||
- [workshop](https://github.com/koajs/workshop) - A workshop to learn the basics of koa, Express' spiritual successor. | ||
- [Kick-Off-Koa](https://github.com/koajs/kick-off-koa) - An intro to koa via a set of self-guided workshops. | ||
- [Workshop](https://github.com/koajs/workshop) - A workshop to learn the basics of koa, Express' spiritual successor. | ||
- [Introduction Screencast](http://knowthen.com/episode-3-koajs-quickstart-guide/) - An introduction to installing and getting started with Koa | ||
@@ -82,3 +84,3 @@ ## Example | ||
- [TJ Holowaychuk](https://github.com/visionmedia) | ||
- [TJ Holowaychuk](https://github.com/tj) | ||
- [Jonathan Ong](https://github.com/jonathanong) | ||
@@ -94,5 +96,7 @@ - [Julian Gruber](https://github.com/juliangruber) | ||
[npm-url]: https://npmjs.org/package/koa | ||
[travis-image]: https://img.shields.io/travis/koajs/koa.svg?style=flat-square | ||
[travis-image]: https://img.shields.io/travis/koajs/koa/master.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/koajs/koa | ||
[coveralls-image]: https://img.shields.io/coveralls/koajs/koa.svg?style=flat-square | ||
[coveralls-image]: https://img.shields.io/coveralls/koajs/koa/master.svg?style=flat-square | ||
[coveralls-url]: https://coveralls.io/r/koajs/koa?branch=master | ||
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg | ||
[gitter-url]: https://gitter.im/koajs/koa?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge |
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
41094
8
100
3
1264
+ Addedco@4.6.0(transitive)
+ Addedcontent-disposition@0.5.4(transitive)
+ Addeddelegates@0.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
- Removedco@3.1.0(transitive)
- Removedcontent-disposition@0.3.0(transitive)
- Removeddelegates@0.0.3(transitive)
Updatedco@^4.0.0
Updatedcontent-disposition@~0.5.0
Updateddelegates@0.1.0