Skip to content

Commit

Permalink
Cleaning up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Sep 19, 2024
1 parent 60e4073 commit ae983e0
Show file tree
Hide file tree
Showing 54 changed files with 43 additions and 1,344 deletions.
4 changes: 3 additions & 1 deletion crates/turbo-trace/src/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ impl Tracer {
source_map: Arc::new(SourceMap::default()),
})
}

pub fn trace(mut self) -> TraceResult {
let mut options = ResolveOptions::default()
.with_builtin_modules(true)
.with_force_extension(EnforceExtension::Disabled)
.with_extension(".ts");
.with_extension(".ts")
.with_extension(".tsx");
if let Some(ts_config) = self.ts_config.take() {
options.tsconfig = Some(TsconfigOptions {
config_file: ts_config.into(),
Expand Down
3 changes: 3 additions & 0 deletions crates/turborepo-lib/src/query/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ impl File {
self.run.repo_root().to_owned(),
None,
)?;

let result = tracer.trace();
if !result.errors.is_empty() {
return Err(Error::Trace(result.errors));
Expand All @@ -51,6 +52,8 @@ impl File {
Ok(result
.files
.into_iter()
// Filter out the file we're looking at
.filter(|file| file != &self.path)
.map(|path| File::new(self.run.clone(), path))
.sorted_by(|a, b| a.path.cmp(&b.path))
.collect())
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ae983e0

Please sign in to comment.