js-cookie 3.0.4 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,16 +2,15 @@
2
2
  <img src="https://cloud.githubusercontent.com/assets/835857/14581711/ba623018-0436-11e6-8fce-d2ccd4d379c9.gif">
3
3
  </p>
4
4
 
5
- # JavaScript Cookie [![CI](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml/badge.svg)](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml) [![BrowserStack](https://github.com/js-cookie/js-cookie/actions/workflows/browserstack.yml/badge.svg)](https://github.com/js-cookie/js-cookie/actions/workflows/browserstack.yml) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Code Climate](https://codeclimate.com/github/js-cookie/js-cookie.svg)](https://codeclimate.com/github/js-cookie/js-cookie) [![npm](https://img.shields.io/github/package-json/v/js-cookie/js-cookie)](https://www.npmjs.com/package/js-cookie) [![size](https://img.shields.io/bundlephobia/minzip/js-cookie/3)](https://www.npmjs.com/package/js-cookie) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/js-cookie/badge?style=rounded)](https://www.jsdelivr.com/package/npm/js-cookie)
5
+ # JavaScript Cookie [![CI](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml/badge.svg)](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml) [![npm](https://img.shields.io/github/package-json/v/js-cookie/js-cookie)](https://www.npmjs.com/package/js-cookie) [![size](https://img.shields.io/bundlephobia/minzip/js-cookie/3)](https://www.npmjs.com/package/js-cookie) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/js-cookie/badge?style=rounded)](https://www.jsdelivr.com/package/npm/js-cookie)
6
6
 
7
- A simple, lightweight JavaScript API for handling cookies
7
+ A simple, lightweight JavaScript API for handling cookies, client-side.
8
8
 
9
- - Works in [all](https://www.browserstack.com/automate/public-build/b3VDaHAxVDg0NDdCRmtUOWg0SlQzK2NsRVhWTjlDQS9qdGJoak1GMzJiVT0tLVhwZHNvdGRoY284YVRrRnI3eU1JTnc9PQ==--5e88ffb3ca116001d7ef2cfb97a4128ac31174c2) browsers
9
+ - Extensive browser support
10
10
  - Accepts [any](#encoding) character
11
11
  - [Heavily](test) tested
12
12
  - No dependency
13
- - Supports ES modules
14
- - Supports AMD/CommonJS
13
+ - Supports both ES and AMD/CommonJS modules
15
14
  - [RFC 6265](https://tools.ietf.org/html/rfc6265) compliant
16
15
  - Useful [Wiki](https://github.com/js-cookie/js-cookie/wiki)
17
16
  - Enable [custom encoding/decoding](#converters)
@@ -24,56 +23,28 @@ A simple, lightweight JavaScript API for handling cookies
24
23
 
25
24
  ### NPM
26
25
 
27
- JavaScript Cookie supports [npm](https://www.npmjs.com/package/js-cookie) under the name `js-cookie`.
28
-
29
26
  ```bash
30
27
  npm i js-cookie
31
28
  ```
32
29
 
33
30
  The npm package has a `module` field pointing to an ES module variant of the library, mainly to provide support for ES module aware bundlers, whereas its `browser` field points to an UMD module for full backward compatibility.
34
31
 
35
- ### Direct download
36
-
37
- Starting with version 3 [releases](https://github.com/js-cookie/js-cookie/releases) are distributed with two variants of this library, an ES module as well as an UMD module.
38
-
39
- Note the different extensions: `.mjs` denotes the ES module, whereas `.js` is the UMD one.
40
-
41
- Example for how to load the ES module in a browser:
42
-
43
- ```html
44
- <script type="module" src="/path/to/js.cookie.mjs"></script>
45
- <script type="module">
46
- import Cookies from '/path/to/js.cookie.mjs'
47
-
48
- Cookies.set('foo', 'bar')
49
- </script>
50
- ```
51
-
52
32
  _Not all browsers support ES modules natively yet_. For this reason the npm package/release provides both the ES and UMD module variant and you may want to include the ES module along with the UMD fallback to account for this:
53
33
 
54
- ```html
55
- <script type="module" src="/path/to/js.cookie.mjs"></script>
56
- <script nomodule defer src="/path/to/js.cookie.js"></script>
57
- ```
58
-
59
- Here we're loading the nomodule script in a deferred fashion, because ES modules are deferred by default. This may not be strictly necessary depending on how you're using the library.
60
-
61
34
  ### CDN
62
35
 
63
- Alternatively, include it via [jsDelivr CDN](https://www.jsdelivr.com/package/npm/js-cookie).
36
+ Alternatively, include js-cookie via [jsDelivr CDN](https://www.jsdelivr.com/package/npm/js-cookie).
64
37
 
65
- ## ES Module
38
+ ## Basic Usage
66
39
 
67
- Example for how to import the ES module from another module:
40
+ Import the library:
68
41
 
69
42
  ```javascript
70
43
  import Cookies from 'js-cookie'
71
-
72
- Cookies.set('foo', 'bar')
44
+ // or
45
+ const Cookies = require('js-cookie')
73
46
  ```
74
47
 
75
- ## Basic Usage
76
-
77
48
  Create a cookie, valid across the entire site:
78
49
 
79
50
  ```javascript
@@ -129,10 +100,10 @@ Cookies.remove('name') // fail!
129
100
  Cookies.remove('name', { path: '' }) // removed!
130
101
  ```
131
102
 
132
- _IMPORTANT! When deleting a cookie and you're not relying on the [default attributes](#cookie-attributes), you must pass the exact same path and domain attributes that were used to set the cookie:_
103
+ _IMPORTANT! When deleting a cookie and you're not relying on the [default attributes](#cookie-attributes), you must pass the exact same `path`, `domain`, `secure` and `sameSite` attributes that were used to set the cookie:_
133
104
 
134
105
  ```javascript
135
- Cookies.remove('name', { path: '', domain: '.yourdomain.com' })
106
+ Cookies.remove('name', { path: '', domain: '.yourdomain.com', secure: true })
136
107
  ```
137
108
 
138
109
  _Note: Removing a nonexistent cookie neither raises any exception nor returns any value._
@@ -151,8 +122,8 @@ _Note: The `.noConflict` method is not necessary when using AMD or CommonJS, thu
151
122
 
152
123
  ## Encoding
153
124
 
154
- This project is [RFC 6265](http://tools.ietf.org/html/rfc6265#section-4.1.1) compliant. All special characters that are not allowed in the cookie-name or cookie-value are encoded with each one's UTF-8 Hex equivalent using [percent-encoding](http://en.wikipedia.org/wiki/Percent-encoding).
155
- The only character in cookie-name or cookie-value that is allowed and still encoded is the percent `%` character, it is escaped in order to interpret percent input as literal.
125
+ This project is [RFC 6265](http://tools.ietf.org/html/rfc6265#section-4.1.1) compliant. All special characters that are not allowed in the cookie-name or cookie-value are encoded with each one's UTF-8 Hex equivalent using [percent-encoding](http://en.wikipedia.org/wiki/Percent-encoding).
126
+ The only character in cookie-name or cookie-value that is allowed and still encoded is the percent `%` character, it is escaped in order to interpret percent input as literal.
156
127
  Please note that the default encoding/decoding strategy is meant to be interoperable [only between cookies that are read/written by js-cookie](https://github.com/js-cookie/js-cookie/pull/200#discussion_r63270778). To override the default encoding/decoding strategy you need to use a [converter](#converters).
157
128
 
158
129
  _Note: According to [RFC 6265](https://tools.ietf.org/html/rfc6265#section-6.1), your cookies may get deleted if they are too big or there are too many cookies in the same domain, [more details here](https://github.com/js-cookie/js-cookie/wiki/Frequently-Asked-Questions#why-are-my-cookies-being-deleted)._
@@ -218,8 +189,8 @@ Cookies.get('name') // => undefined (need to read at 'subdomain.site.com')
218
189
 
219
190
  **Note regarding Internet Explorer default behavior:**
220
191
 
221
- > Q3: If I don’t specify a DOMAIN attribute (for) a cookie, IE sends it to all nested subdomains anyway?
222
- > A: Yes, a cookie set on example.com will be sent to sub2.sub1.example.com.
192
+ > Q3: If I don’t specify a DOMAIN attribute (for) a cookie, IE sends it to all nested subdomains anyway?
193
+ > A: Yes, a cookie set on example.com will be sent to sub2.sub1.example.com.
223
194
  > Internet Explorer differs from other browsers in this regard.
224
195
 
225
196
  (From [Internet Explorer Cookie Internals (FAQ)](http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx))
@@ -240,13 +211,27 @@ Cookies.get('name') // => 'value'
240
211
  Cookies.remove('name')
241
212
  ```
242
213
 
214
+ ### partitioned
215
+
216
+ Either `true` or `false`, indicating if the cookie opts into partitioned storage. Must also set `secure: true`.
217
+
218
+ **Default:** No partitioned storage.
219
+
220
+ **Examples:**
221
+
222
+ ```javascript
223
+ Cookies.set('name', 'value', { partitioned: true })
224
+ Cookies.get('name') // => 'value'
225
+ Cookies.remove('name')
226
+ ```
227
+
243
228
  ### sameSite
244
229
 
245
230
  A [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), allowing to control whether the browser is sending a cookie along with cross-site requests.
246
231
 
247
232
  Default: not set.
248
233
 
249
- **Note that more recent browsers are making "Lax" the default value even without specifiying anything here.**
234
+ **Note that more recent browsers are making "Lax" the default value even without specifying anything here.**
250
235
 
251
236
  **Examples:**
252
237
 
@@ -313,16 +298,12 @@ Check out the [Servers Docs](SERVER_SIDE.md)
313
298
 
314
299
  Check out the [Contributing Guidelines](CONTRIBUTING.md)
315
300
 
316
- ## Security
317
-
318
- For vulnerability reports, send an e-mail to `js-cookie at googlegroups dot com`
319
-
320
301
  ## Releasing
321
302
 
322
- For releasing there's the `Release` GitHub Actions workflow, which will create a new release along with package provenance on npmjs.com.
303
+ Releasing should be done via the `Release` GitHub Actions workflow, so that published packages on npmjs.com have package provenance.
323
304
 
324
- _GitHub releases are created as a draft and need to be published manually!
325
- (This is so we are able to craft suitable release notes before publishing.)_
305
+ GitHub releases are created as a draft and need to be published manually!
306
+ (This is so we are able to craft suitable release notes before publishing.)
326
307
 
327
308
  ## Supporters
328
309
 
package/dist/js.cookie.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! js-cookie v3.0.4 | MIT */
1
+ /*! js-cookie v3.0.6 | MIT */
2
2
  ;
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -10,19 +10,17 @@
10
10
  })());
11
11
  })(this, (function () { 'use strict';
12
12
 
13
- /* eslint-disable no-var */
14
13
  function assign (target) {
15
14
  for (var i = 1; i < arguments.length; i++) {
16
15
  var source = arguments[i];
17
16
  for (var key in source) {
17
+ if (key === '__proto__') continue
18
18
  target[key] = source[key];
19
19
  }
20
20
  }
21
21
  return target
22
22
  }
23
- /* eslint-enable no-var */
24
23
 
25
- /* eslint-disable no-var */
26
24
  var defaultConverter = {
27
25
  read: function (value) {
28
26
  if (value[0] === '"') {
@@ -37,12 +35,9 @@
37
35
  )
38
36
  }
39
37
  };
40
- /* eslint-enable no-var */
41
38
 
42
- /* eslint-disable no-var */
43
-
44
- function init (converter, defaultAttributes) {
45
- function set (name, value, attributes) {
39
+ function init(converter, defaultAttributes) {
40
+ function set(name, value, attributes) {
46
41
  if (typeof document === 'undefined') {
47
42
  return
48
43
  }
@@ -86,7 +81,7 @@
86
81
  name + '=' + converter.write(value, name) + stringifiedAttributes)
87
82
  }
88
83
 
89
- function get (name) {
84
+ function get(name) {
90
85
  if (typeof document === 'undefined' || (arguments.length && !name)) {
91
86
  return
92
87
  }
@@ -101,12 +96,13 @@
101
96
 
102
97
  try {
103
98
  var found = decodeURIComponent(parts[0]);
104
- jar[found] = converter.read(value, found);
105
-
99
+ if (!(found in jar)) jar[found] = converter.read(value, found);
106
100
  if (name === found) {
107
101
  break
108
102
  }
109
- } catch (e) {}
103
+ } catch {
104
+ // Do nothing...
105
+ }
110
106
  }
111
107
 
112
108
  return name ? jar[name] : jar
@@ -140,7 +136,6 @@
140
136
  }
141
137
 
142
138
  var api = init(defaultConverter, { path: '/' });
143
- /* eslint-enable no-var */
144
139
 
145
140
  return api;
146
141
 
@@ -1,2 +1,2 @@
1
- /*! js-cookie v3.0.4 | MIT */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var t=function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});return t}));
1
+ /*! js-cookie v3.0.6 | MIT */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)"__proto__"!==o&&(e[o]=n[o])}return e}var t=function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(u in o||(o[u]=n.read(c,u)),e===u)break}catch{}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});return t}));
@@ -1,2 +1,2 @@
1
- /*! js-cookie v3.0.4 | MIT */
2
- function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var t=function t(r,n){function o(t,o,i){if("undefined"!=typeof document){"number"==typeof(i=e({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+r.write(o,t)+c}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},o=0;o<t.length;o++){var i=t[o].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(n[u]=r.read(c,u),e===u)break}catch(e){}}return e?n[e]:n}},remove:function(t,r){o(t,"",e({},r,{expires:-1}))},withAttributes:function(r){return t(this.converter,e({},this.attributes,r))},withConverter:function(r){return t(e({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(r)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});export{t as default};
1
+ /*! js-cookie v3.0.6 | MIT */
2
+ function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)"__proto__"!==n&&(e[n]=r[n])}return e}var t=function t(r,n){function o(t,o,i){if("undefined"!=typeof document){"number"==typeof(i=e({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+r.write(o,t)+c}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},o=0;o<t.length;o++){var i=t[o].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(u in n||(n[u]=r.read(c,u)),e===u)break}catch{}}return e?n[e]:n}},remove:function(t,r){o(t,"",e({},r,{expires:-1}))},withAttributes:function(r){return t(this.converter,e({},this.attributes,r))},withConverter:function(r){return t(e({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(r)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});export{t as default};
@@ -1,17 +1,15 @@
1
- /*! js-cookie v3.0.4 | MIT */
2
- /* eslint-disable no-var */
1
+ /*! js-cookie v3.0.6 | MIT */
3
2
  function assign (target) {
4
3
  for (var i = 1; i < arguments.length; i++) {
5
4
  var source = arguments[i];
6
5
  for (var key in source) {
6
+ if (key === '__proto__') continue
7
7
  target[key] = source[key];
8
8
  }
9
9
  }
10
10
  return target
11
11
  }
12
- /* eslint-enable no-var */
13
12
 
14
- /* eslint-disable no-var */
15
13
  var defaultConverter = {
16
14
  read: function (value) {
17
15
  if (value[0] === '"') {
@@ -26,12 +24,9 @@ var defaultConverter = {
26
24
  )
27
25
  }
28
26
  };
29
- /* eslint-enable no-var */
30
27
 
31
- /* eslint-disable no-var */
32
-
33
- function init (converter, defaultAttributes) {
34
- function set (name, value, attributes) {
28
+ function init(converter, defaultAttributes) {
29
+ function set(name, value, attributes) {
35
30
  if (typeof document === 'undefined') {
36
31
  return
37
32
  }
@@ -75,7 +70,7 @@ function init (converter, defaultAttributes) {
75
70
  name + '=' + converter.write(value, name) + stringifiedAttributes)
76
71
  }
77
72
 
78
- function get (name) {
73
+ function get(name) {
79
74
  if (typeof document === 'undefined' || (arguments.length && !name)) {
80
75
  return
81
76
  }
@@ -90,12 +85,13 @@ function init (converter, defaultAttributes) {
90
85
 
91
86
  try {
92
87
  var found = decodeURIComponent(parts[0]);
93
- jar[found] = converter.read(value, found);
94
-
88
+ if (!(found in jar)) jar[found] = converter.read(value, found);
95
89
  if (name === found) {
96
90
  break
97
91
  }
98
- } catch (e) {}
92
+ } catch {
93
+ // Do nothing...
94
+ }
99
95
  }
100
96
 
101
97
  return name ? jar[name] : jar
@@ -129,6 +125,5 @@ function init (converter, defaultAttributes) {
129
125
  }
130
126
 
131
127
  var api = init(defaultConverter, { path: '/' });
132
- /* eslint-enable no-var */
133
128
 
134
129
  export { api as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-cookie",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "A simple, lightweight JavaScript API for handling cookies",
5
5
  "browser": "dist/js.cookie.js",
6
6
  "module": "dist/js.cookie.mjs",
@@ -23,12 +23,15 @@
23
23
  "amd",
24
24
  "commonjs",
25
25
  "client",
26
- "js-cookie",
27
- "browserify"
26
+ "js-cookie"
28
27
  ],
29
28
  "scripts": {
30
29
  "test": "grunt test",
31
- "format": "grunt exec:format",
30
+ "test:browserstack": "grunt browserstack",
31
+ "format": "prettier --write .",
32
+ "format:check": "prettier --check .",
33
+ "lint": "eslint --fix .",
34
+ "lint:check": "eslint .",
32
35
  "dist": "rm -rf dist/* && rollup -c",
33
36
  "release": "release-it"
34
37
  },
@@ -43,30 +46,33 @@
43
46
  "author": "Klaus Hartl",
44
47
  "license": "MIT",
45
48
  "devDependencies": {
46
- "@rollup/plugin-terser": "^0.4.0",
47
- "browserstack-runner": "github:browserstack/browserstack-runner#1e85e559951bdf97ffe2a7c744ee67ca83589fde",
48
- "eslint": "^7.31.0",
49
- "eslint-config-standard": "^16.0.3",
50
- "eslint-plugin-html": "^7.0.0",
51
- "eslint-plugin-markdown": "^3.0.0",
49
+ "@eslint/js": "^10.0.1",
50
+ "@rollup/plugin-terser": "^1.0.0",
51
+ "browserstack-node-sdk": "^1.52.2",
52
+ "eslint": "^10.0.1",
53
+ "eslint-config-prettier": "^10.0.1",
54
+ "eslint-plugin-html": "^8.0.0",
55
+ "eslint-plugin-markdown": "^5.0.0",
56
+ "globals": "^17.3.0",
52
57
  "grunt": "^1.0.4",
53
58
  "grunt-compare-size": "^0.4.2",
54
- "grunt-contrib-connect": "^3.0.0",
55
- "grunt-contrib-nodeunit": "^5.0.0",
56
- "grunt-contrib-qunit": "^7.0.0",
59
+ "grunt-contrib-connect": "^5.0.0",
60
+ "grunt-contrib-qunit": "^10.0.0",
57
61
  "grunt-contrib-watch": "^1.1.0",
58
62
  "grunt-exec": "^3.0.0",
59
63
  "gzip-js": "^0.3.2",
60
- "prettier": "^2.3.2",
61
- "qunit": "^2.9.3",
62
- "release-it": "^15.0.0",
63
- "rollup": "^3.17.2",
64
+ "js-reporters": "^2.1.0",
65
+ "nano-staged": "^1.0.2",
66
+ "prettier": "^3.0.0",
67
+ "qunit": "^2.19.4",
68
+ "release-it": "^20.0.0",
69
+ "rollup": "^4.53.3",
64
70
  "rollup-plugin-filesize": "^10.0.0",
65
- "rollup-plugin-license": "^3.0.0",
66
- "standard": "^17.0.0"
71
+ "rollup-plugin-license": "^3.2.0",
72
+ "selenium-webdriver": "^4.43.0",
73
+ "simple-git-hooks": "^2.8.1"
67
74
  },
68
75
  "engines": {
69
- "node": ">=14",
70
- "npm": ">=9.5.0"
76
+ "node": ">=20"
71
77
  }
72
78
  }