From 24451a39ec1e064dd21d33c215a455327660d112 Mon Sep 17 00:00:00 2001 From: Dmitry Zhukovsky Date: Tue, 11 Aug 2026 21:40:12 +0200 Subject: [PATCH] Add Common/RestClientBase to the package exports map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The exports map introduced with the ESM build restricts subpath resolution to listed entries, which broke the deep import "azure-devops-extension-api/Common/RestClientBase" — the only way to reach RestClientBase, the base class extensions extend to implement custom REST clients. Add an explicit exports entry so the long-standing import path keeps working. Co-Authored-By: Claude Fable 5 --- buildpackage.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/buildpackage.js b/buildpackage.js index 9f40848b..a644b747 100644 --- a/buildpackage.js +++ b/buildpackage.js @@ -184,6 +184,18 @@ const UglifyES = require("uglify-es"); } } + // RestClientBase is the base class extensions must extend to implement + // custom REST clients, but it is not re-exported by any index — the deep + // import "azure-devops-extension-api/Common/RestClientBase" was the only + // way to reach it, and it worked until the exports map (which restricts + // subpath resolution to listed entries) was introduced. Keep that path + // working with an explicit entry. + exports["./Common/RestClientBase"] = { + "import": "./esm/Common/RestClientBase.js", + "require": "./Common/RestClientBase.js", + "types": "./Common/RestClientBase.d.ts" + }; + // "main" and "module" are fallbacks for older bundlers that don't support // the "exports" map (e.g. Webpack 4). Modern bundlers use "exports" exclusively. // Note: top-level "types" is intentionally omitted. Modern TypeScript (4.7+)