Skip to content

Commit aa84ede

Browse files
author
Matthias Stein
committed
Update check-licenses script to clarify production license checks and adjust skipped packages
1 parent 6581542 commit aa84ede

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/support/js/check-licenses.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
$ license-checker --summary # outputs list of used licenses
1313
$ license-checker --json # outputs details
1414
15+
16+
NOTE: This script only checks production licenses by default.
17+
Alter this script if you want to check development dependencies as well (see below).
18+
1519
See also https://www.npmjs.com/package/license-checker
1620
*/
1721

1822
import { init as initChecker } from "license-checker";
19-
import { cwd, exit} from "node:process";
23+
import { cwd, exit } from "node:process";
2024

2125
// Licenses known to be OK.
2226
const ACCEPTED_LICENSES = [
@@ -36,16 +40,16 @@ const ACCEPTED_LICENSES = [
3640

3741
// Packages with licenses that are not recognized properly by license-checker.
3842
// These must be checked manually.
39-
const SKIP_PACKAGES = [
40-
"event-stream@3.0.20", // MIT License not recognized
41-
"taffydb@2.6.2" // BSD-1-Clause License in source code
43+
const SKIP_PACKAGES: string[] = [
44+
"arcgis-js-api@4.31.6"
4245
];
4346

4447
initChecker(
4548
{
4649
start: cwd(),
4750
onlyAllow: ACCEPTED_LICENSES.join(";"),
48-
excludePackages: SKIP_PACKAGES.join(";")
51+
excludePackages: SKIP_PACKAGES.join(";"),
52+
production: true
4953
},
5054
(error, packages) => {
5155
void packages; // currently unused

0 commit comments

Comments
 (0)