codex: normalize schema fixture TS paths (#13593)

This commit is contained in:
Ahmed Ibrahim
2026-03-07 01:18:23 -08:00
parent e64133e403
commit 72cf2819be
2 changed files with 6 additions and 1 deletions

View File

@@ -1994,7 +1994,7 @@ pub(crate) fn generate_index_ts_tree(tree: &mut BTreeMap<PathBuf, String>) {
.collect::<Vec<_>>();
if !v2_entries.is_empty() {
tree.insert(
PathBuf::from("v2/index.ts"),
PathBuf::from("v2").join("index.ts"),
index_ts_entries(&v2_entries, false),
);
}

View File

@@ -277,6 +277,7 @@ fn collect_typescript_fixture_file<T: TS + 'static + ?Sized>(
}
let contents = T::export_to_string().context("export TypeScript fixture content")?;
let output_path = normalize_relative_fixture_path(&output_path);
files.insert(
output_path,
contents.replace("\r\n", "\n").replace('\r', "\n"),
@@ -295,6 +296,10 @@ fn collect_typescript_fixture_file<T: TS + 'static + ?Sized>(
Ok(())
}
fn normalize_relative_fixture_path(path: &Path) -> PathBuf {
path.components().collect()
}
fn visit_typescript_fixture_dependencies(
files: &mut BTreeMap<PathBuf, String>,
seen: &mut HashSet<TypeId>,