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

sessionstore

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sessionstore - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

20

lib/library.js

@@ -8,13 +8,12 @@ 'use strict';

// get express version
var file = path.join(__dirname, '/..', 'node_modules', 'express', 'package.json');
var exists = fs.existsSync(file);
var expressPkg;
if (!exists) {
try {
expressPkg = require('express/package.json');
} catch (err) {
throw new Error('No express found.');
}
// read out major version
var buffer = fs.readFileSync(file);
var version = JSON.parse(buffer).version.split('.')[0];
version = parseInt(version);
var version = parseInt(expressPkg.version.split('.')[0], 10);

@@ -24,6 +23,7 @@ if (version < 4) {

} else if (version === 4) {
file = path.join(__dirname, '/..', 'node_modules', 'express-session', 'package.json');
exists = fs.existsSync(file);
var expressSessPkg;
if (!exists) {
try {
expressSessPkg = require('express-session/package.json');
} catch (err) {
throw new Error('No express-session found.');

@@ -30,0 +30,0 @@ }

{
"author": "adrai",
"name": "sessionstore",
"version": "0.4.3",
"version": "0.4.4",
"private": false,

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -97,2 +97,3 @@ # Introduction

# License

@@ -99,0 +100,0 @@

@@ -30,3 +30,3 @@ var expect = require('expect.js'),

describe('an existing db implementation of redis', function(done) {
describe('an existing db implementation of redis', function() {
it('it should return a new store', function() {

@@ -37,3 +37,3 @@ var store = sessionStore.createSessionStore({ type: 'redis' });

it('it should set and get a session', function() {
it('it should set and get a session', function(done) {
sessionStore.createSessionStore({ type: 'redis' }, function(err, store){

@@ -71,3 +71,3 @@ // #set()

describe('an existing db implementation of memcached', function(done) {
describe('an existing db implementation of memcached', function() {
it('it should return a new store', function() {

@@ -78,3 +78,3 @@ var store = sessionStore.createSessionStore({ type: 'memcached' });

it('it should set and get a session', function() {
it('it should set and get a session', function(done) {
sessionStore.createSessionStore({ type: 'memcached' }, function(err, store) {

@@ -81,0 +81,0 @@ // #set()

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