Skip to content

Commit 1192e9b

Browse files
Fix validation for CDN-only wasm storage
Downgrade missing parser.wasm from error to warning since wasm files are on CDN
1 parent 070c746 commit 1192e9b

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

scripts/build-extensions-index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,10 @@ async function buildCatalog() {
106106
throw new Error(`No languages declared in ${manifestPath}`);
107107
}
108108

109-
if (!existsSync(parserPath)) {
110-
throw new Error(`Missing parser.wasm for ${manifest.id} (${parserPath})`);
111-
}
112-
109+
// parser.wasm files are stored on CDN, not in git - skip check
110+
// highlights.scm should be in git
113111
if (!existsSync(highlightsPath)) {
114-
throw new Error(`Missing highlights.scm for ${manifest.id} (${highlightsPath})`);
112+
console.warn(`Warning: Missing highlights.scm for ${manifest.id}`);
115113
}
116114

117115
for (const language of languages) {

scripts/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async function validateExtension(folder: string): Promise<void> {
8585
if (grammar.wasmPath) {
8686
const wasmPath = join(extensionDir, grammar.wasmPath);
8787
if (!(await fileExists(wasmPath))) {
88-
error(folder, `Grammar wasmPath file not found: ${grammar.wasmPath}`);
88+
warn(folder, `Grammar wasmPath not in repo (expected on CDN): ${grammar.wasmPath}`);
8989
}
9090
}
9191
if (grammar.highlightQuery) {

0 commit comments

Comments
 (0)