Skip to content

Commit fa5e7e0

Browse files
authored
Merge pull request #8 from disulliv/other
Add "OTHER" to license list
2 parents b7c4253 + 91bd6d7 commit fa5e7e0

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const spdxExpressionParse = require('spdx-expression-parse')
55
const spdxSatisfies = require('spdx-satisfies')
66
const spdxLicenseList = require('spdx-license-list')
77
const spdxLicenseSet = require('spdx-license-list/simple')
8+
spdxLicenseSet.add('OTHER') // OTHER is a valid license in Clearly Defined, not found in SPDX
9+
810
const lowerSpdxLicenseMap = new Map(Array.from(spdxLicenseSet).map(x => [x.toLowerCase(), x]))
911
const lowerSpdxNameMap = new Map(Object.keys(spdxLicenseList).map(x => [spdxLicenseList[x].name.toLowerCase(), x]))
1012
const { isEqual, sortBy, union, uniqWith } = require('lodash')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clearlydefined/spdx",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "SPDX custom libraries of clearlydefined.io.",
55
"license": "MIT",
66
"repository": {

test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe('SPDX utility functions', () => {
1212
['mit', { license: 'MIT' }],
1313
['MIT ', { license: 'MIT' }],
1414
[' MIT', { license: 'MIT' }],
15+
['Other', { license: 'OTHER' }],
1516
['MIT OR Apache-2.0', { left: { license: 'MIT' }, conjunction: 'or', right: { license: 'Apache-2.0' } }],
1617
['MIT AND Apache-2.0', { left: { license: 'MIT' }, conjunction: 'and', right: { license: 'Apache-2.0' } }],
1718
[
@@ -201,6 +202,8 @@ describe('SPDX utility functions', () => {
201202
'MIT ': 'MIT',
202203
' MIT': 'MIT',
203204
'GPL-1.0+': 'GPL-1.0+',
205+
'OTHER': 'OTHER',
206+
'other': 'OTHER',
204207
'Apache-2.0 WITH commons-clause': 'NOASSERTION',
205208
'NOASSERTION': 'NOASSERTION',
206209
'See license': 'NOASSERTION',

0 commit comments

Comments
 (0)