1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: update ext/ code to only use ASCII (#18371)

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Matt Mastracci 2023-03-22 19:34:14 -06:00 committed by GitHub
parent d06fdf6add
commit f69e4794d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 45 additions and 43 deletions

6
Cargo.lock generated
View file

@ -1144,7 +1144,7 @@ dependencies = [
[[package]]
name = "deno_node"
version = "0.31.0"
version = "0.31.1"
dependencies = [
"aes",
"cbc",
@ -1269,7 +1269,7 @@ dependencies = [
[[package]]
name = "deno_url"
version = "0.94.0"
version = "0.94.1"
dependencies = [
"deno_bench_util",
"deno_core",
@ -1281,7 +1281,7 @@ dependencies = [
[[package]]
name = "deno_web"
version = "0.125.0"
version = "0.125.1"
dependencies = [
"async-trait",
"base64-simd",

View file

@ -150,19 +150,19 @@ function isTypedArray(x) {
}
const tableChars = {
middleMiddle: "",
rowMiddle: "",
topRight: "",
topLeft: "",
leftMiddle: "",
topMiddle: "",
bottomRight: "",
bottomLeft: "",
bottomMiddle: "",
rightMiddle: "",
left: " ",
right: " ",
middle: " ",
middleMiddle: "\u2500",
rowMiddle: "\u253c",
topRight: "\u2510",
topLeft: "\u250c",
leftMiddle: "\u251c",
topMiddle: "\u252c",
bottomRight: "\u2518",
bottomLeft: "\u2514",
bottomMiddle: "\u2534",
rightMiddle: "\u2524",
left: "\u2502 ",
right: " \u2502",
middle: " \u2502 ",
};
function isFullWidthCodePoint(code) {

View file

@ -2,7 +2,7 @@
[package]
name = "deno_node"
version = "0.31.0"
version = "0.31.1"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -9,19 +9,19 @@ import { getStringWidth } from "ext:deno_node/internal/util/inspect.mjs";
// core to verify that Unicode characters work in built-ins.
// Refs: https://github.com/nodejs/node/issues/10673
const tableChars = {
middleMiddle: "",
rowMiddle: "",
topRight: "",
topLeft: "",
leftMiddle: "",
topMiddle: "",
bottomRight: "",
bottomLeft: "",
bottomMiddle: "",
rightMiddle: "",
left: " ",
right: " ",
middle: " ",
middleMiddle: "\u2500",
rowMiddle: "\u253c",
topRight: "\u2510",
topLeft: "\u250c",
leftMiddle: "\u251c",
topMiddle: "\u252c",
bottomRight: "\u2518",
bottomLeft: "\u2514",
bottomMiddle: "\u2534",
rightMiddle: "\u2524",
left: "\u2502 ",
right: " \u2502",
middle: " \u2502 ",
};
const renderRow = (row: string[], columnWidths: number[]) => {

View file

@ -187,7 +187,9 @@ export function globToRegExp(
else if (value == "lower") segment += "a-z";
else if (value == "print") segment += "\x20-\x7E";
else if (value == "punct") {
segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_{|}~";
segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_";
segment += "\u2018";
segment += "{|}~";
} else if (value == "space") segment += "\\s\v";
else if (value == "upper") segment += "A-Z";
else if (value == "word") segment += "\\w";

View file

@ -326,7 +326,7 @@ function trim(s) {
return s;
}
// Represents a "no port" value. A port in URL cannot be greater than 2^16 1
// Represents a "no port" value. A port in URL cannot be greater than 2^16 - 1
const NO_PORT = 65536;
const componentsBuf = new Uint32Array(8);

View file

@ -2,7 +2,7 @@
[package]
name = "deno_url"
version = "0.94.0"
version = "0.94.1"
authors.workspace = true
edition.workspace = true
license.workspace = true

View file

@ -996,7 +996,7 @@ class EventTarget {
// If signal is not null and its aborted flag is set, then return.
return;
} else {
// If listeners signal is not null, then add the following abort
// If listener's signal is not null, then add the following abort
// abort steps to it: Remove an event listener.
signal.addEventListener("abort", () => {
self.removeEventListener(type, callback, options);

View file

@ -58,18 +58,18 @@ class FileReader extends EventTarget {
* @param {{kind: "ArrayBuffer" | "Text" | "DataUrl" | "BinaryString", encoding?: string}} readtype
*/
#readOperation(blob, readtype) {
// 1. If frs state is "loading", throw an InvalidStateError DOMException.
// 1. If fr's state is "loading", throw an InvalidStateError DOMException.
if (this[state] === "loading") {
throw new DOMException(
"Invalid FileReader state.",
"InvalidStateError",
);
}
// 2. Set frs state to "loading".
// 2. Set fr's state to "loading".
this[state] = "loading";
// 3. Set frs result to null.
// 3. Set fr's result to null.
this[result] = null;
// 4. Set frs error to null.
// 4. Set fr's error to null.
this[error] = null;
// We set this[aborted] to a new object, and keep track of it in a
@ -146,9 +146,9 @@ class FileReader extends EventTarget {
// TODO(lucacasonato): this is wrong, should be HTML "queue a task"
queueMicrotask(() => {
if (abortedState.aborted) return;
// 1. Set frs state to "done".
// 1. Set fr's state to "done".
this[state] = "done";
// 2. Let result be the result of package data given bytes, type, blobs type, and encodingName.
// 2. Let result be the result of package data given bytes, type, blob's type, and encodingName.
const size = ArrayPrototypeReduce(
chunks,
(p, i) => p + i.byteLength,
@ -218,7 +218,7 @@ class FileReader extends EventTarget {
this.dispatchEvent(ev);
}
// 5. If frs state is not "loading", fire a progress event called loadend at the fr.
// 5. If fr's state is not "loading", fire a progress event called loadend at the fr.
//Note: Event handler for the load or error events could have started another load, if that happens the loadend event for this load is not fired.
if (this[state] !== "loading") {
const ev = new ProgressEvent("loadend", {
@ -245,7 +245,7 @@ class FileReader extends EventTarget {
this.dispatchEvent(ev);
}
//If frs state is not "loading", fire a progress event called loadend at fr.
//If fr's state is not "loading", fire a progress event called loadend at fr.
//Note: Event handler for the error event could have started another load, if that happens the loadend event for this load is not fired.
if (this[state] !== "loading") {
const ev = new ProgressEvent("loadend", {});

View file

@ -2,7 +2,7 @@
[package]
name = "deno_web"
version = "0.125.0"
version = "0.125.1"
authors.workspace = true
edition.workspace = true
license.workspace = true