Skip to content

Commit

Permalink
docs: Fix typos (#9184)
Browse files Browse the repository at this point in the history
### Description

Fix typos using https://crates.io/crates/typos-cli

I can add the `.typos.toml` if that is desirable.

While the changes extend beyond docs, the only visible impact of this
change will be the fixes in the docs.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->

Co-authored-by: Anthony Shew <[email protected]>
  • Loading branch information
jayvdb and anthonyshew authored Sep 28, 2024
1 parent 30d4e9e commit ad4cf20
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion crates/turborepo-auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Token {
/// * `valid_message_fn` - An optional callback that gets called if the
/// token is valid. It will be passed the user's email.
// TODO(voz): This should do a `get_user` or `get_teams` instead of the caller
// doing it. The reason we don't do it here is becuase the caller
// doing it. The reason we don't do it here is because the caller
// needs to do printing and requires the user struct, which we don't want to
// return here.
pub async fn is_valid<T: Client + TokenClient + CacheClient>(
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-filewatch/src/fsevent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ impl FsEventWatcher {
// We need to associate the stream context with our callback in order to
// propagate events to the rest of the system. This will be owned by the
// stream, and will be freed when the stream is closed. This means we
// will leak the context if we panic before reacing
// will leak the context if we panic before reaching
// `FSEventStreamRelease`.
let stream_context_info = Box::into_raw(Box::new(StreamContextInfo {
event_handler: self.event_handler.clone(),
Expand Down
6 changes: 3 additions & 3 deletions crates/turborepo-globwalk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ fn visit_file(
Err(e) => {
let io_err = std::io::Error::from(e);
match io_err.kind() {
// Ignore DNE and permission errors
// Ignore missing file and permission errors
std::io::ErrorKind::NotFound | std::io::ErrorKind::PermissionDenied => None,
_ => Some(Err(io_err.into())),
}
Expand Down Expand Up @@ -463,10 +463,10 @@ mod test {
#[test_case("/a/b/.", "/a/b", 2 ; "test path with leading / and ending with dot segment")]
#[test_case("/a/.././b", "/b", 0 ; "test path with leading / and mixed and consecutive dot and dotdot segments")]
#[test_case("/a/b/c/../../d/e/f/g/h/i/../j", "/a/d/e/f/g/h/j", 1 ; "leading collapse followed by shorter one")]
fn test_collapse_path(glob: &str, expected: &str, earliest_collapsed_segement: usize) {
fn test_collapse_path(glob: &str, expected: &str, earliest_collapsed_segment: usize) {
let (glob, segment) = collapse_path(glob).unwrap();
assert_eq!(glob, expected);
assert_eq!(segment, earliest_collapsed_segement);
assert_eq!(segment, earliest_collapsed_segment);
}

#[test_case("../a/b" ; "test path starting with ../ segment should return None")]
Expand Down
22 changes: 11 additions & 11 deletions crates/turborepo-globwatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl GlobWatcher {
Either::Left(mut e) => {
// if we receive an event for a file in the flush dir, we need to
// remove it from the events list, and send a signal to the flush
// requestor. flushes should not be considered as events.
// requester. flushes should not be considered as events.
for flush_id in e
.paths
.extract_if(|p| p.starts_with(flush_dir.as_path()))
Expand All @@ -228,7 +228,7 @@ impl GlobWatcher {
.expect("only fails if holder panics")
.remove(&flush_id)
{
// if this fails, it just means the requestor has gone away
// if this fails, it just means the requester has gone away
// and we can ignore it
tx.send(()).ok();
}
Expand Down Expand Up @@ -363,7 +363,7 @@ impl<T: Watcher> WatchConfig<T> {
// we watch the parent directory instead.
// More information at https://github.com/notify-rs/notify/issues/403
#[cfg(windows)]
let watched_path = path.parent().expect("turbo is unusable at filesytem root");
let watched_path = path.parent().expect("turbo is unusable at filesystem root");
#[cfg(not(windows))]
let watched_path = path;

Expand Down Expand Up @@ -424,7 +424,7 @@ enum GlobSymbol<'a> {
DoubleStar,
Question,
Negation,
PathSeperator,
PathSeparator,
}

/// Gets the minimum set of paths that can be watched for a given glob,
Expand Down Expand Up @@ -456,8 +456,8 @@ enum GlobSymbol<'a> {
/// note: it is currently extremely conservative, handling only `**`, braces,
/// and `?`. any other case watches the entire directory.
fn glob_to_paths(glob: &str) -> Vec<PathBuf> {
// get all the symbols and chunk them by path seperator
let chunks = glob_to_symbols(glob).group_by(|s| s != &GlobSymbol::PathSeperator);
// get all the symbols and chunk them by path separator
let chunks = glob_to_symbols(glob).group_by(|s| s != &GlobSymbol::PathSeparator);
let chunks = chunks
.into_iter()
.filter_map(|(not_sep, chunk)| (not_sep).then_some(chunk));
Expand Down Expand Up @@ -508,7 +508,7 @@ fn symbols_to_combinations<'a, T: Iterator<Item = GlobSymbol<'a>>>(
GlobSymbol::DoubleStar => return None,
GlobSymbol::Question => return None,
GlobSymbol::Negation => return None,
GlobSymbol::PathSeperator => return None,
GlobSymbol::PathSeparator => return None,
}
}

Expand Down Expand Up @@ -570,7 +570,7 @@ fn glob_to_symbols(glob: &str) -> impl Iterator<Item = GlobSymbol> {
}
b'?' => Some(GlobSymbol::Question),
b'!' => Some(GlobSymbol::Negation),
b'/' => Some(GlobSymbol::PathSeperator),
b'/' => Some(GlobSymbol::PathSeparator),
_ => Some(GlobSymbol::Char(&glob_bytes[start..end])),
}
} else {
Expand Down Expand Up @@ -611,9 +611,9 @@ mod test {
);
}

#[test_case("🇳🇴/🇳🇴", vec![Char("🇳🇴".as_bytes()), PathSeperator, Char("🇳🇴".as_bytes())])]
#[test_case("foo/**", vec![Char(b"f"), Char(b"o"), Char(b"o"), PathSeperator, DoubleStar])]
#[test_case("foo/{a,b}", vec![Char(b"f"), Char(b"o"), Char(b"o"), PathSeperator, OpenBrace, Char(b"a"), Char(b","), Char(b"b"), CloseBrace])]
#[test_case("🇳🇴/🇳🇴", vec![Char("🇳🇴".as_bytes()), PathSeparator, Char("🇳🇴".as_bytes())])]
#[test_case("foo/**", vec![Char(b"f"), Char(b"o"), Char(b"o"), PathSeparator, DoubleStar])]
#[test_case("foo/{a,b}", vec![Char(b"f"), Char(b"o"), Char(b"o"), PathSeparator, OpenBrace, Char(b"a"), Char(b","), Char(b"b"), CloseBrace])]
#[test_case("\\f", vec![Char(b"f")])]
#[test_case("\\\\f", vec![Char(b"\\"), Char(b"f")])]
#[test_case("\\🇳🇴", vec![Char("🇳🇴".as_bytes())])]
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn spawn_child(mut command: Command) -> Result<Arc<SharedChild>, io::Error>

ctrlc::set_handler(move || {
// on windows, we can't send signals so just kill
// we are quiting anyways so just ignore
// we are quitting anyways so just ignore
#[cfg(target_os = "windows")]
handler_shared_child.kill().ok();

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ mod test {
match strategy {
"stop" => manager.stop().await,
"wait" => manager.wait().await,
_ => panic!("unknown strat"),
_ => panic!("unknown strategy"),
}

// tasks return proper exit code
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/shim/local_turbo_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl LocalTurboConfig {
}

// If there isn't a package manager, just try to parse all known lockfiles
// This isn't the most effecient, but since we'll be hitting network to download
// This isn't the most efficient, but since we'll be hitting network to download
// the correct binary the unnecessary file reads aren't costly relative to the
// download.
PackageManager::supported_managers().iter().find_map(|pm| {
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/shim/local_turbo_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub fn turbo_version_has_shim(version: &str) -> bool {
version.major > 1
} else {
// In the case that we don't get passed a valid semver we should avoid a panic.
// We shouldn't hit this we introduce back infering package version from schema
// We shouldn't hit this we introduce back inferring package version from schema
// or package.json.
true
}
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl TurboSubscriber {
/// - If the `TURBO_LOG_VERBOSITY` env var is set, it will be used to set
/// the verbosity level. Otherwise, the default is `WARN`. See the
/// documentation on the RUST_LOG env var for syntax.
/// - If the verbosity argument (usually detemined by a flag) is provided,
/// - If the verbosity argument (usually determined by a flag) is provided,
/// it overrides the default global log level. This means it overrides the
/// `TURBO_LOG_VERBOSITY` global setting, but not per-module settings.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/turborepo-lockfiles/src/berry/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ mod test {
.cloned()
.collect(),
};
let serailized = lockfile.to_string();
assert!(serailized.contains(&format!("? {long_key}\n")));
let serialized = lockfile.to_string();
assert!(serialized.contains(&format!("? {long_key}\n")));
}
}
2 changes: 1 addition & 1 deletion crates/turborepo-lockfiles/src/pnpm/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub struct PackageSnapshot {
version: Option<String>,

// In lockfile v7, this portion of package is stored in the top level
// `shapshots` map as opposed to being stored inline.
// `snapshots` map as opposed to being stored inline.
#[serde(flatten)]
snapshot: PackageSnapshotV7,

Expand Down
10 changes: 5 additions & 5 deletions crates/turborepo-repository/src/package_graph/dep_splitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl<'a> DependencySplitter<'a> {
}

pub fn is_internal(&self, name: &str, version: &str) -> Option<PackageName> {
// If link_workspace_packages isn't set any version wihtout workspace protocol
// If link_workspace_packages isn't set any version without workspace protocol
// is considered external.
if !self.link_workspace_packages && !version.starts_with("workspace:") {
return None;
Expand Down Expand Up @@ -174,7 +174,7 @@ impl<'a> DependencyVersion<'a> {
_ if self.version == "*" => true,
_ => {
// If we got this far, then we need to check the workspace package version to
// see it satisfies the dependencies range to determin whether
// see it satisfies the dependencies range to determine whether
// or not it's an internal or external dependency.
let constraint = node_semver::Range::parse(self.version);
let version = node_semver::Version::parse(package_version);
Expand Down Expand Up @@ -222,17 +222,17 @@ mod test {
#[test_case("1.2.3", None, "npm:^1.2.3", Some("@scope/foo"), true ; "handles npm protocol with satisfied semver range")]
#[test_case("2.3.4", None, "npm:^1.2.3", None, true ; "handles npm protocol with not satisfied semver range")]
#[test_case("1.2.3", None, "1.2.2-alpha-123abcd.0", None, true ; "handles pre-release versions")]
// for backwards compatability with the code before versions were verified
// for backwards compatibility with the code before versions were verified
#[test_case("sometag", None, "1.2.3", Some("@scope/foo"), true ; "handles non-semver package version")]
// for backwards compatability with the code before versions were verified
// for backwards compatibility with the code before versions were verified
#[test_case("1.2.3", None, "sometag", Some("@scope/foo"), true ; "handles non-semver dependency version")]
#[test_case("1.2.3", None, "file:../libB", Some("@scope/foo"), true ; "handles file:.. inside repo")]
#[test_case("1.2.3", None, "file:../../../otherproject", None, true ; "handles file:.. outside repo")]
#[test_case("1.2.3", None, "link:../libB", Some("@scope/foo"), true ; "handles link:.. inside repo")]
#[test_case("1.2.3", None, "link:../../../otherproject", None, true ; "handles link:.. outside repo")]
#[test_case("0.0.0-development", None, "*", Some("@scope/foo"), true ; "handles development versions")]
#[test_case("1.2.3", Some("foo"), "workspace:@scope/foo@*", Some("@scope/foo"), true ; "handles pnpm alias star")]
#[test_case("1.2.3", Some("foo"), "workspace:@scope/foo@~", Some("@scope/foo"), true ; "handles pnpm alias tilda")]
#[test_case("1.2.3", Some("foo"), "workspace:@scope/foo@~", Some("@scope/foo"), true ; "handles pnpm alias tilde")]
#[test_case("1.2.3", Some("foo"), "workspace:@scope/foo@^", Some("@scope/foo"), true ; "handles pnpm alias caret")]
#[test_case("1.2.3", None, "1.2.3", None, false ; "no workspace linking")]
#[test_case("1.2.3", None, "workspace:1.2.3", Some("@scope/foo"), false ; "no workspace linking with protocol")]
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-ui/src/tui/spinner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Default for SpinnerState {
// use super::*;
//
// #[test]
// fn test_inital_update() {
// fn test_initial_update() {
// let mut spinner = SpinnerState::new();
// assert!(spinner.last_render.is_none());
// assert_eq!(spinner.frame, 0);
Expand Down
4 changes: 2 additions & 2 deletions crates/turborepo-wax/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ within a component (**never path separators**). Zero-or-more wildcards cannot be
adjacent to other zero-or-more wildcards. The `*` wildcard is eager and will
match the longest possible text while the `$` wildcard is lazy and will match
the shortest possible text. When followed by a literal, `*` stops at the last
occurrence of that literal while `$` stops at the first occurence.
occurrence of that literal while `$` stops at the first occurrence.

The exactly-one wildcard `?` matches any single character within a component
(**never path separators**). Exactly-one wildcards do not group automatically,
Expand Down Expand Up @@ -449,7 +449,7 @@ Globs are strictly nominal and do not support any non-nominal constraints. It is
not possible to directly filter or otherwise select paths or files based on
additional metadata (such as a modification timestamp) in a glob expression.
However, it is possible for user code to query any such metadata for a matching
path or effeciently apply such filtering when matching directory trees using
path or efficiently apply such filtering when matching directory trees using
`FileIterator::filter_tree`.

For such additional features, including metadata filters and transformations
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-wax/src/walk/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ where
///
/// **This trait provides the only API for implementing a
/// [`SeparatingFilter`].** [`Iterator`]s can implement this trait for a
/// transitive [`SeparatingFilter`] implemention that provides all items
/// transitive [`SeparatingFilter`] implementation that provides all items
/// as filtrate. This bridges [`Iterator`]s into the input of a separating
/// filter. See the [`filtrate`] function for the output analog.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This means that tasks that do not account for all of the environment variables t
<Callout type="warn" title="Cache safety with Strict Mode">
While Strict Mode makes it much more likely for your task to fail when you
haven't accounted for all of your environment variables, it doesn't guarantee
task failure. If your applicaton is able to gracefully handle a missing
task failure. If your application is able to gracefully handle a missing
environment variable, you could still successfully complete tasks and get
unintended cache hits.
</Callout>
Expand Down
2 changes: 1 addition & 1 deletion docs/repo-docs/guides/tools/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const Button = () => {

#### Compiled Packages

In [Compiled Packages](https://turbo.build/repo/docs/core-concepts/internal-packages#compiled-packages), `imports` target the built ouptuts for the package.
In [Compiled packages](https://turbo.build/repo/docs/core-concepts/internal-packages#compiled-packages), `imports` target the built outputs for the package.

<Tabs storageKey="ts-imports-compiled" items={["package.json", "Source code"]}>
<Tab value="package.json">
Expand Down
4 changes: 2 additions & 2 deletions packages/turbo-vsc/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ which APIs it uses to achieve its feature set, and how it is structured.

You're here! The client is the side that runs in VSCode. It is essentially
an entry point into the LSP but there are a few other things it manages
mostly for convience sake.
mostly for convenience sake.

- basic syntax highlighting for the pipeline gradient
- discovery and installation of global / local turbo
- toolbar item to enable / disable the daemon
- some editor commands
- start deamon
- start daemon
- stop daemon
- restart daemon
- run turbo command
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const [currentVersion] = versionFileContents.split("\n");
const identifier = increment.startsWith("pre") ? "canary" : "latest";
const newVersion = semver.inc(currentVersion, increment, identifier);

// Parse the output semver identifer to identify which npm tag to publish to.
// Parse the output semver identifier to identify which npm tag to publish to.
const parsed = semver.parse(newVersion);
const tag = parsed?.prerelease[0] || "latest";

Expand Down

0 comments on commit ad4cf20

Please sign in to comment.