Skip to content

Commit b0c6496

Browse files
authored
Add 0BSD license to licenseTypes and [PypiLicense] (#10092)
Part of issue #10058
1 parent 50646f0 commit b0c6496

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

services/licenses.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const licenseTypes = {
8787
},
8888
// public domain licenses do not require 'License and copyright notice' (https://choosealicense.com/appendix/#include-copyright)
8989
'public-domain': {
90-
spdxLicenseIds: ['CC0-1.0', 'Unlicense', 'WTFPL'],
90+
spdxLicenseIds: ['CC0-1.0', 'Unlicense', 'WTFPL', '0BSD'],
9191
aliases: ['CC0'],
9292
color: '7cd958',
9393
priority: '3',

services/licenses.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe('license helpers', function () {
55
test(licenseToColor, () => {
66
forCases([given('MIT'), given('BSD')]).expect('green')
77
forCases([given('MPL-2.0'), given('MPL')]).expect('orange')
8-
forCases([given('Unlicense'), given('CC0')]).expect('7cd958')
8+
forCases([given('Unlicense'), given('CC0'), given('0BSD')]).expect('7cd958')
99
forCases([given('unknown-license'), given(null)]).expect('lightgrey')
1010

1111
given(['CC0-1.0', 'MPL-2.0']).expect('7cd958')

services/pypi/pypi-helpers.js

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function getLicenses(packageData) {
6969
'OSI Approved :: Apache Software License': 'Apache-2.0',
7070
'CC0 1.0 Universal (CC0 1.0) Public Domain Dedication': 'CC0-1.0',
7171
'OSI Approved :: GNU Affero General Public License v3': 'AGPL-3.0',
72+
'OSI Approved :: Zero-Clause BSD (0BSD)': '0BSD',
7273
}
7374
let licenses = parseClassifiers(packageData, /^License :: (.+)$/, true)
7475
.map(classifier =>

services/pypi/pypi-helpers.spec.js

+6
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ describe('PyPI helpers', function () {
167167
],
168168
},
169169
}).expect(['AGPL-3.0'])
170+
given({
171+
info: {
172+
license: '',
173+
classifiers: ['License :: OSI Approved :: Zero-Clause BSD (0BSD)'],
174+
},
175+
}).expect(['0BSD'])
170176
})
171177

172178
test(getPackageFormats, () => {

0 commit comments

Comments
 (0)