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

js-cookie

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-cookie - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

test/missing_semicolon.html

2

Gruntfile.js

@@ -40,3 +40,3 @@ /*jshint node:true */

nodeunit: {
all: 'test/commonjs.js'
all: 'test/node.js'
},

@@ -43,0 +43,0 @@ jshint: {

{
"name": "js-cookie",
"version": "2.1.0",
"version": "2.1.1",
"description": "A simple, lightweight JavaScript API for handling cookies",

@@ -30,16 +30,16 @@ "main": "src/js.cookie.js",

"devDependencies": {
"grunt": "0.4.5",
"grunt": "1.0.0",
"grunt-compare-size": "0.4.0",
"grunt-contrib-connect": "0.10.1",
"grunt-contrib-jshint": "0.11.1",
"grunt-contrib-connect": "1.0.0",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-nodeunit": "0.4.1",
"grunt-contrib-qunit": "0.7.0",
"grunt-contrib-uglify": "0.9.1",
"grunt-contrib-watch": "0.6.1",
"grunt-jscs": "1.6.0",
"grunt-saucelabs": "8.6.0",
"grunt-contrib-qunit": "1.1.0",
"grunt-contrib-uglify": "1.0.1",
"grunt-contrib-watch": "1.0.0",
"grunt-jscs": "2.8.0",
"grunt-saucelabs": "8.6.2",
"gzip-js": "0.3.2",
"qunitjs": "1.18.0",
"requirejs": "2.1.17"
"qunitjs": "1.23.0",
"requirejs": "2.2.0"
}
}

@@ -17,3 +17,3 @@ # JavaScript Cookie [![Build Status](https://travis-ci.org/js-cookie/js-cookie.svg?branch=master)](https://travis-ci.org/js-cookie/js-cookie) [![Code Climate](https://codeclimate.com/github/js-cookie/js-cookie.svg)](https://codeclimate.com/github/js-cookie/js-cookie)

**If you're viewing this at https://github.com/js-cookie/js-cookie, you're reading the documentation for the master branch.
[View documentation for the latest release (2.1.0).](https://github.com/js-cookie/js-cookie/tree/v2.1.0#readme)**
[View documentation for the latest release (2.1.1).](https://github.com/js-cookie/js-cookie/tree/v2.1.1#readme)**

@@ -20,0 +20,0 @@ ## Build Status Matrix

@@ -52,4 +52,6 @@ # Server-side integration

## Tomcat 7.x
## Tomcat
### Version >= 7.x
It seems that there is a situation where Tomcat does not [read the parens correctly](https://github.com/js-cookie/js-cookie/issues/92#issue-107743407). To fix this you need to write a custom write converter.

@@ -73,2 +75,13 @@

### Version >= 8.0.15
Since Tomcat 8.0.15, it is possible to configure RFC 6265 compliance by changing your `conf/context.xml` file and adding the new [CookieProcessor](https://tomcat.apache.org/tomcat-8.0-doc/config/cookie-processor.html) nested inside the Context element. It would be like this:
```xml
<Context>
<CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"/>
</context>
```
And you're all done.
Alternatively, you can check the [Java Cookie](https://github.com/js-cookie/java-cookie) project, which integrates nicely with JavaScript Cookie.

@@ -75,0 +88,0 @@

/*!
* JavaScript Cookie v2.1.0
* JavaScript Cookie v2.1.1
* https://github.com/js-cookie/js-cookie

@@ -8,3 +8,3 @@ *

*/
(function (factory) {
;(function (factory) {
if (typeof define === 'function' && define.amd) {

@@ -15,6 +15,6 @@ define(factory);

} else {
var _OldCookies = window.Cookies;
var OldCookies = window.Cookies;
var api = window.Cookies = factory();
api.noConflict = function () {
window.Cookies = _OldCookies;
window.Cookies = OldCookies;
return api;

@@ -39,2 +39,5 @@ };

var result;
if (typeof document === 'undefined') {
return;
}

@@ -128,3 +131,6 @@ // Write

api.get = api.set = api;
api.set = api;
api.get = function (key) {
return api(key);
};
api.getJSON = function () {

@@ -131,0 +137,0 @@ return api.apply({

@@ -66,2 +66,21 @@ /*global lifecycle: true*/

// github.com/js-cookie/js-cookie/pull/171
QUnit.test('missing leading semicolon', function (assert) {
assert.expect(1);
var done = assert.async();
// Sandbox in an iframe so that we can poke around with document.cookie.
var iframe = document.createElement('iframe');
var loadedSuccessfully = true;
iframe.src = 'missing_semicolon.html';
addEvent(iframe, 'load', function () {
iframe.contentWindow.onerror = function () {
loadedSuccessfully = false;
};
assert.strictEqual(loadedSuccessfully, true, 'can\'t throw Object is not a function error');
done();
});
document.body.appendChild(iframe);
});
QUnit.test('Call to read all when there are cookies', function (assert) {

@@ -93,2 +112,9 @@ Cookies.set('c', 'v');

// github.com/js-cookie/js-cookie/issues/145
QUnit.test('Call to read cookie when passing an Object Literal as the second argument', function (assert) {
assert.expect(1);
Cookies.get('name', { path: '' });
assert.strictEqual(document.cookie, '', 'should not create a cookie');
});
QUnit.module('write', lifecycle);

@@ -95,0 +121,0 @@

@@ -114,2 +114,10 @@ // https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit

};
window.loadFileSync = function (path) {
var xhr = new XMLHttpRequest();
xhr.open('GET', path, false);
xhr.send(null);
return xhr.status === 200 ? xhr.responseText : null;
};
}());

Sorry, the diff of this file is not supported yet

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