diff --git a/build.ts b/build.ts index 5ebc1e95f..cb28fd106 100644 --- a/build.ts +++ b/build.ts @@ -136,3 +136,16 @@ chmodSync(cliBun, 0o755) chmodSync(cliNode, 0o755) console.log(`Generated ${cliBun} (shebang: bun) and ${cliNode} (shebang: node)`) + +// Step 6: Clean up source maps — they add ~64MB to the package, exceeding +// npmmirror's 80MB size limit. Source maps are only useful for local +// debugging, not for package consumers. +const { unlinkSync } = await import('fs') +let mapCount = 0 +for (const file of files) { + if (file.endsWith('.map')) { + unlinkSync(join(outdir, file)) + mapCount++ + } +} +console.log(`Cleaned ${mapCount} source map files from ${outdir}/ (saved ~64MB)`) diff --git a/package.json b/package.json index b9491cfc2..e5d1ec370 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@costrict/csc", - "version": "4.0.15", + "version": "4.0.16", "description": "costrict", "type": "module", "author": "costrict", diff --git a/scripts/defines.ts b/scripts/defines.ts index 3f731fbd6..c8bc60c9f 100644 --- a/scripts/defines.ts +++ b/scripts/defines.ts @@ -14,7 +14,7 @@ export function getMacroDefines(): Record { // ignore git errors } return { - "MACRO.VERSION": JSON.stringify("4.0.15"), + "MACRO.VERSION": JSON.stringify("4.0.16"), "MACRO.BUILD_TIME": JSON.stringify(new Date().toISOString()), "MACRO.COMMIT": JSON.stringify(commit), "MACRO.FEEDBACK_CHANNEL": JSON.stringify(""),