Skip to content

Commit

Permalink
Merge pull request #14 from nyarla/add-spdx-identifiers
Browse files Browse the repository at this point in the history
chore(licenses): add spdx-licenses-ids type
  • Loading branch information
nyarla committed May 18, 2024
2 parents 34004dc + 1c91f3d commit d17e0c1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"license": "ISC",
"dependencies": {
"@types/bun": "^1.1.0",
"devicons": "^1.8.0",
"react": "^18.2.0",
"satori": "^0.10.13",
"devicons": "^1.8.0"
"spdx-license-ids": "^3.0.17"
}
}
3 changes: 3 additions & 0 deletions src/licenses.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const licenses: Array<string> = require("spdx-license-ids");

export type License = (typeof licenses)[number] | "custom";
10 changes: 10 additions & 0 deletions test/licenses.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { expect, test } from "bun:test";
import type { License } from "../src/licenses";

test("license", () => {
const mit: License = "MIT";
expect(mit).toBe("MIT");

const custom: License = "custom";
expect(custom).toBe("custom");
});

0 comments on commit d17e0c1

Please sign in to comment.