-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
**/.package-lock.json | ||
/.nyc-output | ||
/.nyc_output | ||
/node_modules | ||
/package-lock.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
{ | ||
"name": "licensee", | ||
"description": "check dependency licenses against rules", | ||
"version": "9.0.0", | ||
"version": "11.0.0", | ||
"author": "Kyle E. Mitchell <[email protected]> (https://kemitchell.com/)", | ||
"contributors": [ | ||
"Jakob Krigovsky <[email protected]>", | ||
"Brett Zamir <[email protected]>", | ||
"Andrew Monks <[email protected]>" | ||
], | ||
"dependencies": { | ||
"@blueoak/list": "^9.0.0", | ||
"@npmcli/arborist": "^6.1.2", | ||
"@blueoak/list": "^15.0.0", | ||
"@npmcli/arborist": "^6.5.0", | ||
"correct-license-metadata": "^1.4.0", | ||
"docopt": "^0.6.2", | ||
"fs-access": "^2.0.0", | ||
"has": "^1.0.3", | ||
"hasown": "^2.0.0", | ||
"npm-license-corrections": "^1.6.2", | ||
"semver": "^7.3.8", | ||
"spdx-expression-parse": "^3.0.1", | ||
"semver": "^7.6.0", | ||
"spdx-expression-parse": "^4.0.0", | ||
"spdx-expression-validate": "^2.0.0", | ||
"spdx-osi": "^3.0.0", | ||
"spdx-whitelisted": "^1.0.0" | ||
|
@@ -29,24 +28,26 @@ | |
"licensee" | ||
], | ||
"devDependencies": { | ||
"aud": "^2.0.1", | ||
"aud": "^2.0.4", | ||
"ls-engines": "^0.9.3", | ||
"rimraf": "^3.0.2", | ||
"run-parallel": "^1.2.0", | ||
"spawn-sync": "^2.0.0", | ||
"standard": "^14.3.1", | ||
"standard": "^14.3.4", | ||
"tap": "^16.3.0" | ||
}, | ||
"license": "Apache-2.0", | ||
"repository": "jslicense/licensee.js", | ||
"scripts": { | ||
"licenses": "./licensee --errors-only", | ||
"lint": "standard index.js licensee test/**/test.js", | ||
"lint": "standard index.js licensee tests/**/*.js", | ||
"pretest": "npm run lint", | ||
"postlint": "ls-engines --current", | ||
"tests-only": "tap --no-check-coverage tests/unit.test.js tests/**/test.js", | ||
"test": "npm run tests-only", | ||
"posttest": "aud --production" | ||
}, | ||
"engines": { | ||
"node": ">= 14.17" | ||
"node": "^18.12 || ^20.9 || >= 22.7" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "blue-oak-misspelled", | ||
"private": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var tap = require('tap') | ||
|
||
var results = require('../run')(['--blueoak=foobar'], __dirname) | ||
|
||
tap.equal(results.status, 1) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"licenses": { | ||
"osi": true | ||
}, | ||
"packages": {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "osi-fail", | ||
"dependencies": { | ||
"cc0-1.0-licensed": "1.0.0" | ||
}, | ||
"private": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var tap = require('tap') | ||
|
||
var results = require('../run')([], __dirname) | ||
|
||
tap.equal(results.status, 1) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "osi-flag-pass", | ||
"dependencies": { | ||
"cc0-1.0-licensed": "1.0.0" | ||
}, | ||
"private": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var tap = require('tap') | ||
|
||
var results = require('../run')(['--osi'], __dirname) | ||
|
||
tap.equal(results.status, 1) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "osi-flag-pass", | ||
"dependencies": { | ||
"gpl-2.0-licensed": "1.0.0" | ||
}, | ||
"private": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var tap = require('tap') | ||
|
||
var results = require('../run')(['--osi'], __dirname) | ||
|
||
tap.equal(results.status, 0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "blue-oak-fail", | ||
"name": "osi-pass", | ||
"dependencies": { | ||
"gpl-2.0-licensed": "1.0.0" | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"licenses": { | ||
"spdx": [ | ||
"Apache-2.0" | ||
] | ||
}, | ||
"packages": {}, | ||
"ignore": [ | ||
{ | ||
"prefix": "mit-" | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "allowed", | ||
"dependencies": { | ||
"mit-licensed": "1.0.0" | ||
}, | ||
"private": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var tap = require('tap') | ||
|
||
var results = require('../run')([], __dirname) | ||
|
||
tap.equal(results.status, 0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
var tap = require('tap') | ||
|
||
var results = require('../run')([], __dirname) | ||
var results = require('../run')(['--ndjson'], __dirname) | ||
|
||
tap.equal(results.status, 1) | ||
|
||
tap.equal( | ||
results.stdout.trim(), | ||
[ | ||
'[email protected]', | ||
' NOT APPROVED', | ||
' Terms: MIT', | ||
' Repository: jslicense/mit-licensed-depends-on-not-licensed.js', | ||
' Homepage: None listed', | ||
' Author: Kyle E. Mitchell <[email protected]> (https://kemitchell.com/)', | ||
' Contributors: None listed', | ||
'', | ||
'[email protected]', | ||
' NOT APPROVED', | ||
' Terms: Invalid license metadata', | ||
' Repository: jslicense/not-licensed.js', | ||
' Homepage: None listed', | ||
' Author: Kyle E. Mitchell <[email protected]> (https://kemitchell.com/)', | ||
' Contributors: None listed' | ||
].join('\n') | ||
var output = results.stdout.trim().split('\n').map(line => JSON.parse(line)) | ||
|
||
tap.assert( | ||
output.some(result => result.name === 'mit-licensed-depends-on-not-licensed' && result.approved === false) | ||
) | ||
|
||
tap.assert( | ||
output.some(result => result.name === 'not-licensed' && result.approved === false) | ||
) |