From ea121c9a0e162a83beeae62ed9e5a7911877bcbc Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 2 Aug 2024 13:26:54 +0200 Subject: [PATCH] docs: fix typos (#24820) This PR fixes various typos I spotted in the project. --- cli/args/flags.rs | 2 +- cli/cache/cache_db.rs | 2 +- cli/lsp/diagnostics.rs | 2 +- cli/tools/compile.rs | 2 +- cli/tools/registry/pm.rs | 2 +- cli/tools/repl/session.rs | 2 +- cli/tsc/99_main_compiler.js | 4 ++-- cli/tsc/dts/lib.deno.unstable.d.ts | 2 +- ext/node/polyfills/internal/crypto/keys.ts | 2 +- ext/node/polyfills/internal_binding/handle_wrap.ts | 2 +- runtime/js/99_main.js | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 91adac84ba..59e535ee0f 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -4257,7 +4257,7 @@ fn run_parse( // for old versions of @netlify/edge-bundler with new versions of Deno // where Deno has gotten smarter at resolving config files. // - // It's an unfortuante scenario, but Netlify has the version at least + // It's an unfortunate scenario, but Netlify has the version at least // pinned to 1.x in old versions so we can remove this in Deno 2.0 in // a few months. fn temp_netlify_deno_1_hack(flags: &mut Flags, script_arg: &str) { diff --git a/cli/cache/cache_db.rs b/cli/cache/cache_db.rs index 8565872925..b24078f29b 100644 --- a/cli/cache/cache_db.rs +++ b/cli/cache/cache_db.rs @@ -470,7 +470,7 @@ mod tests { }; static TEST_DB_BLACKHOLE: CacheDBConfiguration = CacheDBConfiguration { - table_initializer: "syntax error", // intentially cause an error + table_initializer: "syntax error", // intentionally cause an error on_version_change: "", preheat_queries: &[], on_failure: CacheFailure::Blackhole, diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index ed92c400fa..69f3b11455 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1532,7 +1532,7 @@ fn diagnose_dependency( // If not @deno-types, diagnose the types if the code errored because // it's likely resolving into the node_modules folder, which might be // erroring correctly due to resolution only being for bundlers. Let this - // fail at runtime if necesarry, but don't bother erroring in the editor + // fail at runtime if necessary, but don't bother erroring in the editor || !is_types_deno_types && matches!(dependency.maybe_type, Resolution::Ok(_)) && matches!(dependency.maybe_code, Resolution::Err(_)) { diff --git a/cli/tools/compile.rs b/cli/tools/compile.rs index f0534abc39..6cf2ccf771 100644 --- a/cli/tools/compile.rs +++ b/cli/tools/compile.rs @@ -47,7 +47,7 @@ pub async fn compile( log::warn!( concat!( "{} Sloppy imports are not supported in deno compile. ", - "The compiled executable may encouter runtime errors.", + "The compiled executable may encounter runtime errors.", ), crate::colors::yellow("Warning"), ); diff --git a/cli/tools/registry/pm.rs b/cli/tools/registry/pm.rs index 2986c1c2a3..a3ece03e77 100644 --- a/cli/tools/registry/pm.rs +++ b/cli/tools/registry/pm.rs @@ -488,7 +488,7 @@ fn update_config_file_content( text_changes.push(TextChange { range: insert_position..insert_position, // NOTE(bartlomieju): adding `\n` here to force the formatter to always - // produce a config file that is multline, like so: + // produce a config file that is multiline, like so: // ``` // { // "imports": { diff --git a/cli/tools/repl/session.rs b/cli/tools/repl/session.rs index 3e43ea3ab2..b379c3646a 100644 --- a/cli/tools/repl/session.rs +++ b/cli/tools/repl/session.rs @@ -866,7 +866,7 @@ impl AnalyzedJsxPragmas { } /// Analyze provided source and return information about carious pragmas -/// used to configure the JSX tranforms. +/// used to configure the JSX transforms. fn analyze_jsx_pragmas( parsed_source: &ParsedSource, ) -> Option { diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 75c6f8117e..a0bce0133d 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -490,7 +490,7 @@ delete Object.prototype.__proto__; // anything. We prefer to treat these as modules with no exports. 2306, // TS2688: Cannot find type definition file for '...'. - // We ignore because type defintion files can end with '.ts'. + // We ignore because type definition files can end with '.ts'. 2688, // TS2792: Cannot find module. Did you mean to set the 'moduleResolution' // option to 'node', or to add aliases to the 'paths' option? @@ -1106,7 +1106,7 @@ delete Object.prototype.__proto__; * @param {any} data * @param {string | null} error */ - // TODO(bartlomieju): this feels needlessly generic, both type chcking + // TODO(bartlomieju): this feels needlessly generic, both type checking // and language server use it with inefficient serialization. Id is not used // anyway... function respond(_id, data = null, error = null) { diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index f76b67dd84..e940bfca92 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -960,7 +960,7 @@ declare namespace Deno { caCerts?: string[]; /** A HTTP proxy to use for new connections. */ proxy?: Proxy; - /** Sets the maximum numer of idle connections per host allowed in the pool. */ + /** Sets the maximum number of idle connections per host allowed in the pool. */ poolMaxIdlePerHost?: number; /** Set an optional timeout for idle sockets being kept-alive. * Set to false to disable the timeout. */ diff --git a/ext/node/polyfills/internal/crypto/keys.ts b/ext/node/polyfills/internal/crypto/keys.ts index ca22e12c61..26cd86b446 100644 --- a/ext/node/polyfills/internal/crypto/keys.ts +++ b/ext/node/polyfills/internal/crypto/keys.ts @@ -234,7 +234,7 @@ export function prepareAsymmetricKey(key) { return { format: "pem", data: getArrayBufferOrView(key, "key") }; } else if (isKeyObject(key)) { return { - // Assumes that assymetric keys are stored as PEM. + // Assumes that asymmetric keys are stored as PEM. format: "pem", data: getKeyMaterial(key), }; diff --git a/ext/node/polyfills/internal_binding/handle_wrap.ts b/ext/node/polyfills/internal_binding/handle_wrap.ts index ef8457338f..1b3036a7ef 100644 --- a/ext/node/polyfills/internal_binding/handle_wrap.ts +++ b/ext/node/polyfills/internal_binding/handle_wrap.ts @@ -39,7 +39,7 @@ export class HandleWrap extends AsyncWrap { close(cb: () => void = () => {}) { this._onClose(); - // We need to delay 'cb' at least 2 ticks to avoid "close" event happenning before "error" event in net.Socket + // We need to delay 'cb' at least 2 ticks to avoid "close" event happening before "error" event in net.Socket // See https://github.com/denoland/deno/pull/24656 for more information nextTick(nextTick, cb); } diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index f537f17752..ca96e34b7a 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -532,7 +532,7 @@ function dispatchUnloadEvent() { } let hasBootstrapped = false; -// Delete the `console` object that V8 automaticaly adds onto the global wrapper +// Delete the `console` object that V8 automatically adds onto the global wrapper // object on context creation. We don't want this console object to shadow the // `console` object exposed by the ext/node globalThis proxy. delete globalThis.console;