mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 05:10:05 +02:00
update dependencies
This commit is contained in:
14
node_modules/spdx-correct/index.js
generated
vendored
14
node_modules/spdx-correct/index.js
generated
vendored
@@ -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 {
|
||||
|
Reference in New Issue
Block a user