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

koa-passport

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-passport - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

5

CHANGELOG.md
# Changelog
## 4.1.0
- add `res` to `req` #114
- add `send()` method to `req` #114
## 4.0.1

@@ -4,0 +9,0 @@

13

lib/framework/koa.js

@@ -111,2 +111,7 @@ 'use strict'

function setBodyAndResolve(content) {
if (content) ctx.body = content
resolve(false)
}
// mock the `res` object

@@ -119,6 +124,4 @@ const res = {

setHeader: ctx.set.bind(ctx),
end: function(content) {
if (content) ctx.body = content
resolve(false)
},
end: setBodyAndResolve,
send: setBodyAndResolve,
set statusCode(status) {

@@ -132,2 +135,4 @@ ctx.status = status

req.res = res
// update the custom callback above

@@ -134,0 +139,0 @@ if (callback) {

@@ -7,3 +7,3 @@ {

},
"version": "4.0.1",
"version": "4.1.0",
"description": "Passport middleware for Koa",

@@ -28,3 +28,3 @@ "keywords": [

"koa-route": "^3.2",
"mocha": "^3.5.0",
"mocha": "^5.1.1",
"passport-local": "^1.0",

@@ -31,0 +31,0 @@ "supertest": "^3.0"

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