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

statehood

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

statehood - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

10

lib/index.js

@@ -37,3 +37,3 @@ // Load modules

autoValue: Joi.any(),
passThrough: Joi.boolean()
passThrough: Joi.boolean()
});

@@ -58,3 +58,3 @@

Joi.assert(this.settings, internals.schema, 'Invalid state definition defaults');
this.cookies = {};

@@ -70,3 +70,3 @@ this.names = [];

var settings = Hoek.applyToDefaults(this.settings, options || {});
var settings = Hoek.applyToDefaults(this.settings, options || {}, true);
Joi.assert(settings, internals.schema, 'Invalid state definition: ' + name);

@@ -130,3 +130,3 @@

});
// Validate cookie header syntax

@@ -358,3 +358,3 @@

var base = self.cookies[cookie.name] || self.settings;
var definition = cookie.options ? Hoek.applyToDefaults(base, cookie.options) : base;
var definition = cookie.options ? Hoek.applyToDefaults(base, cookie.options, true) : base;

@@ -361,0 +361,0 @@ // Validate name

{
"name": "statehood",
"description": "HTTP State Management Utilities",
"version": "2.0.0",
"version": "2.1.0",
"repository": "git://github.com/hapijs/statehood",
"main": "index",
"main": "lib/index.js",
"keywords": [

@@ -17,8 +17,8 @@ "HTTP",

"dependencies": {
"boom": "2.x.x",
"cryptiles": "2.x.x",
"hoek": "2.x.x",
"iron": "2.x.x",
"items": "1.x.x",
"joi": "5.x.x"
"boom": "2.x.x",
"cryptiles": "2.x.x",
"hoek": "2.x.x",
"iron": "2.x.x",
"items": "1.x.x",
"joi": "4.x.x"
},

@@ -30,10 +30,6 @@ "devDependencies": {

"scripts": {
"test": "make test-cov"
"test": "lab -a code -t 100 -L",
"test-cov-html": "lab -a code -r html -o coverage.html"
},
"licenses": [
{
"type": "BSD",
"url": "http://github.com/hapijs/statehood/raw/master/LICENSE"
}
]
"license": "BSD-3-Clause"
}

@@ -63,2 +63,15 @@

});
it('adds definition with null value', function (done) {
var definitions = new Statehood.Definitions({ path: '/' });
definitions.add('base');
expect(definitions.cookies.base.path).to.equal('/');
definitions.add('test', { path: null });
expect(definitions.cookies.test.path).to.equal(null);
done();
});
});

@@ -772,3 +785,3 @@

var definitions = new Statehood.Definitions();
var definitions = new Statehood.Definitions({ ttl: 3600 });
definitions.format({ name: 'sid', value: 'fihfieuhr9384hf', options: { ttl: null, isSecure: true, isHttpOnly: true, path: '/', domain: 'example.com' } }, function (err, header) {

@@ -1207,2 +1220,1 @@

});

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