Licenses csv overrides (#16136) (#16138)

* Actually override licenses when writing csv

* Cleaner overrides

* Remove all the unnecessary overrides
This commit is contained in:
Kim Joar Bekkelund 2018-01-18 22:42:44 +01:00 committed by GitHub
parent 4da5d6f7fe
commit 9b3524d5a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 18 deletions

View file

@ -34,27 +34,12 @@ module.exports = function () {
'MIT/X11',
'new BSD, and MIT',
'OFL-1.1 AND MIT',
'Public domain',
'Public Domain',
'Unlicense',
'WTFPL OR ISC',
'WTFPL',
],
overrides: {
'assert-plus@0.1.5': ['MIT'],
'buffers@0.1.1': ['MIT/X11'],
'bytes@1.0.0': ['MIT'],
'color-name@1.0.0': ['UNLICENSE'],
'commander@2.2.0': ['MIT'],
'css-color-names@0.0.1': ['MIT'],
'css-parse@1.0.4': ['MIT'],
'css-stringify@1.0.5': ['MIT'],
'css@1.0.8': ['MIT'],
'delegate@3.0.1': ['MIT'],
'flatten@0.0.1': ['MIT'],
'indexof@0.0.1': ['MIT'],
'jsonify@0.0.0': ['Public domain'],
'ripemd160@0.2.0': ['MIT'],
'select@1.0.6': ['MIT'],
'uglify-js@2.2.5': ['BSD'],
}
}

View file

@ -36,13 +36,13 @@ export default function licensesCSVReport(grunt) {
const done = this.async();
try {
const options = grunt.config('licenses', { overrides: {} });
const overrides = grunt.config.get('licenses.options.overrides');
const file = grunt.option('csv');
const release = Boolean(grunt.option('release'));
const packages = await getInstalledPackages({
directory: grunt.config.get('root'),
licenseOverrides: options.overrides,
licenseOverrides: overrides,
dev: !release
});