Skip to content

Commit

Permalink
[license checker] Neutral naming (#93783)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jbudz authored Mar 5, 2021
1 parent 23ce8dc commit 9019946
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion src/dev/license_checker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
6 changes: 3 additions & 3 deletions src/dev/license_checker/run_check_licenses_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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');

Expand All @@ -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');
}
Expand Down

0 comments on commit 9019946

Please sign in to comment.