Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the handling of GNU LGPL licenses #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ var transforms = [
.replace(/ (\d)/, '-$1')
.replace(/ ?International/, '') +
'-4.0'
},
// e.g. 'GNU (LESSER GENERAL PUBLIC LICENSE | LGPL)
function (argument) {
return argument.replace(/GNU (lesser general public license|lgpl).*/gi, 'LGPL-3.0-or-later')
mpcen marked this conversation as resolved.
Show resolved Hide resolved
}
]

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "spdx-correct",
"description": "correct invalid SPDX expressions",
"version": "3.1.1",
"version": "3.1.2",
"author": "Kyle E. Mitchell <[email protected]> (https://kemitchell.com)",
"contributors": [
"Kyle E. Mitchell <[email protected]> (https://kemitchell.com)",
"Christian Zommerfelds <[email protected]>",
"Tal Einat <[email protected]>",
"Dan Butvinik <[email protected]>"
"Dan Butvinik <[email protected]>",
"Emmanuel Martinez <[email protected]>"
],
"dependencies": {
"spdx-expression-parse": "^3.0.0",
Expand Down
5 changes: 3 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ var examples = {
'GNU General Public License': 'GPL-3.0-or-later',
'GNU General Public License, version 2': 'GPL-2.0-only',
'GNU General Public': 'GPL-3.0-or-later',
'GNU LESSER GENERAL PUBLIC LICENSE': 'GPL-3.0-or-later',
'GNU LGPL v3.0': 'GPL-3.0-or-later',
' GNU Lesser General Public License v3 or later (LGPLv3+)': 'LGPL-3.0-or-later',
'GNU LESSER GENERAL PUBLIC LICENSE': 'LGPL-3.0-or-later',
'GNU LGPL v3.0': 'LGPL-3.0-or-later',
'GNU License v3': 'GPL-3.0-or-later',
'GNU V3': 'GPL-3.0-or-later',
'GNU v2': 'GPL-2.0-only',
Expand Down