Just formatting

This commit is contained in:
nobody 2021-04-29 06:29:12 +02:00
parent 25200ef33c
commit 4bb9c058d3
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
4 changed files with 18 additions and 19 deletions

View File

@ -403,10 +403,10 @@ function create_url() {
url="$CLOUDFLARE/$folder/$version/locales/$jfile"
fi
elif [ "$folder" = "bowser" ]; then
if [ "${version::1}" = "2" ]; then
url="$CLOUDFLARE/bowser/$version/bundled.min.js"
else
url="$CLOUDFLARE/bowser/$version/bowser.min.js"
if [ "${version::1}" = "2" ]; then
url="$CLOUDFLARE/bowser/$version/bundled.min.js"
else
url="$CLOUDFLARE/bowser/$version/bowser.min.js"
fi
elif [ "$folder" = "select2" ]; then
if [[ $subfile =~ (select2\.min\.js|select2\.full\.min\.js)$ ]]; then

View File

@ -125,19 +125,18 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
});
resourcePath = channelPath.replace(basePath, '');
// Evaluate first in case of version 'latest' and numerals in resource
versionNumber = resourcePath.match(Resource.VERSION_EXPRESSION);
// Handle weird version expressions
if(!versionNumber){
if (Resource.SINGLE_NUMBER_EXPRESSION.test(channelPath)) {
versionNumber = channelPath.match(/\d/);
resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER);
versionNumber = [`${versionNumber}.0`];
}
}
else {
if (!versionNumber) {
if (Resource.SINGLE_NUMBER_EXPRESSION.test(channelPath)) {
versionNumber = channelPath.match(/\d/);
resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER);
versionNumber = [`${versionNumber}.0`];
}
} else {
resourcePattern = resourcePath.replace(versionNumber, Resource.VERSION_PLACEHOLDER);
}
@ -149,7 +148,7 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
}
return shorthandResource;
}
for (let resourceMold of Object.keys(resourceMappings)) {
if (resourcePattern.startsWith(resourceMold)) {
let targetPath, versionDelivered, versionRequested, bundle;

View File

@ -254,7 +254,7 @@ var resources = {
},
// Bowser.js
'bowserJS': {
'path': 'resources/bowser/{version}/bowser.min.jsm'
'path': 'resources/bowser/{version}/bowser.min.jsm'
},
// Bulma
'bulma': {

View File

@ -206,8 +206,8 @@ targets.setLastVersion = function (type, version) {
} else if (type.startsWith('/bootstrap-3-typeahead/4.')) {
return '4.0.2';
} else if (type.startsWith('/bowser/')) {
if (version != 'latest' && helpers.compareVersion('1.9.4', version)) return '1.9.4';
return '2.11.0'
if (version !== 'latest' && helpers.compareVersion('1.9.4', version)) return '1.9.4';
return '2.11.0';
} else if (type.startsWith('/bulma/0.')) {
return '0.9.2';
} else if (type.startsWith('/Chart.js/2.')) {
@ -613,7 +613,7 @@ const ListOfFiles = {
'ajax-bootstrap-select.min.jsm': 'Ajax Bootstrap Select',
'bootstrap-vue.min.jsm': 'BootstrapVue (JS)',
'bootstrap-vue.min.css': 'BootstrapVue (CSS)',
'bowser.min.jsm': 'Bowser',
'bowser.min.jsm': 'Bowser',
'mirage2.min.jsm': 'mirage2',
'chosen.jquery.min.jsm': 'chosen',
'nouislider.min.jsm': 'noUiSlider (JS)',