license-checker
Advanced tools
Comparing version 17.0.0 to 18.0.0
## Change Log | ||
### v16.0.0 (2018/01/18 15:02 +00:00) | ||
### v18.0.0 (2018/03/20 12:28 +00:00) | ||
- [#147](https://github.com/davglass/license-checker/pull/147) Merge pull request #147 from honzajavorek/honzajavorek/license-files (@honzajavorek) | ||
- [#148](https://github.com/davglass/license-checker/pull/148) Merge pull request #148 from honzajavorek/honzajavorek/use-stderr (@honzajavorek) | ||
- [#146](https://github.com/davglass/license-checker/pull/146) Merge pull request #146 from honzajavorek/honzajavorek/fix-e2e-test (@honzajavorek) | ||
- [#145](https://github.com/davglass/license-checker/pull/145) Merge pull request #145 from honzajavorek/honzajavorek/drop-4-add-8 (@honzajavorek) | ||
- [0105f7d](https://github.com/davglass/license-checker/commit/0105f7dcf01a67b8f7c34371d95a1d76b191d5ed) use stderr where applicable (@honzajavorek) | ||
- [0ff8d91](https://github.com/davglass/license-checker/commit/0ff8d917c659446256074c0940ae43dd84930233) add support for LICENSE-MIT and similar (@honzajavorek) | ||
- [f02589e](https://github.com/davglass/license-checker/commit/f02589e62c0ba8221081b8b1799d561c3ff20500) isolate and test the license file detection (@honzajavorek) | ||
- [f0da0fe](https://github.com/davglass/license-checker/commit/f0da0fe2ab28f1658e4ed504bb034fb1536b9ff8) add warning about commas and test it (@honzajavorek) | ||
- [3db0b6f](https://github.com/davglass/license-checker/commit/3db0b6f05a68ccfff4181503ca87edce4ef10cd7) fix e2e test (transition from comma delimiter to semicolon) (@honzajavorek) | ||
- [cec3b73](https://github.com/davglass/license-checker/commit/cec3b73505ac40a2dca211e78427624d009585dc) let Travis CI to cache node_modules (@honzajavorek) | ||
- [8cea3dc](https://github.com/davglass/license-checker/commit/8cea3dccf1d185dc3ae3f37f44a82d7e123a1988) add Travis CI badge to the README (@honzajavorek) | ||
- [8f59c3b](https://github.com/davglass/license-checker/commit/8f59c3b494f69b1d51535bcff80c0e006d0ef6bb) drop support for node 4, add support for node 8 (@honzajavorek) | ||
### v17.0.0 (2018/03/19 13:27 +00:00) | ||
- [cd5fdd8](https://github.com/davglass/license-checker/commit/cd5fdd8e94267d7d8f29e86dd9cbf8b694c037f1) 17.0.0 (@davglass) | ||
- [13c11ee](https://github.com/davglass/license-checker/commit/13c11eeea1b1a3e012de62536100fce91c355c8b) updated readme and help text (@davglass) | ||
- [#144](https://github.com/davglass/license-checker/pull/144) Merge pull request #144 from creising/parser-fixes (@creising) | ||
- [d2ab8df](https://github.com/davglass/license-checker/commit/d2ab8df30bc3e6b38b321a1e12a70cf477a69eb0) added support for lic with commas and spaces (@creising) | ||
- [2075208](https://github.com/davglass/license-checker/commit/20752083c6029823fb389a30a1ed4d7d90fa9297) contrib and changelog (@davglass) | ||
- [a46c448](https://github.com/davglass/license-checker/commit/a46c4483f872c3db9498a65b7ae3dc6d8164de0a) 16.0.0 (@davglass) | ||
- [38d63e2](https://github.com/davglass/license-checker/commit/38d63e2c2c3fd6c11012fb69b1470b2ba06d5554) [fixes #128] - Added --onlyAllow option (@davglass) | ||
- [6c5274c](https://github.com/davglass/license-checker/commit/6c5274c6064d318844cf36185dea395e0893ff08) [fixes #132] - Fixed issue with asFiles and path issues (@davglass) | ||
- [38d63e2](https://github.com/davglass/license-checker/commit/38d63e2c2c3fd6c11012fb69b1470b2ba06d5554) [fixes #128] - Added --onlyAllow option (@davglass) | ||
### v16.0.0 (2018/01/18 15:02 +00:00) | ||
- [#131](https://github.com/davglass/license-checker/pull/131) Merge pull request #131 from mischah/patch-1 (@mischah) | ||
@@ -204,4 +225,4 @@ - [e341d17](https://github.com/davglass/license-checker/commit/e341d1701092be87309ec4b51fa6eb23f7e9a589) Fix typo in Readme (@mischah) | ||
- [2adff2d](https://github.com/davglass/license-checker/commit/2adff2da98a5af79479a162e4998eb5892ab31c3) Explicit the asterisk in license report (@Damien-Larmine) | ||
- [b2fc9cf](https://github.com/davglass/license-checker/commit/b2fc9cf2a8eaa008c7593037d046f245a7ce7f25) 5.0.0 (@davglass) | ||
- [7f71c53](https://github.com/davglass/license-checker/commit/7f71c53833cf1318ffe84215fcb1291f9ce4fbd5) updated contributors (@davglass) | ||
- [b2fc9cf](https://github.com/davglass/license-checker/commit/b2fc9cf2a8eaa008c7593037d046f245a7ce7f25) 5.0.0 (@davglass) | ||
@@ -208,0 +229,0 @@ ### v5.0.0 (2016/01/22 15:31 +00:00) |
@@ -15,2 +15,3 @@ /* | ||
var license = require('./license'); | ||
var licenseFiles = require('./license-files'); | ||
var debug = require('debug'); | ||
@@ -119,3 +120,3 @@ var mkdirp = require('mkdirp'); | ||
licenseData = json.license || json.licenses || undefined; | ||
if (json.path && (!json.readme || json.readme.toLowerCase().indexOf('no readme data found') > -1)) { | ||
@@ -160,17 +161,4 @@ readmeFile = path.join(json.path, 'README.md'); | ||
dirFiles = fs.readdirSync(json.path); | ||
files = licenseFiles(dirFiles); | ||
// Find and list license files in the precedence order | ||
['LICENSE', 'LICENCE', 'COPYING', 'README'].forEach(function(licenseFilename) { | ||
var found = false; | ||
dirFiles.forEach(function(filename) { | ||
if (!found) { | ||
var basename = path.basename(filename, path.extname(filename)).toUpperCase(); | ||
if (basename === licenseFilename) { | ||
files.push(filename); | ||
found = true; | ||
} | ||
} | ||
}); | ||
}); | ||
noticeFiles = dirFiles.filter(function(filename) { | ||
@@ -315,3 +303,3 @@ filename = filename.toUpperCase(); | ||
if (toCheckforFailOn.indexOf(data[item].licenses) > -1) { | ||
console.log('Found license defined by the --failOn flag: "' + data[item].licenses + '". Exiting.'); | ||
console.error('Found license defined by the --failOn flag: "' + data[item].licenses + '". Exiting.'); | ||
process.exit(1); | ||
@@ -330,3 +318,3 @@ } | ||
if (!good) { | ||
console.log('Found license NOT defined by the --onlyAllow flag: "' + data[item].licenses + '". Exiting.'); | ||
console.error('Found license NOT defined by the --onlyAllow flag: "' + data[item].licenses + '". Exiting.'); | ||
process.exit(1); | ||
@@ -333,0 +321,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"author": "Dav Glass <davglass@gmail.com>", | ||
"version": "17.0.0", | ||
"version": "18.0.0", | ||
"contributors": [ | ||
@@ -22,2 +22,3 @@ "Adam Weber <adamweber01@gmail.com>", | ||
"Holger Knust <holger.knust@certusview.com>", | ||
"Honza Javorek <mail@honzajavorek.cz>", | ||
"Ivan Latunov <ivan.latunov@chaosgroup.com>", | ||
@@ -47,2 +48,3 @@ "James Bloomer <github2@thebloomers.co.uk>", | ||
"badunk <baduncaduncan@gmail.com>", | ||
"creising <creising@gmail.com>", | ||
"gdw2 <gdwarner@Gmail.com>", | ||
@@ -49,0 +51,0 @@ "tbbstny <tbbstny@users.noreply.github.com>" |
NPM License Checker | ||
=================== | ||
[![Build Status](https://www.travis-ci.org/davglass/license-checker.svg?branch=master)](https://www.travis-ci.org/davglass/license-checker) | ||
*As of v17.0.0 the `failOn` and `onlyAllow` arguments take semicolons as delimeters instead of commas. Some license names contain | ||
@@ -89,3 +91,3 @@ commas and it messed with the parsing* | ||
You can use valid [SPDX identifiers](https://spdx.org/licenses/). | ||
You can use valid [SPDX identifiers](https://spdx.org/licenses/). | ||
You can use valid SPDX expressions like `MIT OR X11`. | ||
@@ -92,0 +94,0 @@ You can use non-valid SPDX identifiers, like `Public Domain`, since `npm` does |
@@ -18,3 +18,3 @@ var assert = require('assert'), | ||
it('should exit 1 if it finds forbidden licenses license due to --failOn MIT;ISC', function(done) { | ||
spawn('node', [path.join(__dirname, '../bin/license-checker'), '--failOn', 'MIT,ISC'], { | ||
spawn('node', [path.join(__dirname, '../bin/license-checker'), '--failOn', 'MIT;ISC'], { | ||
cwd: path.join(__dirname, '../'), | ||
@@ -27,2 +27,18 @@ stdio: 'ignore' | ||
}); | ||
it('should give warning about commas if --failOn MIT,ISC is provided', function(done) { | ||
var proc = spawn('node', [path.join(__dirname, '../bin/license-checker'), '--failOn', 'MIT,ISC'], { | ||
cwd: path.join(__dirname, '../'), | ||
stdio: 'pipe' | ||
}); | ||
var stderr = ''; | ||
proc.stdout.on('data', function() { }); | ||
proc.stderr.on('data', function(data) { | ||
stderr += data.toString(); | ||
}); | ||
proc.on('close', function() { | ||
assert.equal(stderr.indexOf('--failOn argument takes semicolons as delimeters instead of commas') >= 0, true); | ||
done(); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124765
31
1662
180