jslicense / spdx-satisfies.js

test whether SPDX expressions satisfy licensing criteria

Home Page:https://www.npmjs.com/package/spdx-satisfies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GFDL-1x licenses make it fail

nanotower opened this issue · comments

i.e. satisfies('GFDL-1.1-invariants-or-later', 'MIT OR GPL-1.0') crashes. I've checked both arguments against spdx-expression-validate and both are valid.
Both of them came out of spdx-license-ids, which is obtaining the valid SPDX list right from the source.

The issue is in normalizeGPLIdentifiers.

The way SPDX has identified the GFDLs, GFDL-1.1-invariants alone isn't a valid identifier. It has to have -or-later or -only. So merely stripping -or-later or -only off the end doesn't leave a valid license ID.