<p>Bumps <a href="https://github.com/js-cookie/js-cookie">js-cookie</a> from 2.2.1 to 3.0.0.</p>
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/js-cookie/js-cookie/releases">js-cookie's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Removed <code>defaults</code> in favor of a builder: now to supply an api instance with particular predefined (cookie) attributes there's <code>Cookies.withAttributes()</code>, e.g.:</li>
</ul>
<div class="highlight highlight-source-js position-relative" data-snippet-clipboard-copy-content="const api = Cookies.withAttributes({
path: '/',
secure: true
})
api.set('key', 'value') // writes cookie with path: '/' and secure: true...
"><pre><span class="pl-k">const</span> <span class="pl-s1">api</span> <span class="pl-c1">=</span> <span class="pl-v">Cookies</span><span class="pl-kos">.</span><span class="pl-en">withAttributes</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-c1">path</span>: <span class="pl-s">'/'</span><span class="pl-kos">,</span>
<span class="pl-c1">secure</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-s1">api</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s">'key'</span><span class="pl-kos">,</span> <span class="pl-s">'value'</span><span class="pl-kos">)</span> <span class="pl-c">// writes cookie with path: '/' and secure: true...</span></pre></div>
<ul>
<li>The attributes that an api instance is configured with are exposed as <code>attributes</code> property; it's an immutable object and unlike <code>defaults</code> cannot be changed to configure the api.</li>
<li>The mechanism to fall back to the standard, internal converter by returning a falsy value in a custom read converter has been removed. Instead the default converters are now exposed as <code>Cookies.converter</code>, which allows for implementing self-contained custom converters providing the same behavior:</li>
</ul>
<div class="highlight highlight-source-js position-relative" data-snippet-clipboard-copy-content="const customReadConverter = (value, name) => {
if (name === 'special') {
return unescape(value)
}
return Cookies.converter.read(value)
}
"><pre><span class="pl-k">const</span> <span class="pl-en">customReadConverter</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">name</span> <span class="pl-c1">===</span> <span class="pl-s">'special'</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">return</span> <span class="pl-en">unescape</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-k">return</span> <span class="pl-v">Cookies</span><span class="pl-kos">.</span><span class="pl-c1">converter</span><span class="pl-kos">.</span><span class="pl-en">read</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span></pre></div>
<ul>
<li><code>withConverter()</code> no longer accepts a function as argument to be turned into a read converter. It is now required to always pass an object with the explicit type(s) of converter(s):</li>
</ul>
<div class="highlight highlight-source-js position-relative" data-snippet-clipboard-copy-content="const api = Cookies.withConverter({
read: (value, name) => unescape(value)
})
"><pre><span class="pl-k">const</span> <span class="pl-s1">api</span> <span class="pl-c1">=</span> <span class="pl-v">Cookies</span><span class="pl-kos">.</span><span class="pl-en">withConverter</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
<span class="pl-en">read</span>: <span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">,</span> <span class="pl-s1">name</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-en">unescape</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<ul>
<li>The converter(s) that an api instance is configured with are exposed as <code>converter</code> property; it's an immutable object and cannot be changed to configure the api.</li>
<li>Started providing library as ES module, in addition to UMD module. The <code>module</code> field in <code>package.json</code> points to an ES module variant of the library.</li>
<li>Started using <code>browser</code> field instead of <code>main</code> in <code>package.json</code> (for the UMD variant of the library).</li>
<li>Dropped support for IE < 10.</li>
<li>Removed <code>getJSON()</code>: use <code>Cookies.set('foo', JSON.stringify({ ... }))</code> and <code>JSON.parse(Cookies.get('foo'))</code> instead.</li>
<li>Removed support for Bower.</li>
<li>Added minified versions to package - <a href="https://github-redirect.dependabot.com/js-cookie/js-cookie/issues/501" rel="nofollow">#501</a></li>
<li>Improved support for url encoded cookie values (support case insensitive encoding) - <a href="https://github-redirect.dependabot.com/js-cookie/js-cookie/issues/466" rel="nofollow">#466</a>, <a href="https://github-redirect.dependabot.com/js-cookie/js-cookie/issues/530" rel="nofollow">#530</a></li>
<li>Expose default path via API - <a href="https://github-redirect.dependabot.com/js-cookie/js-cookie/issues/541" rel="nofollow">#541</a></li>
<li>Handle falsy arguments passed to getters - <a href="https://github-redirect.dependabot.com/js-cookie/js-cookie/issues/399" rel="nofollow">#399</a></li>
<li>No longer support Node < 12 when building (LTS versions only)</li>
</ul>
<h2>v3.0.0-rc.4</h2>
<p>Reverted changes introduced in <a href="https://github.com/js-cookie/js-cookie/releases/tag/v3.0.0-rc.2">rc2</a>, which caused a mayor breaking change in the case of requesting the library via jsdelivr CDN with a particular file name. <strong>This breaking change was not intentional.</strong></p>
<p>The problem was that we've been advertising the following link in the readme on the master branch:</p>
<p><a href="https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js" rel="nofollow">https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js</a></p>
<p>while the respective change had changed that file name in the distribution to <code>js.cookie.umd.min.js</code>.</p>
<p><strong>Nonetheless, we advise to always use the latest stable version in production environments.</strong></p>
<h2>v3.0.0-rc.3</h2>
<ul>
<li>Fixed paths in <code>exports</code> field in package.json - <a href="https://github-redirect.dependabot.com/js-cookie/js-cookie/issues/695" rel="nofollow">#695</a></li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/js-cookie/js-cookie/commit/ea3239ac98cb0269746563092f9e3662a7b20ad3"><code>ea3239a</code></a> Craft v3.0.0 release</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/1711eb2f3f5a95b6334771bbf458bbb1510f2ff1"><code>1711eb2</code></a> Bump eslint-plugin-promise from 4.3.1 to 5.1.0</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/7e1d613acbe89ef7efa59a188c80be7dbd2c606a"><code>7e1d613</code></a> Bump eslint-config-standard from 14.1.1 to 16.0.3</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/2643786060f66dfcaac5ba34e33240f48685299f"><code>2643786</code></a> Bump eslint-plugin-markdown from 1.0.2 to 2.2.0</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/309a4eb1ead9875a8620230c2312aa2a0b7dbf1c"><code>309a4eb</code></a> Bump standard from 14.3.4 to 16.0.3</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/74c56efe4719d48e51b95116423d0120b39084a5"><code>74c56ef</code></a> Bump eslint from 6.8.0 to 7.31.0</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/2fe225a3e5d9c667bf17a6ae52f750d302f6112a"><code>2fe225a</code></a> Bump grunt-contrib-nodeunit from 2.1.0 to 3.0.0</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/6105fb3d4e2d643361260b2bbe7118c22db57b61"><code>6105fb3</code></a> Bump grunt-contrib-connect from 2.1.0 to 3.0.0</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/cc25e502a0b9fa96462bc39d7c3ac9c102b936a3"><code>cc25e50</code></a> Reformat with up-to-date prettier</li>
<li><a href="https://github.com/js-cookie/js-cookie/commit/f423ced8dc1143bfc42cade8dedf293d33e24a3a"><code>f423ced</code></a> Bump prettier from 1.19.1 to 2.3.2</li>
<li>Additional commits viewable in <a href="https://github.com/js-cookie/js-cookie/compare/v2.2.1...v3.0.0">compare view</a></li>
</ul>
</details>
<br>
<p><a href="https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores"><img src="https://camo.githubusercontent.com/e394864cf25fb02eec159e893e848a4e16f0f127331ff64cf6a92ac4032c5b19/68747470733a2f2f646570656e6461626f742d6261646765732e6769746875626170702e636f6d2f6261646765732f636f6d7061746962696c6974795f73636f72653f646570656e64656e63792d6e616d653d6a732d636f6f6b6965267061636b6167652d6d616e616765723d6e706d5f616e645f7961726e2670726576696f75732d76657273696f6e3d322e322e31266e65772d76657273696f6e3d332e302e30" alt="Dependabot compatibility score" data-canonical-src="https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=js-cookie&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=3.0.0" style="max-width:100%;"></a></p>
<p>Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting <code>@dependabot rebase</code>.</p>
<hr>
<details>
<summary>Dependabot commands and options</summary>
<br>
<p>You can trigger Dependabot actions by commenting on this PR:</p>
<ul>
<li><code>@dependabot rebase</code> will rebase this PR</li>
<li><code>@dependabot recreate</code> will recreate this PR, overwriting any edits that have been made to it</li>
<li><code>@dependabot merge</code> will merge this PR after your CI passes on it</li>
<li><code>@dependabot squash and merge</code> will squash and merge this PR after your CI passes on it</li>
<li><code>@dependabot cancel merge</code> will cancel a previously requested merge and block automerging</li>
<li><code>@dependabot reopen</code> will reopen this PR if it is closed</li>
<li><code>@dependabot close</code> will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually</li>
<li><code>@dependabot ignore this major version</code> will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)</li>
<li><code>@dependabot ignore this minor version</code> will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)</li>
<li><code>@dependabot ignore this dependency</code> will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)</li>
</ul>
</details>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/3271'>https://github.com/openstreetmap/openstreetmap-website/pull/3271</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Bump js-cookie from 2.2.1 to 3.0.0</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3271/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519">package.json</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3271/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de">yarn.lock</a>
(8)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3271.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3271.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3271.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3271.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3271">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMUGYF3J3DG5JXAVJTTZXSKVANCNFSM5BBBHZDA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLKIYUYYRLLDSXDGVCDTZXSKVA5CNFSM5BBBHZDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OGS77EA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3271",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3271",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>