From 9019946f95e5a642827fea195985dfcc533c2dd9 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Fri, 5 Mar 2021 13:26:21 -0600 Subject: [PATCH] [license checker] Neutral naming (#93783) This changes text in our license checker to support our neutral naming efforts in #71398. LICENSE_WHITELIST -> LICENSE_ALLOWED DEV_ONLY_LICENSE_WHITELIST -> DEV_ONLY_LICENSE_ALLOWED --- src/dev/license_checker/config.ts | 4 ++-- src/dev/license_checker/index.ts | 2 +- src/dev/license_checker/run_check_licenses_cli.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index a2448b3159def..ebf56166a8922 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -8,7 +8,7 @@ // The following list applies to packages both // used as dependencies or dev dependencies -export const LICENSE_WHITELIST = [ +export const LICENSE_ALLOWED = [ 'Elastic-License', 'SSPL-1.0 OR Elastic License 2.0', '0BSD', @@ -66,7 +66,7 @@ export const LICENSE_WHITELIST = [ // The following list only applies to licenses that // we wanna allow in packages only used as dev dependencies -export const DEV_ONLY_LICENSE_WHITELIST = ['MPL-2.0']; +export const DEV_ONLY_LICENSE_ALLOWED = ['MPL-2.0']; // Globally overrides a license for a given package@version export const LICENSE_OVERRIDES = { diff --git a/src/dev/license_checker/index.ts b/src/dev/license_checker/index.ts index 960be7ff06db1..194ba89b34819 100644 --- a/src/dev/license_checker/index.ts +++ b/src/dev/license_checker/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { LICENSE_WHITELIST, DEV_ONLY_LICENSE_WHITELIST, LICENSE_OVERRIDES } from './config'; +export { LICENSE_ALLOWED, DEV_ONLY_LICENSE_ALLOWED, LICENSE_OVERRIDES } from './config'; export { assertLicensesValid } from './valid'; diff --git a/src/dev/license_checker/run_check_licenses_cli.ts b/src/dev/license_checker/run_check_licenses_cli.ts index cea61ebe21572..6bc2ae299409d 100644 --- a/src/dev/license_checker/run_check_licenses_cli.ts +++ b/src/dev/license_checker/run_check_licenses_cli.ts @@ -10,7 +10,7 @@ import { REPO_ROOT } from '@kbn/utils'; import { run } from '@kbn/dev-utils'; import { getInstalledPackages } from '../npm'; -import { LICENSE_WHITELIST, DEV_ONLY_LICENSE_WHITELIST, LICENSE_OVERRIDES } from './config'; +import { LICENSE_ALLOWED, DEV_ONLY_LICENSE_ALLOWED, LICENSE_OVERRIDES } from './config'; import { assertLicensesValid } from './valid'; run( @@ -25,7 +25,7 @@ run( // packages are valid assertLicensesValid({ packages: packages.filter((pkg) => !pkg.isDevOnly), - validLicenses: LICENSE_WHITELIST, + validLicenses: LICENSE_ALLOWED, }); log.success('All production dependency licenses are allowed'); @@ -34,7 +34,7 @@ run( if (flags.dev) { assertLicensesValid({ packages: packages.filter((pkg) => pkg.isDevOnly), - validLicenses: LICENSE_WHITELIST.concat(DEV_ONLY_LICENSE_WHITELIST), + validLicenses: LICENSE_ALLOWED.concat(DEV_ONLY_LICENSE_ALLOWED), }); log.success('All development dependency licenses are allowed'); }