From 93111252c2c71513db859f09468fada2014eb2cd Mon Sep 17 00:00:00 2001 From: Ray Knight Date: Mon, 31 Aug 2026 13:19:45 -0700 Subject: [PATCH] fix(workspace-plugin): generate-api emits export-subpath rollups on Windows getExportSubpathConfigs checks the resolved primary entry against the posix suffix '/index.d.ts', but path.resolve emits backslash-separated paths on Windows, so the guard fired for every project and every export-subpath API rollup was silently skipped on Windows machines (Linux CI unaffected). Normalize to posix separators before the check, with a comment recording why. Extracted from windmod branch commit d826380ae5 (utils.ts hunk only). Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Aj9uA3rCVgosnh2zNn8qkc --- .../workspace-plugin/src/executors/generate-api/lib/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts b/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts index ae526525a0645..6a678174a27d7 100644 --- a/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts +++ b/tools/workspace-plugin/src/executors/generate-api/lib/utils.ts @@ -146,10 +146,13 @@ export function getExportSubpathConfigs(options: NormalizedOptions): IConfigFile // they act as literal path segments that the subsequent "../" chain traverses through. // path.resolve(configDir, "/../../../../../../...") naturally normalizes to the correct path. const configDir = dirname(opts.config); + // Normalized to posix separators: path.resolve emits backslashes on Windows, which + // would fail the '/index.d.ts' suffix check below and silently skip every subpath + // rollup on Windows machines (CI on Linux was unaffected). const resolvedPrimaryEntry = resolve( configDir, primaryMainEntryTemplate.replace(//g, unscopedPackageName), - ); + ).replace(/\\/g, '/'); const indexDtsSuffix = '/index.d.ts'; if (!resolvedPrimaryEntry.endsWith(indexDtsSuffix)) {