From 6525526144e40a76e91e17a44164423ab07135ad Mon Sep 17 00:00:00 2001 From: jeansilvany Date: Tue, 25 Aug 2026 16:20:37 -0300 Subject: [PATCH] fix: use import-equals for slash to restore release uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tsconfig.json does not enable esModuleInterop, so `import slash from "slash"` compiles to a bare require() while still reading `.default`: const slash_1 = require("slash"); // no __importDefault helper (0, slash_1.default)(...) // .default is undefined slash@1.0.0 is CommonJS (module.exports = fn) and has no `.default`, so every release crashed while building the upload zip: TypeError: (0 , slash_1.default) is not a function at management-sdk.js:330 Enabling esModuleInterop would fix this import but also change `import * as chalk` and `import * as yargs` into __importStar, replacing those CommonJS module objects with synthesized namespaces — a far wider behavioural change than this bug warrants. The import-equals form is already the convention two lines above in the same file, for q and superagent. Co-Authored-By: Claude Opus 5 (1M context) --- script/management-sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/management-sdk.ts b/script/management-sdk.ts index 37310b8..5f84c97 100644 --- a/script/management-sdk.ts +++ b/script/management-sdk.ts @@ -8,7 +8,7 @@ import Q = require("q"); import superagent = require("superagent"); import * as recursiveFs from "recursive-fs"; import * as yazl from "yazl"; -import slash from "slash"; +import slash = require("slash"); import Promise = Q.Promise;