Skip to content

Commit ca78cf9

Browse files
committed
No missing licenses.
1 parent 041e778 commit ca78cf9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

website/scripts/generate-deps.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ for (const [license, packages] of Object.entries(raw)) {
2929
const themeExtensions = JSON.parse(readFileSync(themeExtensionsPath, "utf-8"));
3030
deps.push(...themeExtensions);
3131

32+
// Manual overrides for extensions that don't declare a license in their metadata
33+
const missingLicense = {
34+
"Solarized & Selenized": "MIT",
35+
};
36+
for (const dep of deps) {
37+
if (!dep.license) {
38+
const override = missingLicense[dep.name];
39+
if (!override) {
40+
console.error(`ERROR: "${dep.name}" has no license. Add it to missingLicense in generate-deps.js`);
41+
process.exit(1);
42+
}
43+
dep.license = override;
44+
}
45+
}
46+
3247
deps.sort((a, b) => a.name.localeCompare(b.name));
3348

3449
writeFileSync(outPath, JSON.stringify(deps, null, 2) + "\n");

website/src/data/dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
{
164164
"name": "Solarized & Selenized",
165165
"version": "0.3.18",
166-
"license": null,
166+
"license": "MIT",
167167
"author": "santoso-wijaya",
168168
"homepage": "https://github.com/santoso-wijaya/vscode-helios-selene"
169169
},

0 commit comments

Comments
 (0)