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

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

scripts/validate-licenses.ts

+1-15
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/[email protected]', // Hey, that's us!
72-
// * Development only
73-
'[email protected]', // CC0 but it's content only (index.json, no code) and not distributed.
74-
7563
// * Broken license fields
7664
'[email protected]', // MIT but broken license in package.json
77-
'[email protected]', // Unlicense but missing license field (PR: https://github.com/streamich/fs-monkey/pull/209)
78-
'[email protected]', // 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)