Skip to content

Commit

Permalink
feat: expand default green licenses (#24)
Browse files Browse the repository at this point in the history
* feat: expand default green licenses

Add most of 'reciprocal' and 'notice' level licenses.

* remove problematic license IDs

TCP-wrappers, Unicode-DFS-2015, and Unicode-DFS-2016.

They make `spdx-satisfies` crash for an unclear reason. I filed an issue
against spdx-satisfies:
jslicense/spdx-satisfies.js#1

* add disclaimer
  • Loading branch information
jinwoo authored Jan 17, 2018
1 parent e611191 commit 5a83c47
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ This is a tool for checking the license of JavaScript projects. It scans the
`package.json` file to check its license and recursively checks all of its
dependencies.

**DISCLAIMER: This tool is NOT a replacement for legal advice or due
diligence for your project's license validity. We recommend you consult a
lawyer if you want legal advice.**

## Installation

```shell
Expand Down Expand Up @@ -108,17 +112,15 @@ use that custom list instead of its default list.
The default green license list is:
```javascript
const DEFAULT_GREEN_LICENSES = [
'Apache-2.0',
'BSD-2-Clause',
'BSD-3-Clause',
'CC-BY-3.0',
'CC0-1.0',
'ISC',
'LGPL-2.0',
'LGPL-2.1',
'LGPL-3.0',
'MIT',
'Unlicense',
'AFL-2.1', 'AFL-3.0', 'APSL-2.0', 'Apache-1.1', 'Apache-2.0',
'Artistic-1.0', 'Artistic-2.0', 'BSD-2-Clause', 'BSD-3-Clause', 'BSL-1.0',
'CC-BY-1.0', 'CC-BY-2.0', 'CC-BY-2.5', 'CC-BY-3.0', 'CC-BY-4.0',
'CC0-1.0', 'CDDL-1.0', 'CDDL-1.1', 'CPL-1.0', 'EPL-1.0',
'FTL', 'IPL-1.0', 'ISC', 'LGPL-2.0', 'LGPL-2.1',
'LGPL-3.0', 'LPL-1.02', 'MIT', 'MPL-1.0', 'MPL-1.1',
'MPL-2.0', 'MS-PL', 'NCSA', 'OpenSSL', 'PHP-3.0',
'Ruby', 'Unlicense', 'W3C', 'Xnet', 'ZPL-2.0',
'Zend-2.0', 'Zlib', 'libtiff',
];
```

Expand Down
20 changes: 9 additions & 11 deletions ts/src/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,15 @@ const fsReadFile = pify(fs.readFile);
// Valid license IDs defined in https://spdx.org/licenses/ must be used whenever
// possible. When adding new licenses, please consult the relevant documents.
const DEFAULT_GREEN_LICENSES = [
'Apache-2.0',
'BSD-2-Clause',
'BSD-3-Clause',
'CC-BY-3.0',
'CC0-1.0',
'ISC',
'LGPL-2.0',
'LGPL-2.1',
'LGPL-3.0',
'MIT',
'Unlicense',
'AFL-2.1', 'AFL-3.0', 'APSL-2.0', 'Apache-1.1', 'Apache-2.0',
'Artistic-1.0', 'Artistic-2.0', 'BSD-2-Clause', 'BSD-3-Clause', 'BSL-1.0',
'CC-BY-1.0', 'CC-BY-2.0', 'CC-BY-2.5', 'CC-BY-3.0', 'CC-BY-4.0',
'CC0-1.0', 'CDDL-1.0', 'CDDL-1.1', 'CPL-1.0', 'EPL-1.0',
'FTL', 'IPL-1.0', 'ISC', 'LGPL-2.0', 'LGPL-2.1',
'LGPL-3.0', 'LPL-1.02', 'MIT', 'MPL-1.0', 'MPL-1.1',
'MPL-2.0', 'MS-PL', 'NCSA', 'OpenSSL', 'PHP-3.0',
'Ruby', 'Unlicense', 'W3C', 'Xnet', 'ZPL-2.0',
'Zend-2.0', 'Zlib', 'libtiff',
];

// options for constructing LicenseChecker
Expand Down

0 comments on commit 5a83c47

Please sign in to comment.