Skip to content

Commit

Permalink
chore: update deno_lint to 0.46.0 (#19372)
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Jun 5, 2023
1 parent 11dd5a0 commit d54ef02
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 45,7 @@ deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"]
deno_doc = "0.62.0"
deno_emit = "0.20.0"
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_npm.workspace = true
deno_runtime = { workspace = true, features = ["dont_create_runtime_snapshot", "include_js_files_for_snapshotting"] }
Expand Down
2 changes: 2 additions & 0 deletions ext/cache/01_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 128,7 @@ class Cache {
"op_cache_put",
{
cacheId: this[_id],
// deno-lint-ignore prefer-primordials
requestUrl: reqUrl.toString(),
responseHeaders: innerResponse.headerList,
requestHeaders: innerRequest.headerList,
Expand Down Expand Up @@ -243,6 244,7 @@ class Cache {
"op_cache_match",
{
cacheId: this[_id],
// deno-lint-ignore prefer-primordials
requestUrl: url.toString(),
requestHeaders: innerRequest.headerList,
},
Expand Down
3 changes: 2 additions & 1 deletion ext/console/01_console.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 37,7 @@ const {
Error,
ErrorCaptureStackTrace,
ErrorPrototype,
ErrorPrototypeToString,
FunctionPrototypeBind,
FunctionPrototypeCall,
FunctionPrototypeToString,
Expand Down Expand Up @@ -1578,7 1579,7 @@ function inspectError(value, ctx) {
if (stack?.includes("\n at")) {
finalMessage = stack;
} else {
finalMessage = `[${stack || value.toString()}]`;
finalMessage = `[${stack || ErrorPrototypeToString(value)}]`;
}
}
finalMessage = ArrayPrototypeJoin(
Expand Down
3 changes: 2 additions & 1 deletion ext/fetch/21_formdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 31,7 @@ const {
SafeRegExp,
Symbol,
StringFromCharCode,
StringPrototypeCharCodeAt,
StringPrototypeTrim,
StringPrototypeSlice,
StringPrototypeSplit,
Expand Down Expand Up @@ -368,7 369,7 @@ function parseContentDisposition(value) {
function decodeLatin1StringAsUtf8(latin1String) {
const buffer = new Uint8Array(latin1String.length);
for (let i = 0; i < latin1String.length; i ) {
buffer[i] = latin1String.charCodeAt(i);
buffer[i] = StringPrototypeCharCodeAt(latin1String, i);
}
return core.decode(buffer);
}
Expand Down
1 change: 1 addition & 0 deletions ext/fetch/22_body.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 424,7 @@ function extractBody(object) {
ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, object)
) {
// TODO(@satyarohith): not sure what primordial here.
// deno-lint-ignore prefer-primordials
source = object.toString();
contentType = "application/x-www-form-urlencoded;charset=UTF-8";
} else if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, object)) {
Expand Down
6 changes: 4 additions & 2 deletions ext/http/00_serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 37,8 @@ import {
import { listen, TcpConn } from "ext:deno_net/01_net.js";
import { listenTls } from "ext:deno_net/02_tls.js";
const {
ArrayPrototypeFlat,
ArrayPrototypePush,
ObjectPrototypeIsPrototypeOf,
PromisePrototypeCatch,
SafeSet,
Expand Down Expand Up @@ -337,7 339,7 @@ class InnerRequest {
const headers = [];
const reqHeaders = op_http_get_request_headers(this.#slabId);
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;
}
Expand Down Expand Up @@ -575,7 577,7 @@ function mapToCallback(context, callback, onError) {
if (headers.length == 1) {
op_http_set_response_header(req, headers[0][0], headers[0][1]);
} else {
op_http_set_response_headers(req, headers.flat());
op_http_set_response_headers(req, ArrayPrototypeFlat(headers));
}
}

Expand Down
1 change: 1 addition & 0 deletions ext/url/00_url.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 149,7 @@ class URLSearchParams {
if (url === null) {
return;
}
// deno-lint-ignore prefer-primordials
url[_updateUrlSearch](this.toString());
}

Expand Down
1 change: 1 addition & 0 deletions ext/web/06_streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 1261,7 @@ function readableByteStreamControllerEnqueueClonedChunkToQueue(
);
} else {
// TODO(lucacasonato): add SharedArrayBuffer to primordials
// deno-lint-ignore prefer-primordials
cloneResult = buffer.slice(byteOffset, byteOffset byteLength);
}
} catch (e) {
Expand Down
1 change: 1 addition & 0 deletions ext/web/09_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 326,7 @@ class Blob {
relativeStart -= size;
relativeEnd -= size;
} else {
// deno-lint-ignore prefer-primordials
const chunk = part.slice(
relativeStart,
MathMin(part.size, relativeEnd),
Expand Down
1 change: 1 addition & 0 deletions ext/websocket/01_websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 344,7 @@ class WebSocket extends EventTarget {

if (ObjectPrototypeIsPrototypeOf(BlobPrototype, data)) {
PromisePrototypeThen(
// deno-lint-ignore prefer-primordials
data.slice().arrayBuffer(),
(ab) =>
sendTypedArray(
Expand Down
2 changes: 1 addition & 1 deletion third_party

0 comments on commit d54ef02

Please sign in to comment.