1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 08:39:09 -05:00

chore: update deno_lint to 0.46.0 (#19372)

This commit is contained in:
Kenta Moriuchi 2023-06-06 04:57:01 +09:00 committed by Bartek Iwańczuk
parent a60914c17c
commit fb6b518d4d
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750
12 changed files with 19 additions and 8 deletions

4
Cargo.lock generated
View file

@ -1101,9 +1101,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_lint" name = "deno_lint"
version = "0.45.0" version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3867178bfb6579aaf9ed79599d3181d134f13dfcd38fdd93cae7d53a37bece8d" checksum = "afc515e82ae97f2cc562ec482251700e96570c8fde997579629f4666e70066d7"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"deno_ast", "deno_ast",

View file

@ -45,7 +45,7 @@ deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"]
deno_doc = "0.62.0" deno_doc = "0.62.0"
deno_emit = "0.20.0" deno_emit = "0.20.0"
deno_graph = "=0.48.1" deno_graph = "=0.48.1"
deno_lint = { version = "0.45.0", features = ["docs"] } deno_lint = { version = "0.46.0", features = ["docs"] }
deno_lockfile.workspace = true deno_lockfile.workspace = true
deno_npm.workspace = true deno_npm.workspace = true
deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "include_js_files_for_snapshotting"] } deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "include_js_files_for_snapshotting"] }

View file

@ -128,6 +128,7 @@ class Cache {
"op_cache_put", "op_cache_put",
{ {
cacheId: this[_id], cacheId: this[_id],
// deno-lint-ignore prefer-primordials
requestUrl: reqUrl.toString(), requestUrl: reqUrl.toString(),
responseHeaders: innerResponse.headerList, responseHeaders: innerResponse.headerList,
requestHeaders: innerRequest.headerList, requestHeaders: innerRequest.headerList,
@ -243,6 +244,7 @@ class Cache {
"op_cache_match", "op_cache_match",
{ {
cacheId: this[_id], cacheId: this[_id],
// deno-lint-ignore prefer-primordials
requestUrl: url.toString(), requestUrl: url.toString(),
requestHeaders: innerRequest.headerList, requestHeaders: innerRequest.headerList,
}, },

View file

@ -37,6 +37,7 @@ const {
Error, Error,
ErrorCaptureStackTrace, ErrorCaptureStackTrace,
ErrorPrototype, ErrorPrototype,
ErrorPrototypeToString,
FunctionPrototypeBind, FunctionPrototypeBind,
FunctionPrototypeCall, FunctionPrototypeCall,
FunctionPrototypeToString, FunctionPrototypeToString,
@ -1578,7 +1579,7 @@ function inspectError(value, ctx) {
if (stack?.includes("\n at")) { if (stack?.includes("\n at")) {
finalMessage += stack; finalMessage += stack;
} else { } else {
finalMessage += `[${stack || value.toString()}]`; finalMessage += `[${stack || ErrorPrototypeToString(value)}]`;
} }
} }
finalMessage += ArrayPrototypeJoin( finalMessage += ArrayPrototypeJoin(

View file

@ -31,6 +31,7 @@ const {
SafeRegExp, SafeRegExp,
Symbol, Symbol,
StringFromCharCode, StringFromCharCode,
StringPrototypeCharCodeAt,
StringPrototypeTrim, StringPrototypeTrim,
StringPrototypeSlice, StringPrototypeSlice,
StringPrototypeSplit, StringPrototypeSplit,
@ -368,7 +369,7 @@ function parseContentDisposition(value) {
function decodeLatin1StringAsUtf8(latin1String) { function decodeLatin1StringAsUtf8(latin1String) {
const buffer = new Uint8Array(latin1String.length); const buffer = new Uint8Array(latin1String.length);
for (let i = 0; i < latin1String.length; i++) { for (let i = 0; i < latin1String.length; i++) {
buffer[i] = latin1String.charCodeAt(i); buffer[i] = StringPrototypeCharCodeAt(latin1String, i);
} }
return core.decode(buffer); return core.decode(buffer);
} }

View file

@ -424,6 +424,7 @@ function extractBody(object) {
ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, object) ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, object)
) { ) {
// TODO(@satyarohith): not sure what primordial here. // TODO(@satyarohith): not sure what primordial here.
// deno-lint-ignore prefer-primordials
source = object.toString(); source = object.toString();
contentType = "application/x-www-form-urlencoded;charset=UTF-8"; contentType = "application/x-www-form-urlencoded;charset=UTF-8";
} else if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, object)) { } else if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, object)) {

View file

@ -37,6 +37,8 @@ import {
import { listen, TcpConn } from "ext:deno_net/01_net.js"; import { listen, TcpConn } from "ext:deno_net/01_net.js";
import { listenTls } from "ext:deno_net/02_tls.js"; import { listenTls } from "ext:deno_net/02_tls.js";
const { const {
ArrayPrototypeFlat,
ArrayPrototypePush,
ObjectPrototypeIsPrototypeOf, ObjectPrototypeIsPrototypeOf,
PromisePrototypeCatch, PromisePrototypeCatch,
SafeSet, SafeSet,
@ -337,7 +339,7 @@ class InnerRequest {
const headers = []; const headers = [];
const reqHeaders = op_http_get_request_headers(this.#slabId); const reqHeaders = op_http_get_request_headers(this.#slabId);
for (let i = 0; i < reqHeaders.length; i += 2) { for (let i = 0; i < reqHeaders.length; i += 2) {
headers.push([reqHeaders[i], reqHeaders[i + 1]]); ArrayPrototypePush(headers, [reqHeaders[i], reqHeaders[i + 1]]);
} }
return headers; return headers;
} }
@ -575,7 +577,7 @@ function mapToCallback(context, callback, onError) {
if (headers.length == 1) { if (headers.length == 1) {
op_http_set_response_header(req, headers[0][0], headers[0][1]); op_http_set_response_header(req, headers[0][0], headers[0][1]);
} else { } else {
op_http_set_response_headers(req, headers.flat()); op_http_set_response_headers(req, ArrayPrototypeFlat(headers));
} }
} }

View file

@ -149,6 +149,7 @@ class URLSearchParams {
if (url === null) { if (url === null) {
return; return;
} }
// deno-lint-ignore prefer-primordials
url[_updateUrlSearch](this.toString()); url[_updateUrlSearch](this.toString());
} }

View file

@ -1261,6 +1261,7 @@ function readableByteStreamControllerEnqueueClonedChunkToQueue(
); );
} else { } else {
// TODO(lucacasonato): add SharedArrayBuffer to primordials // TODO(lucacasonato): add SharedArrayBuffer to primordials
// deno-lint-ignore prefer-primordials
cloneResult = buffer.slice(byteOffset, byteOffset + byteLength); cloneResult = buffer.slice(byteOffset, byteOffset + byteLength);
} }
} catch (e) { } catch (e) {

View file

@ -326,6 +326,7 @@ class Blob {
relativeStart -= size; relativeStart -= size;
relativeEnd -= size; relativeEnd -= size;
} else { } else {
// deno-lint-ignore prefer-primordials
const chunk = part.slice( const chunk = part.slice(
relativeStart, relativeStart,
MathMin(part.size, relativeEnd), MathMin(part.size, relativeEnd),

View file

@ -344,6 +344,7 @@ class WebSocket extends EventTarget {
if (ObjectPrototypeIsPrototypeOf(BlobPrototype, data)) { if (ObjectPrototypeIsPrototypeOf(BlobPrototype, data)) {
PromisePrototypeThen( PromisePrototypeThen(
// deno-lint-ignore prefer-primordials
data.slice().arrayBuffer(), data.slice().arrayBuffer(),
(ab) => (ab) =>
sendTypedArray( sendTypedArray(

@ -1 +1 @@
Subproject commit ee59830ca23fd0aa423a3905005835c586e73e77 Subproject commit 7882a6c7763efbda55318e019b239bec7704765f