Commit 86ab37ef authored by jrockowitz's avatar jrockowitz Committed by jrockowitz
Browse files

Issue #2997939 by jrockowitz: Update external libraries

parent 75274f2b
{
"name": "drupal/webform",
"description": "Enables the creation of webforms and questionnaires.",
"type": "drupal-module",
"license": "GPL-2.0+",
"minimum-stability": "dev",
"homepage": "https://drupal.org/project/webform",
"authors": [
{
"name": "Jacob Rockowitz (jrockowitz)",
"homepage": "https://www.drupal.org/u/jrockowitz",
"role": "Maintainer"
}
],
"support": {
"issues": "https://drupal.org/project/issues/webform",
"source": "http://cgit.drupalcode.org/webform"
},
"repositories": {
"algolia.places": {
"_webform": true,
"type": "package",
"package": {
"name": "algolia/places",
"version": "1.10.0",
"type": "drupal-library",
"extra": {
"installer-name": "algolia.places"
},
"dist": {
"url": "https://registry.npmjs.org/places.js/-/places.js-1.10.0.tgz",
"type": "tar"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"ckeditor.autogrow": {
"_webform": true,
"type": "package",
"package": {
"name": "ckeditor/autogrow",
"version": "4.10.0",
"type": "drupal-library",
"extra": {
"installer-name": "ckeditor.autogrow"
},
"dist": {
"url": "https://download.ckeditor.com/autogrow/releases/autogrow_4.10.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"ckeditor.codemirror": {
"_webform": true,
"type": "package",
"package": {
"name": "ckeditor/codemirror",
"version": "v1.17.7",
"type": "drupal-library",
"extra": {
"installer-name": "ckeditor.codemirror"
},
"dist": {
"url": "https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/releases/download/v1.17.7/CKEditor-CodeMirror-Plugin.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"ckeditor.fakeobjects": {
"_webform": true,
"type": "package",
"package": {
"name": "ckeditor/fakeobjects",
"version": "4.10.0",
"type": "drupal-library",
"extra": {
"installer-name": "ckeditor.fakeobjects"
},
"dist": {
"url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.10.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"ckeditor.image": {
"_webform": true,
"type": "package",
"package": {
"name": "ckeditor/image",
"version": "4.10.0",
"type": "drupal-library",
"extra": {
"installer-name": "ckeditor.image"
},
"dist": {
"url": "https://download.ckeditor.com/image/releases/image_4.10.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"ckeditor.link": {
"_webform": true,
"type": "package",
"package": {
"name": "ckeditor/link",
"version": "4.10.0",
"type": "drupal-library",
"extra": {
"installer-name": "ckeditor.link"
},
"dist": {
"url": "https://download.ckeditor.com/link/releases/link_4.10.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"codemirror": {
"_webform": true,
"type": "package",
"package": {
"name": "codemirror/codemirror",
"version": "5.40.0",
"type": "drupal-library",
"extra": {
"installer-name": "codemirror"
},
"dist": {
"url": "https://github.com/components/codemirror/archive/5.40.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.chosen": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/chosen",
"version": "1.8.7",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.chosen"
},
"dist": {
"url": "https://github.com/harvesthq/chosen/releases/download/v1.8.7/chosen_v1.8.7.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.hotkeys": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/hotkeys",
"version": "0.2.0",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.hotkeys"
},
"dist": {
"url": "https://github.com/jeresig/jquery.hotkeys/archive/0.2.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.icheck": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/icheck",
"version": "1.0.2 ",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.icheck"
},
"dist": {
"url": "https://github.com/fronteed/icheck/archive/1.0.2.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.image-picker": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/image-picker",
"version": "0.3.0",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.image-picker"
},
"dist": {
"url": "https://github.com/rvera/image-picker/archive/0.3.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.inputmask": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/inputmask",
"version": "4.0.0",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.inputmask"
},
"dist": {
"url": "https://github.com/RobinHerbots/jquery.inputmask/archive/4.0.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.intl-tel-input": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/intl-tel-input",
"version": "13.0.0",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.intl-tel-input"
},
"dist": {
"url": "https://github.com/jackocnr/intl-tel-input/archive/v13.0.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.rateit": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/rateit",
"version": "1.1.1",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.rateit"
},
"dist": {
"url": "https://github.com/gjunge/rateit.js/archive/1.1.1.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.select2": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/select2",
"version": "4.0.5",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.select2"
},
"dist": {
"url": "https://github.com/select2/select2/archive/4.0.5.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.textcounter": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/textcounter",
"version": "0.8.0",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.textcounter"
},
"dist": {
"url": "https://github.com/ractoon/jQuery-Text-Counter/archive/0.8.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.timepicker": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/timepicker",
"version": "1.11.13",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.timepicker"
},
"dist": {
"url": "https://github.com/jonthornton/jquery-timepicker/archive/1.11.13.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"jquery.toggles": {
"_webform": true,
"type": "package",
"package": {
"name": "jquery/toggles",
"version": "4.0.0",
"type": "drupal-library",
"extra": {
"installer-name": "jquery.toggles"
},
"dist": {
"url": "https://github.com/simontabor/jquery-toggles/archive/v4.0.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"progress-tracker": {
"_webform": true,
"type": "package",
"package": {
"name": "progress-tracker/progress-tracker",
"version": "1.4.0",
"type": "drupal-library",
"extra": {
"installer-name": "progress-tracker"
},
"dist": {
"url": "https://github.com/NigelOToole/progress-tracker/archive/v1.4.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
},
"signature_pad": {
"_webform": true,
"type": "package",
"package": {
"name": "signature_pad/signature_pad",
"version": "2.3.0",
"type": "drupal-library",
"extra": {
"installer-name": "signature_pad"
},
"dist": {
"url": "https://github.com/szimek/signature_pad/archive/v2.3.0.zip",
"type": "zip"
},
"require": {
"composer/installers": "~1.0"
}
}
}
},
"require": {
"algolia/places": "1.10.0",
"ckeditor/autogrow": "4.10.0",
"ckeditor/codemirror": "v1.17.7",
"ckeditor/fakeobjects": "4.10.0",
"ckeditor/image": "4.10.0",
"ckeditor/link": "4.10.0",
"codemirror/codemirror": "5.40.0",
"jquery/chosen": "1.8.7",
"jquery/hotkeys": "0.2.0",
"jquery/icheck": "1.0.2 ",
"jquery/image-picker": "0.3.0",
"jquery/inputmask": "4.0.0",
"jquery/intl-tel-input": "13.0.0",
"jquery/rateit": "1.1.1",
"jquery/select2": "4.0.5",
"jquery/textcounter": "0.8.0",
"jquery/timepicker": "1.11.13",
"jquery/toggles": "4.0.0",
"progress-tracker/progress-tracker": "1.4.0",
"signature_pad/signature_pad": "2.3.0"
}
}
Steps for creating a new release
--------------------------------
1. Cleanup code
2. Export configuration
3. Review code
4. Review accessibility
5. Run tests
6. Generate release notes
7. Tag and create a new release
8. Upload screencast to YouTube
1. Review code
2. Review accessibility
3. Run tests
4. Generate release notes
5. Tag and create a new release
1. Cleanup code
---------------
[Convert to short array syntax](https://www.drupal.org/project/short_array_syntax)
drush short-array-syntax webform
Tidy YAML files
@see DEVELOPMENT-CHEATSHEET.md
2. Export configuration
-----------------------
@see DEVELOPMENT-CHEATSHEET.md
3. Review code
1. Review code
--------------
[Online](http://pareview.sh)
......@@ -51,7 +31,8 @@ Tidy YAML files
# Directories should be 755 or drwxr-xr-x
find . -type f -print0 | xargs -0 chmod 0644
3. Review accessibility
2. Review accessibility
-----------------------
[Pa11y](http://pa11y.org/)
......@@ -68,7 +49,8 @@ Notes
pa11y http://localhost/wf/webform/example_accessibility_containers
pa11y http://localhost/wf/webform/example_accessibility_wizard
5. Run tests
3. Run tests
------------
[SimpleTest](https://www.drupal.org/node/645286)
......@@ -112,7 +94,8 @@ References
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Unit/Access/WebformAccessCheckTest
6. Generate release notes
4. Generate release notes
-------------------------
[Git Release Notes for Drush](https://www.drupal.org/project/grn)
......@@ -120,7 +103,7 @@ References
drush release-notes --nouser 8.x-5.0-VERSION 8.x-5.x
7. Tag and create a new release
5. Tag and create a new release
-------------------------------
[Tag a release](https://www.drupal.org/node/1066342)
......@@ -130,11 +113,3 @@ References
git push origin tag 8.x-5.0-VERSION
[Create new release](https://www.drupal.org/node/add/project-release/2640714)
8. Upload screencast to YouTube
-------------------------------
- Title : Webform 8.x-5.x-betaXX
- Tags: Drupal 8,Webform,Form Builder
- Privacy: listed
Steps for updating libraries
----------------------------
1. Create a ticket in the Webform issue queue
2. Create a list of all recent releases
3. Update WebformLibrariesManager
4. Update webform.libraries.yml
5. Test changes
6. Update webform_libraries.module
7. Update composer.libraries.json
1. Create a ticket in the Webform issue queue
----------------------------------------------
- https://www.drupal.org/node/add/project-issue/webform
2. Create a list of all recent releases
---------------------------------------
- Enable all external libraries (admin/structure/webform/config/libraries)
- Manually check for new releases. Only update to stable releases.
- Add list of updated external libraries to issue on Drupal.org
3. Update WebformLibrariesManager
---------------------------------
- \Drupal\webform\WebformLibrariesManager::initLibraries
4. Update webform.libraries.yml
---------------------------------
- webform.libraries.yml
5. Test changes
---------------
Check external libraries are loaded from CDN.
drush webform:libraries:remove
Check external libraries are download.
drush webform:libraries:download
6. Update webform_libraries.module
----------------------------------
- Zip /libraries
- Copy libraries.zip to webform_libraries.
7. Update composer.libraries.json
----------------------------------
cd web/modules/sandbox/webform
drush webform:libraries:composer > composer.libraries.json
......@@ -102,6 +102,7 @@ class WebformAdminConfigLibrariesForm extends WebformAdminConfigBaseForm {
];
$libraries_header = [
'title' => ['data' => $this->t('Title')],
'version' => ['data' => $this->t('Version')],
'description' => ['data' => $this->t('Description/Notes'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
'elements' => ['data' => $this->t('Required elements'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
'provider' => ['data' => $this->t('Provider'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
......@@ -147,6 +148,7 @@ class WebformAdminConfigLibrariesForm extends WebformAdminConfigBaseForm {
$library_option = [
'title' => $library['title'],
'version' => $library['version'],
'description' => [
'data' => [
'content' => ['#markup' => $library['description'], '#suffix' => '<br />'],
......
......@@ -317,19 +317,19 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'description' => $this->t('Provides syntax highlighting for the CKEditor with the CodeMirror Plugin.'),
'notes' => $this->t('Makes it easier to edit the HTML source.'),
'homepage_url' => Url::fromUri('https://github.com/w8tcha/CKEditor-CodeMirror-Plugin'),
'download_url' => Url::fromUri('https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/releases/download/v1.17.5/CKEditor-CodeMirror-Plugin.zip'),
'download_url' => Url::fromUri('https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/releases/download/v1.17.7/CKEditor-CodeMirror-Plugin.zip'),
'plugin_path' => 'libraries/ckeditor.codemirror/codemirror/',
'plugin_url' => "https://cdn.rawgit.com/w8tcha/CKEditor-CodeMirror-Plugin/v1.17.5/codemirror/",
'version' => 'v1.17.5',
'plugin_url' => "https://cdn.rawgit.com/w8tcha/CKEditor-CodeMirror-Plugin/v1.17.7/codemirror/",
'version' => 'v1.17.7',
];
$libraries['codemirror'] = [
'title' => $this->t('Code Mirror'),
'description' => $this->t('Code Mirror is a versatile text editor implemented in JavaScript for the browser.'),
'notes' => $this->t('Code Mirror is used to provide a text editor for YAML, HTML, CSS, and JavaScript configuration settings and messages.'),
'homepage_url' => Url::fromUri('http://codemirror.net/'),
'download_url' => Url::fromUri('https://github.com/components/codemirror/archive/5.39.2.zip'),
'download_url' => Url::fromUri('https://github.com/components/codemirror/archive/5.40.0.zip'),
'issues_url' => Url::fromUri('https://github.com/codemirror/codemirror/issues'),
'version' => '5.39.2',
'version' => '5.40.0',
];
$libraries['algolia.places'] = [
'title' => $this->t('Algolia Places'),
......@@ -340,8 +340,8 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
// NOTE: Using NPM/JsDelivr because it contains the '/dist/cdn/' directory.
// @see https://asset-packagist.org/package/detail?fullname=npm-asset/places.js
// @see https://www.jsdelivr.com/package/npm/places.js
'download_url' => Url::fromUri('https://registry.npmjs.org/places.js/-/places.js-1.9.0.tgz'),
'version' => '1.9.0',