Skip to content

Commit 64346a5

Browse files
clydinalan-agius4
authored andcommitted
test: remove unneeded exceptions and aliases from license validator
The `fs-monkey`, `memfs` and `spdx-license-ids` packages all now have valid license fields and allowed licenses. All three have been removed from the exceptions list. Several SPDX license aliases have been removed as they are no longer used by any dependencies within the project. The aliases only existed due to previous non-standard SPDX identifiers present in used packages. Additionally, the license validator automatically handles SPDX combination syntax and combinations do not need to be listed explicitly.
1 parent e38e894 commit 64346a5

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

scripts/validate-licenses.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,21 @@ const allowedLicenses = [
4747
'Unlicense',
4848
'CC0-1.0',
4949
'0BSD',
50-
51-
// Combinations.
52-
'(AFL-2.1 OR BSD-2-Clause)',
5350
];
5451

5552
// Name variations of SPDX licenses that some packages have.
5653
// Licenses not included in SPDX but accepted will be converted to MIT.
5754
const licenseReplacements: { [key: string]: string } = {
58-
// Just a longer string that our script catches. SPDX official name is the shorter one.
59-
'Apache License, Version 2.0': 'Apache-2.0',
60-
'Apache2': 'Apache-2.0',
55+
// Official SPDX identifier has a dash
6156
'Apache 2.0': 'Apache-2.0',
62-
'Apache v2': 'Apache-2.0',
63-
'AFLv2.1': 'AFL-2.1',
6457
// BSD is BSD-2-clause by default.
6558
'BSD': 'BSD-2-Clause',
6659
};
6760

6861
// Specific packages to ignore, add a reason in a comment. Format: package-name@version.
6962
const ignoredPackages = [
70-
// Us.
71-
'@angular/devkit-repo@0.0.0', // Hey, that's us!
72-
// * Development only
73-
'spdx-license-ids@3.0.5', // CC0 but it's content only (index.json, no code) and not distributed.
74-
7563
// * Broken license fields
7664
'pako@1.0.11', // MIT but broken license in package.json
77-
'fs-monkey@1.0.1', // Unlicense but missing license field (PR: https://github.com/streamich/fs-monkey/pull/209)
78-
'memfs@3.2.0', // Unlicense but missing license field (PR: https://github.com/streamich/memfs/pull/594)
7965
];
8066

8167
// Ignore own packages (all MIT)

0 commit comments

Comments
 (0)