summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/console/01_console.js2
-rw-r--r--ext/crypto/00_crypto.js2
-rw-r--r--ext/crypto/export_key.rs4
-rw-r--r--ext/fs/interface.rs3
-rw-r--r--ext/http/01_http.js2
-rw-r--r--ext/http/http_next.rs4
-rw-r--r--ext/http/network_buffered_stream.rs2
-rw-r--r--ext/http/slab.rs2
-rw-r--r--ext/io/Cargo.toml2
-rw-r--r--ext/kv/sqlite.rs6
-rw-r--r--ext/napi/function.rs2
-rw-r--r--ext/node/ops/require.rs4
-rw-r--r--ext/node/polyfills/01_require.js2
-rw-r--r--ext/node/polyfills/_fs/_fs_opendir.ts2
-rw-r--r--ext/node/polyfills/internal/fs/handle.ts6
-rw-r--r--ext/node/polyfills/internal_binding/_node.ts2
-rw-r--r--ext/url/00_url.js6
-rw-r--r--ext/web/03_abort_signal.js2
-rw-r--r--ext/web/12_location.js2
-rw-r--r--ext/web/13_message_port.js2
-rw-r--r--ext/web/timers.rs2
-rw-r--r--ext/webidl/00_webidl.js2
-rw-r--r--ext/webidl/internal.d.ts8
23 files changed, 36 insertions, 35 deletions
diff --git a/ext/console/01_console.js b/ext/console/01_console.js
index fbc36ca9c..ddc8daf00 100644
--- a/ext/console/01_console.js
+++ b/ext/console/01_console.js
@@ -1402,7 +1402,7 @@ function formatSet(value, ctx, _ignored, recurseTimes) {
return output;
}
-function formatMap(value, ctx, _gnored, recurseTimes) {
+function formatMap(value, ctx, _ignored, recurseTimes) {
ctx.indentationLvl += 2;
const values = [...new SafeMapIterator(value)];
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js
index c75d3b71d..dadbf4677 100644
--- a/ext/crypto/00_crypto.js
+++ b/ext/crypto/00_crypto.js
@@ -2666,7 +2666,7 @@ function importKeyAES(
TypedArrayPrototypeGetByteLength(keyData) * 8,
)
) {
- throw new DOMException("Invalid key length", "Datarror");
+ throw new DOMException("Invalid key length", "DataError");
}
break;
diff --git a/ext/crypto/export_key.rs b/ext/crypto/export_key.rs
index 13f7357fa..5a8d48ba3 100644
--- a/ext/crypto/export_key.rs
+++ b/ext/crypto/export_key.rs
@@ -130,7 +130,7 @@ fn export_key_rsa(
algorithm: spki::AlgorithmIdentifier {
// rsaEncryption(1)
oid: const_oid::ObjectIdentifier::new_unwrap("1.2.840.113549.1.1.1"),
- // parameters field should not be ommited (None).
+ // parameters field should not be omitted (None).
// It MUST have ASN.1 type NULL.
parameters: Some(asn1::AnyRef::from(asn1::Null)),
},
@@ -158,7 +158,7 @@ fn export_key_rsa(
algorithm: rsa::pkcs8::AlgorithmIdentifier {
// rsaEncryption(1)
oid: rsa::pkcs8::ObjectIdentifier::new_unwrap("1.2.840.113549.1.1.1"),
- // parameters field should not be ommited (None).
+ // parameters field should not be omitted (None).
// It MUST have ASN.1 type NULL as per defined in RFC 3279 Section 2.3.1
parameters: Some(asn1::AnyRef::from(asn1::Null)),
},
diff --git a/ext/fs/interface.rs b/ext/fs/interface.rs
index 7624535c9..14ff54aaa 100644
--- a/ext/fs/interface.rs
+++ b/ext/fs/interface.rs
@@ -96,7 +96,8 @@ pub trait FileSystem: std::fmt::Debug + MaybeSend + MaybeSync {
options: OpenOptions,
) -> FsResult<Rc<dyn File>>;
- fn mkdir_sync(&self, path: &Path, recusive: bool, mode: u32) -> FsResult<()>;
+ fn mkdir_sync(&self, path: &Path, recursive: bool, mode: u32)
+ -> FsResult<()>;
async fn mkdir_async(
&self,
path: PathBuf,
diff --git a/ext/http/01_http.js b/ext/http/01_http.js
index f9a8d2cdb..55c9a77ee 100644
--- a/ext/http/01_http.js
+++ b/ext/http/01_http.js
@@ -293,7 +293,7 @@ function createRespondWith(
if (respBody.locked) {
throw new TypeError("ReadableStream is locked.");
}
- reader = respBody.getReader(); // Aquire JS lock.
+ reader = respBody.getReader(); // Acquire JS lock.
try {
await core.opAsync(
"op_http_write_resource",
diff --git a/ext/http/http_next.rs b/ext/http/http_next.rs
index 92afe1456..d1dfb498c 100644
--- a/ext/http/http_next.rs
+++ b/ext/http/http_next.rs
@@ -97,10 +97,10 @@ static USE_WRITEV: Lazy<bool> = Lazy::new(|| {
/// MUST be followed by a SETTINGS frame (Section 6.5), which MAY be empty.
const HTTP2_PREFIX: &[u8] = b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
-/// ALPN negotation for "h2"
+/// ALPN negotiation for "h2"
const TLS_ALPN_HTTP_2: &[u8] = b"h2";
-/// ALPN negotation for "http/1.1"
+/// ALPN negotiation for "http/1.1"
const TLS_ALPN_HTTP_11: &[u8] = b"http/1.1";
/// Name a trait for streams we can serve HTTP over.
diff --git a/ext/http/network_buffered_stream.rs b/ext/http/network_buffered_stream.rs
index bb128ba04..57b2b5810 100644
--- a/ext/http/network_buffered_stream.rs
+++ b/ext/http/network_buffered_stream.rs
@@ -126,7 +126,7 @@ pub struct NetworkBufferedStream<S: AsyncRead + Unpin> {
}
impl<S: AsyncRead + Unpin> NetworkBufferedStream<S> {
- /// This constructor is private, because passing partically initialized data between the [`NetworkStreamPrefixCheck`] and
+ /// This constructor is private, because passing partially initialized data between the [`NetworkStreamPrefixCheck`] and
/// this [`NetworkBufferedStream`] is challenging without the introduction of extra copies.
fn new(
io: S,
diff --git a/ext/http/slab.rs b/ext/http/slab.rs
index 93a56e9ff..9f7c1f3e9 100644
--- a/ext/http/slab.rs
+++ b/ext/http/slab.rs
@@ -63,7 +63,7 @@ pub fn slab_get(index: SlabId) -> SlabEntry {
unsafe { std::mem::transmute(x.borrow_mut()) }
});
let Some(entry) = lock.get_mut(index as usize) else {
- panic!("HTTP state error: Attemped to access invalid request {} ({} in total available)",
+ panic!("HTTP state error: Attempted to access invalid request {} ({} in total available)",
index,
lock.len())
};
diff --git a/ext/io/Cargo.toml b/ext/io/Cargo.toml
index d98e2318a..d8466660d 100644
--- a/ext/io/Cargo.toml
+++ b/ext/io/Cargo.toml
@@ -8,7 +8,7 @@ edition.workspace = true
license.workspace = true
readme = "README.md"
repository.workspace = true
-description = "IO promitives for Deno extensions"
+description = "IO primitives for Deno extensions"
[lib]
path = "lib.rs"
diff --git a/ext/kv/sqlite.rs b/ext/kv/sqlite.rs
index 6cff3145d..808bf9b4f 100644
--- a/ext/kv/sqlite.rs
+++ b/ext/kv/sqlite.rs
@@ -325,7 +325,7 @@ impl SqliteQueue {
// Oneshot requeue of all inflight messages.
Self::requeue_inflight_messages(conn.clone()).await.unwrap();
- // Continous dequeue loop.
+ // Continuous dequeue loop.
Self::dequeue_loop(conn.clone(), dequeue_tx, shutdown_rx, waker_rx)
.await
.unwrap();
@@ -716,12 +716,12 @@ impl Database for SqliteDb {
}
tx.commit()?;
- let new_vesionstamp = version_to_versionstamp(version);
+ let new_versionstamp = version_to_versionstamp(version);
Ok((
has_enqueues,
Some(CommitResult {
- versionstamp: new_vesionstamp,
+ versionstamp: new_versionstamp,
}),
))
})
diff --git a/ext/napi/function.rs b/ext/napi/function.rs
index f921c4838..49e9a3570 100644
--- a/ext/napi/function.rs
+++ b/ext/napi/function.rs
@@ -43,7 +43,7 @@ extern "C" fn call_fn(info: *const v8::FunctionCallbackInfo) {
if let Some(f) = info.cb {
// SAFETY: calling user provided function pointer.
let value = unsafe { f(info.env, info_ptr as *mut _) };
- // SAFETY: napi_value is reprsented as v8::Local<v8::Value> internally.
+ // SAFETY: napi_value is represented as v8::Local<v8::Value> internally.
rv.set(unsafe { transmute::<napi_value, v8::Local<v8::Value>>(value) });
}
}
diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs
index eb092ab86..87b75c88c 100644
--- a/ext/node/ops/require.rs
+++ b/ext/node/ops/require.rs
@@ -463,12 +463,12 @@ where
{
modules_path
} else {
- let orignal = modules_path.clone();
+ let original = modules_path.clone();
let mod_dir = path_resolve(vec![modules_path, name]);
if fs.is_dir(Path::new(&mod_dir)) {
mod_dir
} else {
- orignal
+ original
}
};
let pkg = node_resolver.load_package_json(
diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js
index 508a32e12..da8e1e3be 100644
--- a/ext/node/polyfills/01_require.js
+++ b/ext/node/polyfills/01_require.js
@@ -874,7 +874,7 @@ Module.prototype.load = function (filename) {
pathDirname(this.filename),
);
const extension = findLongestRegisteredExtension(filename);
- // allow .mjs to be overriden
+ // allow .mjs to be overridden
if (
StringPrototypeEndsWith(filename, ".mjs") && !Module._extensions[".mjs"]
) {
diff --git a/ext/node/polyfills/_fs/_fs_opendir.ts b/ext/node/polyfills/_fs/_fs_opendir.ts
index 494bdb4f0..b936e1ca9 100644
--- a/ext/node/polyfills/_fs/_fs_opendir.ts
+++ b/ext/node/polyfills/_fs/_fs_opendir.ts
@@ -13,7 +13,7 @@ import {
} from "ext:deno_node/internal/validators.mjs";
import { promisify } from "ext:deno_node/internal/util.mjs";
-/** These options aren't funcitonally used right now, as `Dir` doesn't yet support them.
+/** These options aren't functionally used right now, as `Dir` doesn't yet support them.
* However, these values are still validated.
*/
type Options = {
diff --git a/ext/node/polyfills/internal/fs/handle.ts b/ext/node/polyfills/internal/fs/handle.ts
index fbe535840..e04e8e7b7 100644
--- a/ext/node/polyfills/internal/fs/handle.ts
+++ b/ext/node/polyfills/internal/fs/handle.ts
@@ -86,13 +86,13 @@ export class FileHandle extends EventEmitter {
): Promise<WriteResult>;
write(
bufferOrStr: Buffer | string,
- offsetOrPotition: number,
+ offsetOrPosition: number,
lengthOrEncoding: number | string,
position?: number,
): Promise<WriteResult> {
if (bufferOrStr instanceof Buffer) {
const buffer = bufferOrStr;
- const offset = offsetOrPotition;
+ const offset = offsetOrPosition;
const length = lengthOrEncoding;
return new Promise((resolve, reject) => {
@@ -110,7 +110,7 @@ export class FileHandle extends EventEmitter {
});
} else {
const str = bufferOrStr;
- const position = offsetOrPotition;
+ const position = offsetOrPosition;
const encoding = lengthOrEncoding;
return new Promise((resolve, reject) => {
diff --git a/ext/node/polyfills/internal_binding/_node.ts b/ext/node/polyfills/internal_binding/_node.ts
index 47a289dda..f9a873fc2 100644
--- a/ext/node/polyfills/internal_binding/_node.ts
+++ b/ext/node/polyfills/internal_binding/_node.ts
@@ -1,5 +1,5 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-// This file contains C++ node globals accesed in internal binding calls
+// This file contains C++ node globals accessed in internal binding calls
/**
* Adapted from
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index 49dd2c46f..2a238eae1 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -731,14 +731,14 @@ class URL {
get username() {
webidl.assertBranded(this, URLPrototype);
// https://github.com/servo/rust-url/blob/1d307ae51a28fecc630ecec03380788bfb03a643/url/src/lib.rs#L881
- const schemeSeperatorLen = 3; /* :// */
+ const schemeSeparatorLen = 3; /* :// */
if (
this.#hasAuthority() &&
- this.#usernameEnd > this.#schemeEnd + schemeSeperatorLen
+ this.#usernameEnd > this.#schemeEnd + schemeSeparatorLen
) {
return StringPrototypeSlice(
this.#serialization,
- this.#schemeEnd + schemeSeperatorLen,
+ this.#schemeEnd + schemeSeparatorLen,
this.#usernameEnd,
);
} else {
diff --git a/ext/web/03_abort_signal.js b/ext/web/03_abort_signal.js
index 07a274dd2..4c6230e52 100644
--- a/ext/web/03_abort_signal.js
+++ b/ext/web/03_abort_signal.js
@@ -129,7 +129,7 @@ class AbortSignal extends EventTarget {
}
}
- // `addEventListener` and `removeEventListener` have to be overriden in
+ // `addEventListener` and `removeEventListener` have to be overridden in
// order to have the timer block the event loop while there are listeners.
// `[add]` and `[remove]` don't ref and unref the timer because they can
// only be used by Deno internals, which use it to essentially cancel async
diff --git a/ext/web/12_location.js b/ext/web/12_location.js
index 680f3d53b..c612ca743 100644
--- a/ext/web/12_location.js
+++ b/ext/web/12_location.js
@@ -17,7 +17,7 @@ const {
WeakMapPrototypeSet,
} = primordials;
-const locationConstructorKey = Symbol("locationConstuctorKey");
+const locationConstructorKey = Symbol("locationConstructorKey");
// The differences between the definitions of `Location` and `WorkerLocation`
// are because of the `LegacyUnforgeable` attribute only specified upon
diff --git a/ext/web/13_message_port.js b/ext/web/13_message_port.js
index 6d9a2c01f..08f668b2d 100644
--- a/ext/web/13_message_port.js
+++ b/ext/web/13_message_port.js
@@ -123,7 +123,7 @@ class MessagePort extends EventTarget {
}
const { transfer } = options;
if (ArrayPrototypeIncludes(transfer, this)) {
- throw new DOMException("Can not tranfer self", "DataCloneError");
+ throw new DOMException("Can not transfer self", "DataCloneError");
}
const data = serializeJsMessageData(message, transfer);
if (this[_id] === null) return;
diff --git a/ext/web/timers.rs b/ext/web/timers.rs
index 54e185abd..6e0759a98 100644
--- a/ext/web/timers.rs
+++ b/ext/web/timers.rs
@@ -91,7 +91,7 @@ pub async fn op_sleep(
// Windows timer period is 15ms, this means a 100ms timer could fire at 115ms (15% late). We assume that
// timers longer than 100ms are a reasonable cutoff here.
- // The high-res timers on Windows are still limited. Unfortuntely this means that our shortest duration 4ms timers
+ // The high-res timers on Windows are still limited. Unfortunately this means that our shortest duration 4ms timers
// can still be 25% late, but without a more complex timer system or spinning on the clock itself, we're somewhat
// bounded by the OS' scheduler itself.
let _hr_timer_lock = if millis <= 100 {
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js
index 9454dc392..e5726d1f8 100644
--- a/ext/webidl/00_webidl.js
+++ b/ext/webidl/00_webidl.js
@@ -121,7 +121,7 @@ function type(V) {
case "function":
// Falls through
default:
- // Per ES spec, typeof returns an implemention-defined value that is not any of the existing ones for
+ // Per ES spec, typeof returns an implementation-defined value that is not any of the existing ones for
// uncallable non-standard exotic objects. Yet Type() which the Web IDL spec depends on returns Object for
// such cases. So treat the default case as an object.
return "Object";
diff --git a/ext/webidl/internal.d.ts b/ext/webidl/internal.d.ts
index cc4422a27..3e133cc06 100644
--- a/ext/webidl/internal.d.ts
+++ b/ext/webidl/internal.d.ts
@@ -13,24 +13,24 @@ declare module "ext:deno_webidl/00_webidl.js" {
): any;
interface IntConverterOpts {
/**
- * Wether to throw if the number is outside of the acceptable values for
+ * Whether to throw if the number is outside of the acceptable values for
* this type.
*/
enforceRange?: boolean;
/**
- * Wether to clamp this number to the acceptable values for this type.
+ * Whether to clamp this number to the acceptable values for this type.
*/
clamp?: boolean;
}
interface StringConverterOpts {
/**
- * Wether to treat `null` value as an empty string.
+ * Whether to treat `null` value as an empty string.
*/
treatNullAsEmptyString?: boolean;
}
interface BufferConverterOpts {
/**
- * Wether to allow `SharedArrayBuffer` (not just `ArrayBuffer`).
+ * Whether to allow `SharedArrayBuffer` (not just `ArrayBuffer`).
*/
allowShared?: boolean;
}