Skip to content
This repository was archived by the owner on Jun 30, 2026. It is now read-only.

Commit ee8e6cb

Browse files
maorlegerCopilot
andcommitted
fix: generate config/ tsconfig files in the update path alongside warp.config.yml
The update path (existing package with package.json) was generating warp.config.yml with ./config/tsconfig.src.*.json references but not generating the config/ directory or tsconfig.json with the matching references. This caused warp build failures for all TypeSpec-based SDK validation runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent cae57c5 commit ee8e6cb

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

packages/rlc-common/test/integration/warpConfig.spec.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
import { describe, it, expect } from "vitest";
55

66
import { buildWarpConfig } from "../../src/metadata/buildWarpConfig.js";
7+
import {
8+
buildTsSrcEsmConfig,
9+
buildTsSrcBrowserConfig,
10+
buildTsSrcReactNativeConfig,
11+
buildTsSrcCjsConfig
12+
} from "../../src/metadata/buildTsConfig.js";
713
import { createMockModel } from "./mockHelper.js";
814

915
describe("warp.config.yml generation", () => {
@@ -94,4 +100,28 @@ describe("warp.config.yml generation", () => {
94100
expect(result!.content).toContain("name: commonjs");
95101
});
96102
});
103+
104+
describe("tsconfig path consistency", () => {
105+
it("warp config references every config/ tsconfig that the builders produce", () => {
106+
const model = createMockModel({
107+
moduleKind: "esm",
108+
isMonorepo: true,
109+
flavor: "azure"
110+
});
111+
112+
const warpContent = buildWarpConfig(model)!.content;
113+
114+
const configBuilders = [
115+
buildTsSrcEsmConfig,
116+
buildTsSrcBrowserConfig,
117+
buildTsSrcReactNativeConfig,
118+
buildTsSrcCjsConfig
119+
];
120+
121+
for (const builder of configBuilders) {
122+
const tsconfigPath = `./${builder().path}`;
123+
expect(warpContent).toContain(tsconfigPath);
124+
}
125+
});
126+
});
97127
});

packages/typespec-ts/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,11 +638,16 @@ export async function $onEmit(context: EmitContext) {
638638
);
639639
}
640640

641-
// Update warp.config.yml for Azure monorepo packages
641+
// Update warp.config.yml and config/ tsconfig files for Azure monorepo packages
642642
if (option.azureSdkForJs) {
643643
updateBuilders.push((model: RLCModel) =>
644644
buildWarpConfig(model, modularPackageInfo)
645645
);
646+
updateBuilders.push(buildTsConfig);
647+
updateBuilders.push(buildTsSrcEsmConfig);
648+
updateBuilders.push(buildTsSrcBrowserConfig);
649+
updateBuilders.push(buildTsSrcReactNativeConfig);
650+
updateBuilders.push(buildTsSrcCjsConfig);
646651
}
647652

648653
// If the client name changed, regenerate the README and snippets completely;

0 commit comments

Comments
 (0)