From ac6e8495f23c4eb27698f082abf4d262273bdad5 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 24 Sep 2018 10:14:31 -0700 Subject: [PATCH] resources: Make jquery.cookie a multi-file resource with changelog, licence Change-Id: I47e25b1a7ac7d53932dfdfd37a47a38141f91be4 --- maintenance/resources/foreign-resources.yaml | 14 ++++++-- resources/Resources.php | 2 +- resources/lib/jquery.cookie/CHANGELOG.md | 34 +++++++++++++++++++ resources/lib/jquery.cookie/MIT-LICENSE.txt | 20 +++++++++++ .../lib/{ => jquery.cookie}/jquery.cookie.js | 0 5 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 resources/lib/jquery.cookie/CHANGELOG.md create mode 100644 resources/lib/jquery.cookie/MIT-LICENSE.txt rename resources/lib/{ => jquery.cookie}/jquery.cookie.js (100%) diff --git a/maintenance/resources/foreign-resources.yaml b/maintenance/resources/foreign-resources.yaml index ae45ab8da2..631621917d 100644 --- a/maintenance/resources/foreign-resources.yaml +++ b/maintenance/resources/foreign-resources.yaml @@ -68,9 +68,17 @@ jquery: dest: jquery.js jquery.cookie: - type: file - src: https://raw.githubusercontent.com/carhartl/jquery-cookie/v1.3.1/jquery.cookie.js - integrity: sha384-Xxq63E9KDgzUJ6WPNPqVeOtRIwZyx6y9DzEwY2u6LYKSnWrjSoGtWSKmTindYBf2 + type: multi-file + files: + jquery.cookie.js: + src: https://raw.githubusercontent.com/carhartl/jquery-cookie/v1.3.1/jquery.cookie.js + integrity: sha384-Xxq63E9KDgzUJ6WPNPqVeOtRIwZyx6y9DzEwY2u6LYKSnWrjSoGtWSKmTindYBf2 + MIT-LICENSE.txt: + src: https://raw.githubusercontent.com/carhartl/jquery-cookie/v1.3.1/MIT-LICENSE.txt + integrity: sha384-zYsGf3KJ7S0AhOICjcoh0kkn7aGZlzYUXXX5xz8dwR9KjLMM+/JPR2g/jVOGGeId + CHANGELOG.md: + src: https://raw.githubusercontent.com/carhartl/jquery-cookie/v1.3.1/CHANGELOG.md + integrity: sha384-SQOHhLc7PHxHDQpGE/zv9XfXKL0A7OBu8kuyVDnHVp+zSoWyRw4xUJ+LSm5ql4kS mustache: type: multi-file diff --git a/resources/Resources.php b/resources/Resources.php index e57fce9a09..9c832dc408 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -221,7 +221,7 @@ return [ 'dependencies' => 'mediawiki.jqueryMsg', ], 'jquery.cookie' => [ - 'scripts' => 'resources/lib/jquery.cookie.js', + 'scripts' => 'resources/lib/jquery.cookie/jquery.cookie.js', 'targets' => [ 'desktop', 'mobile' ], ], 'jquery.form' => [ diff --git a/resources/lib/jquery.cookie/CHANGELOG.md b/resources/lib/jquery.cookie/CHANGELOG.md new file mode 100644 index 0000000000..f3ac692f24 --- /dev/null +++ b/resources/lib/jquery.cookie/CHANGELOG.md @@ -0,0 +1,34 @@ +1.3.1 +----- +- Fixing issue where it was no longer possible to check for an arbitrary cookie, + while json is set to true, there was a SyntaxError thrown from JSON.parse. + +1.3.0 +----- +- Configuration options: `raw`, `json`. Replaces raw option, becomes config: + + ```javascript + $.cookie.raw = true; // bypass encoding/decoding the cookie value + $.cookie.json = true; // automatically JSON stringify/parse value + ``` + + Thus the default options now cleanly contain cookie attributes only. + +- Removing licensing under GPL Version 2, the plugin is now released under MIT License only +(keeping it simple and following the jQuery library itself here). + +- Bugfix: Properly handle RFC 2068 quoted cookie values. + +- Added component.json for bower. + +- Added jQuery plugin package manifest. + +- `$.cookie()` returns all available cookies. + +1.2.0 +----- +- Adding `$.removeCookie('foo')` for deleting a cookie, using `$.cookie('foo', null)` is now deprecated. + +1.1 +--- +- Adding default options. diff --git a/resources/lib/jquery.cookie/MIT-LICENSE.txt b/resources/lib/jquery.cookie/MIT-LICENSE.txt new file mode 100644 index 0000000000..8ae647bc8c --- /dev/null +++ b/resources/lib/jquery.cookie/MIT-LICENSE.txt @@ -0,0 +1,20 @@ +Copyright 2013 Klaus Hartl + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/resources/lib/jquery.cookie.js b/resources/lib/jquery.cookie/jquery.cookie.js similarity index 100% rename from resources/lib/jquery.cookie.js rename to resources/lib/jquery.cookie/jquery.cookie.js -- 2.20.1