Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa

Package Overview
Dependencies
Maintainers
5
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa - npm Package Compare versions

Comparing version 2.4.1 to 2.5.0

15

History.md
2.5.0 / 2018-02-11
==================
* feat: ignore set header/status when header sent (#1137)
* run coverage using --runInBand (#1141)
* [Update] license year to 2018 (#1130)
* docs: small grammatical fix in api docs index (#1111)
* docs: fixed typo (#1112)
* docs: capitalize K in word koa (#1126)
* Error handling: on non-error throw try to stringify if error is an object (#1113)
* Use eslint-config-koa (#1105)
* Update mgol's name in AUTHORS, add .mailmap (#1100)
* Avoid generating package locks instead of ignoring them (#1108)
* chore: update copyright year to 2017 (#1095)
2.4.1 / 2017-11-06

@@ -4,0 +19,0 @@ ==================

3

lib/context.js

@@ -8,2 +8,3 @@

const util = require('util');
const createError = require('http-errors');

@@ -109,3 +110,3 @@ const httpAssert = require('http-assert');

if (!(err instanceof Error)) err = new Error(`non-error thrown: ${err}`);
if (!(err instanceof Error)) err = new Error(util.format('non-error thrown: %j', err));

@@ -112,0 +113,0 @@ let headerSent = false;

@@ -83,5 +83,6 @@

set status(code) {
if (this.headerSent) return;
assert('number' == typeof code, 'status code must be a number');
assert(statuses[code], `invalid status code: ${code}`);
assert(!this.res.headersSent, 'headers have already been sent');
this._explicitStatus = true;

@@ -137,4 +138,2 @@ this.res.statusCode = code;

if (this.res.headersSent) return;
// no content

@@ -238,2 +237,4 @@ if (null == val) {

vary(field) {
if (this.headerSent) return;
vary(this.res, field);

@@ -440,2 +441,4 @@ },

set(field, val) {
if (this.headerSent) return;
if (2 == arguments.length) {

@@ -488,2 +491,4 @@ if (Array.isArray(val)) val = val.map(String);

remove(field) {
if (this.headerSent) return;
this.res.removeHeader(field);

@@ -490,0 +495,0 @@ },

{
"name": "koa",
"version": "2.4.1",
"version": "2.5.0",
"description": "Koa web app framework",

@@ -8,3 +8,3 @@ "main": "lib/application.js",

"test": "jest",
"test-cov": "npm run test -- --coverage",
"test-cov": "jest --coverage --runInBand --forceExit",
"lint": "eslint benchmarks lib test",

@@ -52,4 +52,4 @@ "bench": "make -C benchmarks",

"devDependencies": {
"babel-eslint": "^7.1.1",
"eslint": "^3.17.1",
"eslint-config-koa": "^2.0.0",
"eslint-config-standard": "^7.0.1",

@@ -56,0 +56,0 @@ "eslint-plugin-promise": "^3.5.0",

@@ -1,2 +0,2 @@

<img src="/docs/logo.png" alt="koa middleware framework for nodejs"/>
<img src="/docs/logo.png" alt="Koa middleware framework for nodejs"/>

@@ -25,3 +25,3 @@ [![gitter][gitter-image]][gitter-url]

## Hello koa
## Hello Koa

@@ -42,4 +42,4 @@ ```js

- [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

@@ -46,0 +46,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc