Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ and add `.unlighthouse/` to the site's `.gitignore`.

`site-ci.yml` runs `bun run check:licenses` when the lockfile or `scripts/`
change. Sites implement that script with the shared check, which runs
`license-checker` in the site's repo root and fails on GPL, AGPL, SSPL and
similar copyleft licenses (LGPL is allowed).
`license-checker-rseidelsohn` in the site's repo root and fails on GPL, AGPL,
SSPL and similar copyleft licenses (LGPL is allowed). The site needs
`license-checker-rseidelsohn` as a devDependency so the bin resolves from its
own `node_modules`.

With `@taraxvoid/voidflow` as a devDependency, call the bin from the site's
`package.json`:
Expand Down
6 changes: 3 additions & 3 deletions scripts/check-licenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Shared license policy check for the Astro/bun site stack: fail on GPL kudzu.
*
* Runs `license-checker` against the current working directory (the caller's
* Runs `license-checker-rseidelsohn` against the current working directory (the caller's
* repo root) and exits non-zero if any installed package carries a blocked
* license.
*
Expand Down Expand Up @@ -43,13 +43,13 @@ export const FAIL_ON = [

const result = spawnSync(
'bunx',
['license-checker', '--summary', '--failOn', FAIL_ON],
['license-checker-rseidelsohn', '--summary', '--failOn', FAIL_ON],
{ cwd: process.cwd(), stdio: 'inherit' },
)

if (result.error) {
console.error(
`\ncheck:licenses failed - could not run license-checker: ${result.error.message}`,
`\ncheck:licenses failed - could not run license-checker-rseidelsohn: ${result.error.message}`,
)
process.exit(1)
}
Expand Down
Loading