From cde0a09134b53cf7f9d8aa20645532247ab29654 Mon Sep 17 00:00:00 2001 From: jiangjiwei Date: Thu, 25 Dec 2025 10:30:58 +0800 Subject: [PATCH] fix: use .cjs extension for bin script to fix ES module compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package.json has "type": "module" but bin/hapi.js uses CommonJS require() syntax. Renaming to .cjs forces Node.js to treat it as CommonJS regardless of the package type setting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- cli/bin/{hapi.js => hapi.cjs} | 0 cli/package.json | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename cli/bin/{hapi.js => hapi.cjs} (100%) mode change 100644 => 100755 diff --git a/cli/bin/hapi.js b/cli/bin/hapi.cjs old mode 100644 new mode 100755 similarity index 100% rename from cli/bin/hapi.js rename to cli/bin/hapi.cjs diff --git a/cli/package.json b/cli/package.json index 6538e1c1..1c31f3a9 100644 --- a/cli/package.json +++ b/cli/package.json @@ -13,10 +13,10 @@ "directory": "cli" }, "bin": { - "hapi": "bin/hapi.js" + "hapi": "bin/hapi.cjs" }, "files": [ - "bin/hapi.js" + "bin/hapi.cjs" ], "imports": { "#embedded-assets": {