Use license-checker directly instead of grunt-license-report#340
Use license-checker directly instead of grunt-license-report#340nkurihar merged 1 commit intoapache:masterfrom
Conversation
|
|
|
I wrote an executable for doing similar things and it's used in some of Pulsar projects like pulsar-site and pulsar-client-go. This task should be trivial to implement stably and correctly. (Once it's checked in, there should be no bug to "fix".) I'd propose to switch to my tool if we anyway want to make changes and I'm glad to prepare a patch. |
|
@tisonkun Is this a tool for checking/adding license headers? The command I modified in this PR does not do that, but lists the licenses of the 3rd party modules that this module depends on. $ npm run license:report
> pulsar-client@1.10.0-rc.0 license:report
> mkdir -p report && license-checker --json > report/licenses.json
$ head -n 30 report/licenses.json
{
"@aashutoshrathi/word-wrap@1.2.6": {
"licenses": "MIT",
"repository": "https://github.com/aashutoshrathi/word-wrap",
"publisher": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert",
"path": "/home/massakam/github/pulsar-client-node/node_modules/@aashutoshrathi/word-wrap",
"licenseFile": "/home/massakam/github/pulsar-client-node/node_modules/@aashutoshrathi/word-wrap/LICENSE"
},
"@ampproject/remapping@2.2.1": {
"licenses": "Apache-2.0",
"repository": "https://github.com/ampproject/remapping",
"publisher": "Justin Ridgewell",
"email": "jridgewell@google.com",
"path": "/home/massakam/github/pulsar-client-node/node_modules/@ampproject/remapping",
"licenseFile": "/home/massakam/github/pulsar-client-node/node_modules/@ampproject/remapping/LICENSE"
},
"@assemblyscript/loader@0.10.1": {
"licenses": "Apache-2.0",
"repository": "https://github.com/AssemblyScript/assemblyscript",
"publisher": "Daniel Wirtz",
"email": "dcode+assemblyscript@dcode.io",
"path": "/home/massakam/github/pulsar-client-node/node_modules/@assemblyscript/loader",
"licenseFile": "/home/massakam/github/pulsar-client-node/node_modules/@assemblyscript/loader/README.md"
},
"@babel/code-frame@7.12.11": {
"licenses": "MIT",
"repository": "https://github.com/babel/babel",
"publisher": "Sebastian McKenzie",
"email": "sebmck@gmail.com", |
|
@massakam Thanks for your explanation! Then my tool doesn't implement that. |
77d8ae7 to
5d5320a
Compare
|
#340 (comment) seems to have been fixed by #341. |
Motivation
Executing
npm run license:reportin this repository will report the licenses of dependent modules toreport/licenses.html. However, the grunt-license-report module used by this command has not been maintained for nearly a decade, and the GitHub repository is a dead link. As a result, some modules with security vulnerabilities are installed bygrunt-license-reportdependencies.Modifications
Removed
grunt-license-reportfrom dev dependencies and added license-checker instead.license-checkerhas already been installed sincegrunt-license-reportdepends on it, but its version is 2.0.1 which is very old. Installinglicense-checkerdirectly bumps its version to 25.0.1.By the way,
license-checkeralso hasn't been released in about 5 years, but it seems to be much more widely used thangrunt-license-report.Verifying this change
Documentation
doc-not-needed