From 9e1b425e6ab343c1643db98deab990208a2b71ca Mon Sep 17 00:00:00 2001 From: session <252201310+session567@users.noreply.github.com> Date: Fri, 23 Jan 2026 20:17:53 +0100 Subject: [PATCH] Update the list of licenses --- src/amo.ts | 24 +++++++++++++++--------- src/index.ts | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/amo.ts b/src/amo.ts index bab56f2..569636b 100644 --- a/src/amo.ts +++ b/src/amo.ts @@ -6,21 +6,27 @@ type Compatibility = Record | Array; type License = | "all-rights-reserved" | "MPL-2.0" - | "GPL-2.0-or-later" - | "GPL-3.0-or-later" - | "LGPL-2.1-or-later" - | "LGPL-3.0-or-later" + | "Apache-2.0" + | "GPL-2.0-only" + | "GPL-3.0-only" + | "LGPL-2.1-only" + | "LGPL-3.0-only" + | "AGPL-3.0-only" | "MIT" - | "BSD-2-Clause"; + | "BSD-2-Clause" + | "Unlicense"; export const LICENSE_NAMES = [ "all-rights-reserved", "MPL-2.0", - "GPL-2.0-or-later", - "GPL-3.0-or-later", - "LGPL-2.1-or-later", - "LGPL-3.0-or-later", + "Apache-2.0", + "GPL-2.0-only", + "GPL-3.0-only", + "LGPL-2.1-only", + "LGPL-3.0-only", + "AGPL-3.0-only", "MIT", "BSD-2-Clause", + "Unlicense", ]; export const isLicense = (license: string): license is License => { return LICENSE_NAMES.includes(license); diff --git a/src/index.ts b/src/index.ts index 9b53d19..0228820 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,7 +28,7 @@ async function run(): Promise { } if (typeof license !== "undefined" && !isLicense(license)) { throw new Error( - `Invalid license "${license}". Must be one of: ${Object.keys( + `Invalid license "${license}". Must be one of: ${Object.values( LICENSE_NAMES, ).join(", ")}`, );