diff -u b/core/core.libraries.yml b/core/core.libraries.yml --- b/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -391,7 +391,8 @@ jquery.joyride: remote: https://github.com/zurb/joyride - version: "v2.1.1-pre c2b38668fcaf7e549687587de9a549cbb190237b" + version: "2.1" + commit: "c2b38668fcaf7e549687587de9a549cbb190237b" license: name: MIT url: https://github.com/zurb/joyride/blob/v2.1.0/README.markdown diff -u b/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php b/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php --- b/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php +++ b/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php @@ -3,6 +3,7 @@ namespace Drupal\Core\Asset; use Drupal\Component\Serialization\Json; +use Drupal\Component\Utility\UrlHelper; use Drupal\Core\State\StateInterface; /** @@ -72,7 +73,17 @@ break; case 'file': - $query_string = $js_asset['version'] == -1 ? $default_query_string : 'v=' . rawurlencode($js_asset['version']); + if ($js_asset['version'] == -1) { + $query_string = $default_query_string; + } + else { + $query = []; + $query['v'] = $js_asset['version']; + if (isset($js_asset['commit'])) { + $query['c'] = $js_asset['commit']; + } + $query_string = UrlHelper::buildQuery($query); + } $query_string_separator = (strpos($js_asset['data'], '?') !== FALSE) ? '&' : '?'; $element['#attributes']['src'] = file_url_transform_relative(file_create_url($js_asset['data'])); // Only add the cache-busting query string if this isn't an aggregate only in patch2: unchanged: --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -209,6 +209,10 @@ public function buildByExtension($extension) { $options['version'] = $library['version']; } + if (isset($library['commit'])) { + $options['commit'] = $library['commit']; + } + // Set the 'minified' flag on JS file assets, default to FALSE. if ($type == 'js' && $options['type'] == 'file') { $options['minified'] = isset($options['minified']) ? $options['minified'] : FALSE;