Skip to content

Commit 6ae2036

Browse files
snomiaoclaude
authored andcommitted
refactor: switch to license-checker-rseidelsohn for better monorepo support
- Replace @onebeyond/license-checker with license-checker-rseidelsohn@4 - license-checker-rseidelsohn better handles monorepos and non-SPDX licenses - Exclude internal @comfyorg packages from license validation - Allow MIT* for packages like wwobjloader2 - Tested locally: 60 packages validated successfully Licenses approved: - MIT (50), Apache-2.0 (4), ISC (3) - (MPL-2.0 OR Apache-2.0) (1), BSD-2-Clause (1), MIT* (1) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 62fe65a commit 6ae2036

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

.github/workflows/ci-oss-assets-validation.yaml

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,26 @@ jobs:
9393
set -euo pipefail
9494
echo '🔍 Checking production dependency licenses...'
9595
96-
# Use modern @onebeyond/license-checker (actively maintained, SPDX-compliant)
97-
npx @onebeyond/license-checker@6 scan \
98-
--allowOnly \
99-
MIT \
100-
'MIT*' \
101-
Apache-2.0 \
102-
BSD-2-Clause \
103-
BSD-3-Clause \
104-
ISC \
105-
0BSD \
106-
BlueOak-1.0.0 \
107-
Python-2.0 \
108-
CC0-1.0 \
109-
Unlicense \
110-
'(MIT OR Apache-2.0)' \
111-
'(MIT OR GPL-3.0)' \
112-
'(Apache-2.0 OR MIT)' \
113-
'(MPL-2.0 OR Apache-2.0)' \
114-
CC-BY-4.0 \
115-
CC-BY-3.0 \
116-
GPL-3.0-only \
117-
UNLICENSED \
118-
UNKNOWN \
119-
--ignoreRootPackageLicense
120-
121-
echo ''
122-
echo '✅ All production dependency licenses are approved!'
96+
# Use license-checker-rseidelsohn (actively maintained fork, handles monorepos)
97+
# Exclude internal @comfyorg packages from license check
98+
# Run in if condition to capture exit code
99+
if npx license-checker-rseidelsohn@4 \
100+
--production \
101+
--summary \
102+
--excludePackages '@comfyorg/comfyui-frontend;@comfyorg/design-system;@comfyorg/registry-types;@comfyorg/shared-frontend-utils;@comfyorg/tailwind-utils;@comfyorg/comfyui-electron-types' \
103+
--onlyAllow 'MIT;MIT*;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;0BSD;BlueOak-1.0.0;Python-2.0;CC0-1.0;Unlicense;(MIT OR Apache-2.0);(MIT OR GPL-3.0);(Apache-2.0 OR MIT);(MPL-2.0 OR Apache-2.0);CC-BY-4.0;CC-BY-3.0;GPL-3.0-only'; then
104+
echo ''
105+
echo '✅ All production dependency licenses are approved!'
106+
else
107+
echo ''
108+
echo '❌ ERROR: Found dependencies with non-approved licenses!'
109+
echo ''
110+
echo 'To fix this:'
111+
echo '1. Check the license of the problematic package'
112+
echo '2. Find an alternative package with an approved license'
113+
echo '3. If the license is safe and OSI-approved, add it to the --onlyAllow list'
114+
echo ''
115+
echo 'For more info on OSI-approved licenses:'
116+
echo 'https://opensource.org/licenses'
117+
exit 1
118+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ browser_tests/local/
6464
dist.zip
6565

6666
/temp/
67+
/tmp/
6768

6869
# Generated JSON Schemas
6970
/schemas/

0 commit comments

Comments
 (0)