1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 13:10:09 +02:00

update dependencies

This commit is contained in:
s2
2018-10-10 15:11:12 +02:00
parent da4083f574
commit 5c55c54b71
90877 changed files with 339776 additions and 33677 deletions

View File

@@ -224,7 +224,9 @@ var lastResorts = [
['GNU', 'GPL-3.0-or-later'],
['LGPL', 'LGPL-3.0-or-later'],
['GPLV1', 'GPL-1.0-only'],
['GPL-1', 'GPL-1.0-only'],
['GPLV2', 'GPL-2.0-only'],
['GPL-2', 'GPL-2.0-only'],
['GPL', 'GPL-3.0-or-later'],
['MIT +NO-FALSE-ATTRIBS', 'MITNFA'],
['MIT', 'MIT'],
@@ -283,10 +285,14 @@ module.exports = function (identifier) {
if (!validArugment) {
throw Error('Invalid argument. Expected non-empty string.')
}
identifier = identifier.replace(/\+$/, '').trim()
identifier = identifier.trim()
if (valid(identifier)) {
return upgradeGPLs(identifier)
}
var noPlus = identifier.replace(/\+$/, '').trim()
if (valid(noPlus)) {
return upgradeGPLs(noPlus)
}
var transformed = validTransformation(identifier)
if (transformed !== null) {
return upgradeGPLs(transformed)
@@ -318,6 +324,12 @@ function upgradeGPLs (value) {
'LGPL-2.1'
].indexOf(value) !== -1) {
return value + '-only'
} else if ([
'GPL-1.0+', 'GPL-2.0+', 'GPL-3.0+',
'LGPL-2.0+', 'LGPL-2.1+', 'LGPL-3.0+',
'AGPL-1.0+', 'AGPL-3.0+'
].indexOf(value) !== -1) {
return value.replace(/\+$/, '-or-later')
} else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) {
return value + '-or-later'
} else {