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

koa-session

Package Overview
Dependencies
Maintainers
8
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-session - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

LICENSE

9

History.md

@@ -0,1 +1,10 @@

6.1.0 / 2020-10-08
==================
**features**
* [[`32e3526`](http://github.com/koajs/session/commit/32e352665f2adbcda34d1d990bb6c5d875c0b625)] - feat: add context to external store .get() and .set() options params (#201) (Ngorror <<ngorror@gmail.com>>)
**others**
* [[`f765595`](http://github.com/koajs/session/commit/f76559568bb7f6321cab3f44ae759521deca3dd1)] - chore: Create LICENSE File (#195) (Dominic Egginton <<dominic.egginton@gmail.com>>)
6.0.0 / 2020-04-26

@@ -2,0 +11,0 @@ ==================

5

lib/context.js

@@ -90,3 +90,3 @@ 'use strict';

const json = await this.store.get(externalKey, opts.maxAge, { rolling: opts.rolling });
const json = await this.store.get(externalKey, opts.maxAge, { ctx, rolling: opts.rolling });
if (!this.valid(json, externalKey)) {

@@ -288,3 +288,3 @@ // create a new `externalKey`

if (externalKey) await this.store.destroy(externalKey);
if (externalKey) await this.store.destroy(externalKey, { ctx });
ctx.cookies.set(key, '', opts);

@@ -325,2 +325,3 @@ }

changed,
ctx: this.ctx,
rolling: opts.rolling,

@@ -327,0 +328,0 @@ });

2

package.json

@@ -5,3 +5,3 @@ {

"repository": "koajs/session",
"version": "6.0.0",
"version": "6.1.0",
"keywords": [

@@ -8,0 +8,0 @@ "koa",

@@ -114,5 +114,5 @@ # koa-session

- `get(key, maxAge, { rolling })`: get session object by key
- `set(key, sess, maxAge, { rolling, changed })`: set session object for key, with a `maxAge` (in ms)
- `destroy(key)`: destroy session for key
- `get(key, maxAge, { rolling, ctx })`: get session object by key
- `set(key, sess, maxAge, { rolling, changed, ctx })`: set session object for key, with a `maxAge` (in ms)
- `destroy(key, {ctx})`: destroy session for key

@@ -119,0 +119,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