chore(19502): change license checker and generator behaviour to only add dev dependencies with --dev flag. (#19626) (#19866)

This commit is contained in:
Tiago Costa 2018-06-14 14:24:44 +01:00 committed by GitHub
parent c05f5c5fa1
commit ad4fec36c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -54,7 +54,7 @@
"test:ui:runner": "echo 'use `node scripts/functional_test_runner`' && false",
"test:server": "grunt test:server",
"test:coverage": "grunt test:coverage",
"checkLicenses": "grunt licenses",
"checkLicenses": "grunt licenses --dev",
"build": "node scripts/build",
"start": "sh ./bin/kibana --dev",
"precommit": "node scripts/precommit_hook",

View file

@ -10,10 +10,13 @@ export default function licenses(grunt) {
const done = this.async();
try {
const dev = Boolean(grunt.option('dev'));
assertLicensesValid({
packages: await getInstalledPackages({
directory: grunt.config.get('root'),
licenseOverrides: LICENSE_OVERRIDES
licenseOverrides: LICENSE_OVERRIDES,
dev
}),
validLicenses: LICENSE_WHITELIST
});

View file

@ -40,12 +40,12 @@ export default function licensesCSVReport(grunt) {
try {
const file = grunt.option('csv');
const directory = grunt.option('directory');
const release = Boolean(grunt.option('release'));
const dev = Boolean(grunt.option('dev'));
const packages = await getInstalledPackages({
directory: directory ? resolve(directory) : grunt.config.get('root'),
licenseOverrides: LICENSE_OVERRIDES,
dev: !release
dev
});
const csv = packages.map(pkg => {