1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -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]] [[package]]
name = "deno_node" name = "deno_node"
version = "0.31.0" version = "0.31.1"
dependencies = [ dependencies = [
"aes", "aes",
"cbc", "cbc",
@ -1269,7 +1269,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_url" name = "deno_url"
version = "0.94.0" version = "0.94.1"
dependencies = [ dependencies = [
"deno_bench_util", "deno_bench_util",
"deno_core", "deno_core",
@ -1281,7 +1281,7 @@ dependencies = [
[[package]] [[package]]
name = "deno_web" name = "deno_web"
version = "0.125.0" version = "0.125.1"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base64-simd", "base64-simd",

View file

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

View file

@ -2,7 +2,7 @@
[package] [package]
name = "deno_node" name = "deno_node"
version = "0.31.0" version = "0.31.1"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.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. // core to verify that Unicode characters work in built-ins.
// Refs: https://github.com/nodejs/node/issues/10673 // Refs: https://github.com/nodejs/node/issues/10673
const tableChars = { const tableChars = {
middleMiddle: "", middleMiddle: "\u2500",
rowMiddle: "", rowMiddle: "\u253c",
topRight: "", topRight: "\u2510",
topLeft: "", topLeft: "\u250c",
leftMiddle: "", leftMiddle: "\u251c",
topMiddle: "", topMiddle: "\u252c",
bottomRight: "", bottomRight: "\u2518",
bottomLeft: "", bottomLeft: "\u2514",
bottomMiddle: "", bottomMiddle: "\u2534",
rightMiddle: "", rightMiddle: "\u2524",
left: " ", left: "\u2502 ",
right: " ", right: " \u2502",
middle: " ", middle: " \u2502 ",
}; };
const renderRow = (row: string[], columnWidths: number[]) => { 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 == "lower") segment += "a-z";
else if (value == "print") segment += "\x20-\x7E"; else if (value == "print") segment += "\x20-\x7E";
else if (value == "punct") { else if (value == "punct") {
segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_{|}~"; segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_";
segment += "\u2018";
segment += "{|}~";
} else if (value == "space") segment += "\\s\v"; } else if (value == "space") segment += "\\s\v";
else if (value == "upper") segment += "A-Z"; else if (value == "upper") segment += "A-Z";
else if (value == "word") segment += "\\w"; else if (value == "word") segment += "\\w";

View file

@ -326,7 +326,7 @@ function trim(s) {
return 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 NO_PORT = 65536;
const componentsBuf = new Uint32Array(8); const componentsBuf = new Uint32Array(8);

View file

@ -2,7 +2,7 @@
[package] [package]
name = "deno_url" name = "deno_url"
version = "0.94.0" version = "0.94.1"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.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. // If signal is not null and its aborted flag is set, then return.
return; return;
} else { } 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. // abort steps to it: Remove an event listener.
signal.addEventListener("abort", () => { signal.addEventListener("abort", () => {
self.removeEventListener(type, callback, options); self.removeEventListener(type, callback, options);

View file

@ -58,18 +58,18 @@ class FileReader extends EventTarget {
* @param {{kind: "ArrayBuffer" | "Text" | "DataUrl" | "BinaryString", encoding?: string}} readtype * @param {{kind: "ArrayBuffer" | "Text" | "DataUrl" | "BinaryString", encoding?: string}} readtype
*/ */
#readOperation(blob, 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") { if (this[state] === "loading") {
throw new DOMException( throw new DOMException(
"Invalid FileReader state.", "Invalid FileReader state.",
"InvalidStateError", "InvalidStateError",
); );
} }
// 2. Set frs state to "loading". // 2. Set fr's state to "loading".
this[state] = "loading"; this[state] = "loading";
// 3. Set frs result to null. // 3. Set fr's result to null.
this[result] = null; this[result] = null;
// 4. Set frs error to null. // 4. Set fr's error to null.
this[error] = null; this[error] = null;
// We set this[aborted] to a new object, and keep track of it in a // 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" // TODO(lucacasonato): this is wrong, should be HTML "queue a task"
queueMicrotask(() => { queueMicrotask(() => {
if (abortedState.aborted) return; if (abortedState.aborted) return;
// 1. Set frs state to "done". // 1. Set fr's state to "done".
this[state] = "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( const size = ArrayPrototypeReduce(
chunks, chunks,
(p, i) => p + i.byteLength, (p, i) => p + i.byteLength,
@ -218,7 +218,7 @@ class FileReader extends EventTarget {
this.dispatchEvent(ev); 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. //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") { if (this[state] !== "loading") {
const ev = new ProgressEvent("loadend", { const ev = new ProgressEvent("loadend", {
@ -245,7 +245,7 @@ class FileReader extends EventTarget {
this.dispatchEvent(ev); 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. //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") { if (this[state] !== "loading") {
const ev = new ProgressEvent("loadend", {}); const ev = new ProgressEvent("loadend", {});

View file

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