Skip to content

Commit f557133

Browse files
committed
fix typo
1 parent 2284881 commit f557133

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

crates/vite_task_graph/src/query/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl CLITaskQuery {
5858
Ok(s.task_name)
5959
})
6060
.collect::<Result<_, _>>()?;
61-
TaskQueryKind::Resursive { task_names }
61+
TaskQueryKind::Recursive { task_names }
6262
} else {
6363
TaskQueryKind::Normal {
6464
task_specifiers: self.tasks.into_iter().collect(),

crates/vite_task_graph/src/query/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub enum TaskQueryKind {
2626
/// A recursive task query specifying one or multiple task names.
2727
/// It will match all tasks with the given names across all packages with topological ordering.
2828
/// The whole workspace will be searched, so cwd is not relevant.
29-
Resursive { task_names: HashSet<Str> },
29+
Recursive { task_names: HashSet<Str> },
3030
}
3131

3232
/// Represents a valid query for a task and its dependencies, usually issued from a CLI command `vite run ...`.
@@ -60,7 +60,7 @@ impl IndexedTaskGraph {
6060

6161
let include_topologicial_deps = match &query.kind {
6262
TaskQueryKind::Normal { include_topological_deps, .. } => *include_topological_deps,
63-
TaskQueryKind::Resursive { .. } => true, // recursive means topological across all packages
63+
TaskQueryKind::Recursive { .. } => true, // recursive means topological across all packages
6464
};
6565

6666
// Add starting tasks without dependencies
@@ -101,7 +101,7 @@ impl IndexedTaskGraph {
101101
return Err(err);
102102
}
103103
// Add nearest tasks to execution graph
104-
// Topoplogical dependencies of nearest tasks will be added later
104+
// Topological dependencies of nearest tasks will be added later
105105
for nearest_task in nearest_topological_tasks.drain(..) {
106106
execution_graph.add_node(nearest_task);
107107
}
@@ -113,7 +113,7 @@ impl IndexedTaskGraph {
113113
}
114114
}
115115
}
116-
TaskQueryKind::Resursive { task_names } => {
116+
TaskQueryKind::Recursive { task_names } => {
117117
// Add all tasks matching the names across all packages
118118
for task_index in self.task_graph.node_indices() {
119119
let current_task_name = self.task_graph[task_index].task_id.task_name.as_str();

crates/vite_task_graph/tests/snapshots.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,29 @@ fn snapshot_execution_graph(
106106
execution_node_snapshots
107107
}
108108

109-
fn stablize_absolute_path(path: &mut Arc<AbsolutePath>, base_dir: &AbsolutePath) {
109+
fn stabilize_absolute_path(path: &mut Arc<AbsolutePath>, base_dir: &AbsolutePath) {
110110
let relative_path = path.strip_prefix(base_dir).unwrap().unwrap();
111111
let new_base_dir =
112112
AbsolutePath::new(if cfg!(windows) { "C:\\workspace" } else { "/workspace" }).unwrap();
113113
*path = new_base_dir.join(relative_path).into();
114114
}
115115

116-
fn stablize_specifier_lookup_error(
116+
fn stabilize_specifier_lookup_error(
117117
err: &mut SpecifierLookupError<PackageUnknownError>,
118118
base_dir: &AbsolutePath,
119119
) {
120120
match err {
121121
SpecifierLookupError::AmbiguousPackageName { package_paths, .. } => {
122122
for path in package_paths.iter_mut() {
123-
stablize_absolute_path(path, base_dir);
123+
stabilize_absolute_path(path, base_dir);
124124
}
125125
}
126126
SpecifierLookupError::PackageNameNotFound { .. } => {}
127127
SpecifierLookupError::TaskNameNotFound { package_index, .. } => {
128128
*package_index = Default::default()
129129
}
130130
SpecifierLookupError::PackageUnknown { unspecifier_package_error, .. } => {
131-
stablize_absolute_path(&mut unspecifier_package_error.cwd, base_dir);
131+
stabilize_absolute_path(&mut unspecifier_package_error.cwd, base_dir);
132132
}
133133
}
134134
}
@@ -206,7 +206,7 @@ fn run_case(runtime: &Runtime, tmpdir: &AbsolutePath, case_path: &Path) {
206206
let execution_graph = match indexed_task_graph.query_tasks(task_query) {
207207
Ok(ok) => ok,
208208
Err(mut err) => {
209-
stablize_specifier_lookup_error(&mut err, &case_stage_path);
209+
stabilize_specifier_lookup_error(&mut err, &case_stage_path);
210210
insta::assert_debug_snapshot!(snapshot_name, err);
211211
continue;
212212
}

0 commit comments

Comments
 (0)