ci: fix the PluginDef sanity check (default import, not p.default)
The check imported the default export as `p` and then read `p.default` — a double-default that is always undefined for a module using `export default plugin`, so the build job failed on every push (publish skipped) and v0.2.x never actually published through CI. Read the default import directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ jobs:
|
||||
run: bunx tsc --noEmit
|
||||
- name: Sanity — plugin default export is a valid PluginDef
|
||||
run: |
|
||||
bun -e 'import p from "./dist/index.js"; const d = p.default; if (d?.name !== "rom-manager" || typeof d?.main !== "function") { console.error("bad default export", d); process.exit(1); } console.log("ok:", d.name)'
|
||||
bun -e 'import plugin from "./dist/index.js"; if (plugin?.name !== "rom-manager" || typeof plugin?.main !== "function") { console.error("bad default export", plugin); process.exit(1); } console.log("ok:", plugin.name)'
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
|
||||
Reference in New Issue
Block a user