diff options
Diffstat (limited to 'cli')
30 files changed, 73 insertions, 73 deletions
diff --git a/cli/emit.rs b/cli/emit.rs index 6d3419579..b71ca97ab 100644 --- a/cli/emit.rs +++ b/cli/emit.rs @@ -64,7 +64,7 @@ impl Emitter { } /// Gets a cached emit if the source matches the hash found in the cache. - pub fn maybed_cached_emit( + pub fn maybe_cached_emit( &self, specifier: &ModuleSpecifier, source: &str, diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index cd2ea9295..43e192517 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -1808,7 +1808,7 @@ impl Iterator for PreloadDocumentFinder { } } -/// Removes any directorys that are a descendant of another directory in the collection. +/// Removes any directories that are a descendant of another directory in the collection. fn sort_and_remove_non_leaf_dirs(mut dirs: Vec<PathBuf>) -> Vec<PathBuf> { if dirs.is_empty() { return dirs; diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 2ac9ec3c0..9abdade27 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1374,7 +1374,7 @@ impl Inner { } self.recreate_npm_services_if_necessary().await; - self.assets.intitialize(self.snapshot()).await; + self.assets.initialize(self.snapshot()).await; self.performance.measure(mark); Ok(InitializeResult { diff --git a/cli/lsp/path_to_regex.rs b/cli/lsp/path_to_regex.rs index 01dbc0287..9fc05067f 100644 --- a/cli/lsp/path_to_regex.rs +++ b/cli/lsp/path_to_regex.rs @@ -626,7 +626,7 @@ pub fn tokens_to_regex( route.push('$'); } } else { - let is_end_deliminated = match maybe_end_token { + let is_end_delimited = match maybe_end_token { Some(Token::String(mut s)) => { if let Some(c) = s.pop() { delimiter.contains(c) @@ -642,7 +642,7 @@ pub fn tokens_to_regex( write!(route, r"(?:{delimiter}(?={ends_with}))?").unwrap(); } - if !is_end_deliminated { + if !is_end_delimited { write!(route, r"(?={delimiter}|{ends_with})").unwrap(); } } diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs index f683fa588..e4501c903 100644 --- a/cli/lsp/registries.rs +++ b/cli/lsp/registries.rs @@ -74,7 +74,7 @@ fn base_url(url: &Url) -> String { } #[derive(Debug)] -enum CompletorType { +enum CompletionType { Literal(String), Key { key: Key, @@ -85,25 +85,25 @@ enum CompletorType { /// Determine if a completion at a given offset is a string literal or a key/ /// variable. -fn get_completor_type( +fn get_completion_type( offset: usize, tokens: &[Token], match_result: &MatchResult, -) -> Option<CompletorType> { +) -> Option<CompletionType> { let mut len = 0_usize; for (index, token) in tokens.iter().enumerate() { match token { Token::String(s) => { len += s.chars().count(); if offset < len { - return Some(CompletorType::Literal(s.clone())); + return Some(CompletionType::Literal(s.clone())); } } Token::Key(k) => { if let Some(prefix) = &k.prefix { len += prefix.chars().count(); if offset < len { - return Some(CompletorType::Key { + return Some(CompletionType::Key { key: k.clone(), prefix: Some(prefix.clone()), index, @@ -120,7 +120,7 @@ fn get_completor_type( .unwrap_or_default(); len += value.chars().count(); if offset <= len { - return Some(CompletorType::Key { + return Some(CompletionType::Key { key: k.clone(), prefix: None, index, @@ -130,7 +130,7 @@ fn get_completor_type( if let Some(suffix) = &k.suffix { len += suffix.chars().count(); if offset <= len { - return Some(CompletorType::Literal(suffix.clone())); + return Some(CompletionType::Literal(suffix.clone())); } } } @@ -688,17 +688,17 @@ impl ModuleRegistry { .ok()?; if let Some(match_result) = matcher.matches(path) { did_match = true; - let completor_type = - get_completor_type(path_offset, &tokens, &match_result); - match completor_type { - Some(CompletorType::Literal(s)) => self.complete_literal( + let completion_type = + get_completion_type(path_offset, &tokens, &match_result); + match completion_type { + Some(CompletionType::Literal(s)) => self.complete_literal( s, &mut completions, current_specifier, offset, range, ), - Some(CompletorType::Key { key, prefix, index }) => { + Some(CompletionType::Key { key, prefix, index }) => { let maybe_url = registry.get_url_for_key(&key); if let Some(url) = maybe_url { if let Some(items) = self diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 66687789b..20edf31d9 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -650,7 +650,7 @@ impl Assets { } /// Initializes with the assets in the isolate. - pub async fn intitialize(&self, state_snapshot: Arc<StateSnapshot>) { + pub async fn initialize(&self, state_snapshot: Arc<StateSnapshot>) { let assets = get_isolate_assets(&self.ts_server, state_snapshot).await; let mut assets_map = self.assets.lock(); for asset in assets { @@ -4737,7 +4737,7 @@ mod tests { } #[test] - fn include_supress_inlay_hit_settings() { + fn include_suppress_inlay_hit_settings() { let mut settings = WorkspaceSettings::default(); settings .inlay_hints diff --git a/cli/napi/README.md b/cli/napi/README.md index cd89bf83a..e40d4719d 100644 --- a/cli/napi/README.md +++ b/cli/napi/README.md @@ -3,7 +3,7 @@ This directory contains source for Deno's Node-API implementation. It depends on `napi_sym` and `deno_napi`. -- [`async.rs`](./async.rs) - Asyncronous work related functions. +- [`async.rs`](./async.rs) - Asynchronous work related functions. - [`env.rs`](./env.rs) - Environment related functions. - [`js_native_api.rs`](./js_native_api.rs) - V8/JS related functions. - [`thread_safe_function.rs`](./threadsafe_functions.rs) - Thread safe function diff --git a/cli/napi/threadsafe_functions.rs b/cli/napi/threadsafe_functions.rs index c47748758..775ad4262 100644 --- a/cli/napi/threadsafe_functions.rs +++ b/cli/napi/threadsafe_functions.rs @@ -136,7 +136,7 @@ fn napi_create_threadsafe_function( _async_resource_name: napi_value, _max_queue_size: usize, initial_thread_count: usize, - thread_finialize_data: *mut c_void, + thread_finalize_data: *mut c_void, thread_finalize_cb: Option<napi_finalize>, context: *mut c_void, maybe_call_js_cb: Option<napi_threadsafe_function_call_js>, @@ -168,7 +168,7 @@ fn napi_create_threadsafe_function( thread_counter: initial_thread_count, sender: env_ref.async_work_sender.clone(), finalizer: thread_finalize_cb, - finalizer_data: thread_finialize_data, + finalizer_data: thread_finalize_data, tsfn_sender: env_ref.threadsafe_function_sender.clone(), ref_counter: Arc::new(AtomicUsize::new(1)), env, diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index 142cbee18..7e8c99fa7 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -463,7 +463,7 @@ impl NpmCache { } pub fn mixed_case_package_name_encode(name: &str) -> String { - // use base32 encoding because it's reversable and the character set + // use base32 encoding because it's reversible and the character set // only includes the characters within 0-9 and A-Z so it can be lower cased base32::encode( base32::Alphabet::RFC4648 { padding: false }, diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 71a3d541f..04b17ef00 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -1325,7 +1325,7 @@ fn lsp_hover_change_mbc() { "end": { "line": 1, // the LSP uses utf16 encoded characters indexes, so - // after the deno emoiji is character index 15 + // after the deno emoji is character index 15 "character": 15 } }, @@ -2088,7 +2088,7 @@ fn lsp_document_symbol() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "interface IFoo {\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public x: number) { }\n foo() { return true; }\n /** @deprecated */\n baz() { return false; }\n get value(): number { return 0; }\n set value(newVavlue: number) { return; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n\nenum Values { value1, value2 }\n\nvar bar: IFoo = new Bar(3);" + "text": "interface IFoo {\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public x: number) { }\n foo() { return true; }\n /** @deprecated */\n baz() { return false; }\n get value(): number { return 0; }\n set value(_newValue: number) { return; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n\nenum Values { value1, value2 }\n\nvar bar: IFoo = new Bar(3);" } }), ); @@ -3114,7 +3114,7 @@ fn lsp_code_lens_test_disabled() { "text": "const { test } = Deno;\nconst { test: test2 } = Deno;\nconst test3 = Deno.test;\n\nDeno.test(\"test a\", () => {});\nDeno.test({\n name: \"test b\",\n fn() {},\n});\ntest({\n name: \"test c\",\n fn() {},\n});\ntest(\"test d\", () => {});\ntest2({\n name: \"test e\",\n fn() {},\n});\ntest2(\"test f\", () => {});\ntest3({\n name: \"test g\",\n fn() {},\n});\ntest3(\"test h\", () => {});\n" } }), - // diable test code lens + // disable test code lens json!([{ "enable": true, "codeLens": { @@ -7373,7 +7373,7 @@ Deno.test({ .as_str() .unwrap(); // deno test's output capturing flushes with a zero-width space in order to - // synchronize the output pipes. Occassionally this zero width space + // synchronize the output pipes. Occasionally this zero width space // might end up in the output so strip it from the output comparison here. assert_eq!(notification_value.replace('\u{200B}', ""), "test a\r\n"); assert_eq!( diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 476849b2a..b4171e4a2 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2466,7 +2466,7 @@ mod permissions { #[test] fn net_listen_allow_localhost() { - // Port 4600 is chosen to not colide with those used by + // Port 4600 is chosen to not collide with those used by // target/debug/test_server let (_, err) = util::run_and_collect_output( true, diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts index 17dc76491..f37f26e09 100644 --- a/cli/tests/unit/chown_test.ts +++ b/cli/tests/unit/chown_test.ts @@ -105,7 +105,7 @@ Deno.test( }, async function chownSyncSucceed() { // TODO(bartlomieju): when a file's owner is actually being changed, - // chown only succeeds if run under priviledged user (root) + // chown only succeeds if run under privileged user (root) // The test script has no such privilege, so need to find a better way to test this case const { uid, gid } = await getUidAndGid(); @@ -114,7 +114,7 @@ Deno.test( Deno.writeTextFileSync(filePath, "Hello"); // the test script creates this file with the same uid and gid, - // here chown is a noop so it succeeds under non-priviledged user + // here chown is a noop so it succeeds under non-privileged user Deno.chownSync(filePath, uid, gid); Deno.removeSync(dirPath, { recursive: true }); @@ -182,7 +182,7 @@ Deno.test( await Deno.writeFile(fileUrl, fileData); // the test script creates this file with the same uid and gid, - // here chown is a noop so it succeeds under non-priviledged user + // here chown is a noop so it succeeds under non-privileged user await Deno.chown(fileUrl, uid, gid); Deno.removeSync(dirPath, { recursive: true }); diff --git a/cli/tests/unit/command_test.ts b/cli/tests/unit/command_test.ts index 198f94aed..2e73869a9 100644 --- a/cli/tests/unit/command_test.ts +++ b/cli/tests/unit/command_test.ts @@ -797,7 +797,7 @@ setInterval(() => { Deno.writeFileSync(`${cwd}/${programFile}`, enc.encode(program)); Deno.writeFileSync(`${cwd}/${childProgramFile}`, enc.encode(childProgram)); // In this subprocess we are spawning another subprocess which has - // an infite interval set. Following call would never resolve unless + // an infinite interval set. Following call would never resolve unless // child process gets unrefed. const { success, stdout, stderr } = await new Deno.Command( Deno.execPath(), diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 4cedf3584..8543541af 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -3,7 +3,7 @@ // TODO(ry) The unit test functions in this module are too coarse. They should // be broken up into smaller bits. -// TODO(ry) These tests currentl strip all the ANSI colors out. We don't have a +// TODO(ry) These tests currently strip all the ANSI colors out. We don't have a // good way to control whether we produce color output or not since // std/fmt/colors auto determines whether to put colors in or not. We need // better infrastructure here so we can properly test the colors. @@ -1069,7 +1069,7 @@ Deno.test(function consoleTestWithCustomInspectorError() { () => stringify(a), Error, "BOOM", - "Inpsect should fail and maintain a clear CTX_STACK", + "Inspect should fail and maintain a clear CTX_STACK", ); }); @@ -1779,7 +1779,7 @@ Deno.test(function consoleLogShouldNotThrowErrorWhenInvalidCssColorsAreGiven() { }); // console.log(Invalid Date) test -Deno.test(function consoleLogShoultNotThrowErrorWhenInvalidDateIsPassed() { +Deno.test(function consoleLogShouldNotThrowErrorWhenInvalidDateIsPassed() { mockConsole((console, out) => { const invalidDate = new Date("test"); console.log(invalidDate); diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index db553f14d..e89abef30 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -1270,9 +1270,9 @@ Deno.test( }, 1000); }, }); - const nonExistantHostname = "http://localhost:47582"; + const nonExistentHostname = "http://localhost:47582"; await assertRejects(async () => { - await fetch(nonExistantHostname, { body, method: "POST" }); + await fetch(nonExistentHostname, { body, method: "POST" }); }, TypeError); await done; }, diff --git a/cli/tests/unit/ffi_test.ts b/cli/tests/unit/ffi_test.ts index 65b257774..c5961c6fb 100644 --- a/cli/tests/unit/ffi_test.ts +++ b/cli/tests/unit/ffi_test.ts @@ -29,7 +29,7 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() { Deno.dlopen("/usr/lib/libc.so.6", {}); }, Deno.errors.PermissionDenied); const fnptr = new Deno.UnsafeFnPointer( - // @ts-expect-error: Not NonNullable but null check is after premissions check. + // @ts-expect-error: Not NonNullable but null check is after permissions check. null, { parameters: ["u32", "pointer"], @@ -43,7 +43,7 @@ Deno.test({ permissions: { ffi: false } }, function ffiPermissionDenied() { Deno.UnsafePointer.of(new Uint8Array(0)); }, Deno.errors.PermissionDenied); const ptrView = new Deno.UnsafePointerView( - // @ts-expect-error: Not NonNullable but null check is after premissions check. + // @ts-expect-error: Not NonNullable but null check is after permissions check. null, ); assertThrows(() => { diff --git a/cli/tests/unit/fs_events_test.ts b/cli/tests/unit/fs_events_test.ts index cdfb67657..9330f2007 100644 --- a/cli/tests/unit/fs_events_test.ts +++ b/cli/tests/unit/fs_events_test.ts @@ -14,14 +14,14 @@ Deno.test({ permissions: { read: true } }, function watchFsInvalidPath() { if (Deno.build.os === "windows") { assertThrows( () => { - Deno.watchFs("non-existant.file"); + Deno.watchFs("non-existent.file"); }, Error, "Input watch path is neither a file nor a directory", ); } else { assertThrows(() => { - Deno.watchFs("non-existant.file"); + Deno.watchFs("non-existent.file"); }, Deno.errors.NotFound); } }); @@ -51,7 +51,7 @@ Deno.test( const testDir = await makeTempDir(); const iter = Deno.watchFs(testDir); - // Asynchornously capture two fs events. + // Asynchronously capture two fs events. const eventsPromise = getTwoEvents(iter); // Make some random file system activity. diff --git a/cli/tests/unit/kv_test.ts b/cli/tests/unit/kv_test.ts index 5ed0bc644..e7642fef0 100644 --- a/cli/tests/unit/kv_test.ts +++ b/cli/tests/unit/kv_test.ts @@ -1662,7 +1662,7 @@ Deno.test({ await db.enqueue("msg2"); await promise; - // Close the database and wait for the listerner to finish. + // Close the database and wait for the listener to finish. db.close(); await listener; @@ -1718,7 +1718,7 @@ Deno.test({ await db.enqueue("msg1", { delay: 10000 }); await db.enqueue("msg2", { delay: 10000 }); - // Close the database and wait for the listerner to finish. + // Close the database and wait for the listener to finish. db.close(); await listener; diff --git a/cli/tests/unit/serve_test.ts b/cli/tests/unit/serve_test.ts index cfc2710f6..8ab5209df 100644 --- a/cli/tests/unit/serve_test.ts +++ b/cli/tests/unit/serve_test.ts @@ -2153,16 +2153,16 @@ const compressionTestCases = [ // out: { "Content-Type": "text/plain" }, // expect: null, // }, - { name: "Uncompressible", length: 1024, in: {}, out: {}, expect: null }, + { name: "Incompressible", length: 1024, in: {}, out: {}, expect: null }, { - name: "UncompressibleAcceptGzip", + name: "IncompressibleAcceptGzip", length: 1024, in: { "Accept-Encoding": "gzip" }, out: {}, expect: null, }, { - name: "UncompressibleType", + name: "IncompressibleType", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/fake" }, @@ -2190,21 +2190,21 @@ const compressionTestCases = [ expect: "br", }, { - name: "UncompressibleRange", + name: "IncompressibleRange", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/plain", "Content-Range": "1" }, expect: null, }, { - name: "UncompressibleCE", + name: "IncompressibleCE", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/plain", "Content-Encoding": "random" }, expect: null, }, { - name: "UncompressibleCC", + name: "IncompressibleCC", length: 1024, in: { "Accept-Encoding": "gzip" }, out: { "Content-Type": "text/plain", "Cache-Control": "no-transform" }, diff --git a/cli/tests/unit/text_encoding_test.ts b/cli/tests/unit/text_encoding_test.ts index 940dd9f74..b76e9a9bf 100644 --- a/cli/tests/unit/text_encoding_test.ts +++ b/cli/tests/unit/text_encoding_test.ts @@ -250,17 +250,17 @@ Deno.test(function toStringShouldBeWebCompatibility() { Deno.test(function textEncoderShouldCoerceToString() { const encoder = new TextEncoder(); - const fixutreText = "text"; + const fixtureText = "text"; const fixture = { toString() { - return fixutreText; + return fixtureText; }, }; const bytes = encoder.encode(fixture as unknown as string); const decoder = new TextDecoder(); const decoded = decoder.decode(bytes); - assertEquals(decoded, fixutreText); + assertEquals(decoded, fixtureText); }); Deno.test(function binaryEncode() { diff --git a/cli/tests/unit/url_search_params_test.ts b/cli/tests/unit/url_search_params_test.ts index 9eead890c..8eb0f774d 100644 --- a/cli/tests/unit/url_search_params_test.ts +++ b/cli/tests/unit/url_search_params_test.ts @@ -23,7 +23,7 @@ Deno.test(function urlSearchParamsWithQuotes() { assertEquals(searchParams, "str=%27hello+world%27"); }); -Deno.test(function urlSearchParamsWithBraket() { +Deno.test(function urlSearchParamsWithBracket() { const init = [ ["str", "(hello world)"], ]; @@ -328,10 +328,10 @@ Deno.test( // If a class extends URLSearchParams, override one method should not change another's behavior. Deno.test( function urlSearchParamsOverridingAppendNotChangeConstructorAndSet() { - let overridedAppendCalled = 0; + let overriddenAppendCalled = 0; class CustomSearchParams extends URLSearchParams { append(name: string, value: string) { - ++overridedAppendCalled; + ++overriddenAppendCalled; super.append(name, value); } } @@ -339,7 +339,7 @@ Deno.test( new CustomSearchParams([["foo", "bar"]]); new CustomSearchParams(new CustomSearchParams({ foo: "bar" })); new CustomSearchParams().set("foo", "bar"); - assertEquals(overridedAppendCalled, 0); + assertEquals(overriddenAppendCalled, 0); }, ); diff --git a/cli/tests/unit_node/buffer_test.ts b/cli/tests/unit_node/buffer_test.ts index 74415d0d5..5244764c6 100644 --- a/cli/tests/unit_node/buffer_test.ts +++ b/cli/tests/unit_node/buffer_test.ts @@ -215,7 +215,7 @@ Deno.test({ assertEquals( Buffer.byteLength(Buffer.alloc(0)), Buffer.alloc(0).byteLength, - "Byte lenght differs on buffers", + "Byte length differs on buffers", ); }, }); diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index d54368003..2a2203e05 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -288,7 +288,7 @@ Deno.test("[node/http] non-string buffer response", { }); // TODO(kt3k): Enable this test -// Currently ImcomingMessage constructor has incompatible signature. +// Currently IncomingMessage constructor has incompatible signature. /* Deno.test("[node/http] http.IncomingMessage can be created without url", () => { const message = new http.IncomingMessage( diff --git a/cli/tests/unit_node/worker_threads_test.ts b/cli/tests/unit_node/worker_threads_test.ts index c46df057e..a43a1b506 100644 --- a/cli/tests/unit_node/worker_threads_test.ts +++ b/cli/tests/unit_node/worker_threads_test.ts @@ -103,7 +103,7 @@ Deno.test({ worker.postMessage("Hello, how are you my thread?"); assertEquals((await once(worker, "message"))[0], "I'm fine!"); const data = (await once(worker, "message"))[0]; - // data.threadId can be 1 when this test is runned individually + // data.threadId can be 1 when this test is run individually if (data.threadId === 1) data.threadId = 3; assertObjectMatch(data, { isMainThread: false, @@ -144,7 +144,7 @@ Deno.test({ }); Deno.test({ - name: "[worker_threads] inheritences", + name: "[worker_threads] inheritances", async fn() { const worker = new workerThreads.Worker( ` diff --git a/cli/tools/coverage/mod.rs b/cli/tools/coverage/mod.rs index 223bac316..c872623b8 100644 --- a/cli/tools/coverage/mod.rs +++ b/cli/tools/coverage/mod.rs @@ -132,12 +132,12 @@ impl CoverageCollector { let mut out = BufWriter::new(File::create(filepath)?); let coverage = serde_json::to_string(&script_coverage)?; - let formated_coverage = format_json(&coverage, &Default::default()) + let formatted_coverage = format_json(&coverage, &Default::default()) .ok() .flatten() .unwrap_or(coverage); - out.write_all(formated_coverage.as_bytes())?; + out.write_all(formatted_coverage.as_bytes())?; out.flush()?; } @@ -533,20 +533,20 @@ impl CoverageReporter for PrettyCoverageReporter { let mut last_line = None; for line_index in missed_lines { const WIDTH: usize = 4; - const SEPERATOR: &str = "|"; + const SEPARATOR: &str = "|"; // Put a horizontal separator between disjoint runs of lines if let Some(last_line) = last_line { if last_line + 1 != line_index { let dash = colors::gray("-".repeat(WIDTH + 1)); - println!("{}{}{}", dash, colors::gray(SEPERATOR), dash); + println!("{}{}{}", dash, colors::gray(SEPARATOR), dash); } } println!( "{:width$} {} {}", line_index + 1, - colors::gray(SEPERATOR), + colors::gray(SEPARATOR), colors::red(&lines[line_index]), width = WIDTH ); @@ -703,7 +703,7 @@ pub async fn cover_files( | MediaType::Mts | MediaType::Cts | MediaType::Tsx => { - match emitter.maybed_cached_emit(&file.specifier, &file.source) { + match emitter.maybe_cached_emit(&file.specifier, &file.source) { Some(code) => code.into(), None => { return Err(anyhow!( diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index d7a235b4a..e296ddab9 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -442,8 +442,8 @@ fn format_ensure_stable( concat!( "Formatting succeeded initially, but failed when ensuring a ", "stable format. This indicates a bug in the formatter where ", - "the text it produces is not syntatically correct. As a temporary ", - "workfaround you can ignore this file ({}).\n\n{:#}" + "the text it produces is not syntactically correct. As a temporary ", + "workaround you can ignore this file ({}).\n\n{:#}" ), file_path.display(), err, diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index 79467a996..759ff23d3 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -288,7 +288,7 @@ fn validate(input: &str) -> ValidationResult { | (Some(Token::LBrace), Token::RBrace) | (Some(Token::DollarLBrace), Token::RBrace) => {} (Some(left), _) => { - // queue up a validation error to surface once we've finished examininig the current line + // queue up a validation error to surface once we've finished examining the current line queued_validation_error = Some(ValidationResult::Invalid(Some( format!("Mismatched pairs: {left:?} is not properly closed"), ))); diff --git a/cli/tools/task.rs b/cli/tools/task.rs index 7dd7e7bc4..f99e7431c 100644 --- a/cli/tools/task.rs +++ b/cli/tools/task.rs @@ -145,7 +145,7 @@ fn get_script_with_args(script: &str, options: &CliOptions) -> String { .argv() .iter() // surround all the additional arguments in double quotes - // and santize any command substition + // and sanitize any command substitution .map(|a| format!("\"{}\"", a.replace('"', "\\\"").replace('$', "\\$"))) .collect::<Vec<_>>() .join(" "); diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index b371731c3..78ac59981 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -125,7 +125,7 @@ impl<TEnvironment: UpdateCheckerEnvironment> UpdateChecker<TEnvironment> { /// Returns the version if a new one is available and it should be prompted about. pub fn should_prompt(&self) -> Option<String> { let file = self.maybe_file.as_ref()?; - // If the current version saved is not the actualy current version of the binary + // If the current version saved is not the actually current version of the binary // It means // - We already check for a new version today // - The user have probably upgraded today diff --git a/cli/util/display.rs b/cli/util/display.rs index 96b6cf84e..bc50f8674 100644 --- a/cli/util/display.rs +++ b/cli/util/display.rs @@ -45,7 +45,7 @@ pub fn human_download_size(byte_count: u64, total_bytes: u64) -> String { } } -/// A function that converts a milisecond elapsed time to a string that +/// A function that converts a millisecond elapsed time to a string that /// represents a human readable version of that time. pub fn human_elapsed(elapsed: u128) -> String { if elapsed < 1_000 { |