Skip to content

Commit 5a63eff

Browse files
committed
ci: use Github action-based dependency license checking
Dependency know leverages the Github dependency review action instead of the previous custom solution. The action uses the Github dependency API to analyze dependencies. This not only should provide more accurate results but also lower the maintenance costs for the license checking. The initial allowed licenses list is based on the previous checker list with licenses that are no longer used removed. Action Documentation: https://github.com/actions/dependency-review-action
1 parent 2e9fe6a commit 5a63eff

File tree

6 files changed

+30
-284
lines changed

6 files changed

+30
-284
lines changed

.github/dependency-review-config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
vulnerability_check: false
2+
allow_licenses:
3+
- '0BSD'
4+
- 'Apache-2.0'
5+
- 'BlueOak-1.0.0'
6+
- 'BSD-2-Clause'
7+
- 'BSD-3-Clause'
8+
- 'CC-BY-4.0'
9+
- 'ISC'
10+
- 'MIT'
11+
- 'Python-2.0'
12+
- 'Unlicense'

.github/workflows/pr.yml

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ jobs:
5050
run: yarn ts-circular-deps check
5151
- name: Run Validation
5252
run: yarn -s admin validate
53+
- name: Check Package Licenses
54+
uses: actions/dependency-review-action@0c155c5e8556a497adf53f2c18edabf945ed8e70 # v4.3.2
55+
with:
56+
config-file: './.github/dependency-review-config.yml'
5357
- name: Check tooling setup
5458
run: yarn -s check-tooling-setup
5559
- name: Check commit message

package.json

-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
"@types/jasmine": "~5.1.0",
9696
"@types/karma": "^6.3.0",
9797
"@types/less": "^3.0.3",
98-
"@types/license-checker": "^25.0.6",
9998
"@types/loader-utils": "^2.0.0",
10099
"@types/lodash": "^4.17.0",
101100
"@types/node": "^18.13.0",
@@ -106,7 +105,6 @@
106105
"@types/resolve": "^1.17.1",
107106
"@types/semver": "^7.3.12",
108107
"@types/shelljs": "^0.8.11",
109-
"@types/spdx-satisfies": "^0.1.2",
110108
"@types/tar": "^6.1.2",
111109
"@types/watchpack": "^2.4.4",
112110
"@types/yargs": "^17.0.20",
@@ -157,7 +155,6 @@
157155
"karma-source-map-support": "1.4.0",
158156
"less": "4.2.0",
159157
"less-loader": "12.2.0",
160-
"license-checker": "^25.0.0",
161158
"license-webpack-plugin": "4.0.2",
162159
"lmdb": "3.0.11",
163160
"loader-utils": "3.2.2",
@@ -193,7 +190,6 @@
193190
"source-map": "0.7.4",
194191
"source-map-loader": "5.0.0",
195192
"source-map-support": "0.5.21",
196-
"spdx-satisfies": "^5.0.0",
197193
"symbol-observable": "4.0.0",
198194
"tar": "^6.1.6",
199195
"terser": "5.31.0",

scripts/validate-licenses.mts

-121
This file was deleted.

scripts/validate.mts

-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import { execSync } from 'child_process';
1010
import templates from './templates.mjs';
11-
import validateLicenses from './validate-licenses.mjs';
1211
import validateUserAnalytics from './validate-user-analytics.mjs';
1312

1413
export default async function (options: { verbose: boolean }) {
@@ -34,10 +33,6 @@ export default async function (options: { verbose: boolean }) {
3433
error = true;
3534
}
3635

37-
console.info('');
38-
console.info('Running license validation...');
39-
error = (await validateLicenses({})) != 0 || error;
40-
4136
console.info('');
4237
console.info('Running User Analytics validation...');
4338
error = (await validateUserAnalytics({})) != 0 || error;

0 commit comments

Comments
 (0)