summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-01-17 01:17:18 +0900
committerGitHub <noreply@github.com>2023-01-16 17:17:18 +0100
commit6da958d7ec31f2ffd21bb2beb8cc193a62afc55c (patch)
tree348fb3669348653b3907068b9ddc00f2652bdbfa /runtime/js
parent40134ffc99848c89e0ab88c03ca85b9122e2384b (diff)
chore: update dlint to v0.37.0 for GitHub Actions (#17295)
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/01_build.js6
-rw-r--r--runtime/js/11_workers.js2
-rw-r--r--runtime/js/30_fs.js20
-rw-r--r--runtime/js/40_spawn.js2
4 files changed, 17 insertions, 13 deletions
diff --git a/runtime/js/01_build.js b/runtime/js/01_build.js
index 23a1c819b..778331cdd 100644
--- a/runtime/js/01_build.js
+++ b/runtime/js/01_build.js
@@ -13,7 +13,11 @@
};
function setBuildInfo(target) {
- const [arch, vendor, os, env] = StringPrototypeSplit(target, "-", 4);
+ const { 0: arch, 1: vendor, 2: os, 3: env } = StringPrototypeSplit(
+ target,
+ "-",
+ 4,
+ );
build.target = target;
build.arch = arch;
build.vendor = vendor;
diff --git a/runtime/js/11_workers.js b/runtime/js/11_workers.js
index fa544a510..85c01e1a9 100644
--- a/runtime/js/11_workers.js
+++ b/runtime/js/11_workers.js
@@ -139,7 +139,7 @@
#pollControl = async () => {
while (this.#status === "RUNNING") {
- const [type, data] = await hostRecvCtrl(this.#id);
+ const { 0: type, 1: data } = await hostRecvCtrl(this.#id);
// If terminate was called then we ignore all messages
if (this.#status === "TERMINATED") {
diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js
index 770cef1a8..87b2015fb 100644
--- a/runtime/js/30_fs.js
+++ b/runtime/js/30_fs.js
@@ -213,7 +213,7 @@
'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux"; return {';
const typeEntries = ObjectEntries(types);
for (let i = 0; i < typeEntries.length; ++i) {
- let [name, type] = typeEntries[i];
+ let { 0: name, 1: type } = typeEntries[i];
const optional = type.startsWith("?");
if (optional) type = type.slice(1);
@@ -243,7 +243,7 @@
return [new Function("view", str), new Uint32Array(offset)];
}
- const [statStruct, statBuf] = createByteStruct({
+ const { 0: statStruct, 1: statBuf } = createByteStruct({
isFile: "bool",
isDirectory: "bool",
isSymlink: "bool",
@@ -392,8 +392,8 @@
atime,
mtime,
) {
- const [atimeSec, atimeNsec] = toUnixTimeFromEpoch(atime);
- const [mtimeSec, mtimeNsec] = toUnixTimeFromEpoch(mtime);
+ const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime);
+ const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime);
ops.op_futime_sync(rid, atimeSec, atimeNsec, mtimeSec, mtimeNsec);
}
@@ -402,8 +402,8 @@
atime,
mtime,
) {
- const [atimeSec, atimeNsec] = toUnixTimeFromEpoch(atime);
- const [mtimeSec, mtimeNsec] = toUnixTimeFromEpoch(mtime);
+ const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime);
+ const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime);
await core.opAsync(
"op_futime_async",
rid,
@@ -419,8 +419,8 @@
atime,
mtime,
) {
- const [atimeSec, atimeNsec] = toUnixTimeFromEpoch(atime);
- const [mtimeSec, mtimeNsec] = toUnixTimeFromEpoch(mtime);
+ const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime);
+ const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime);
ops.op_utime_sync(
pathFromURL(path),
atimeSec,
@@ -435,8 +435,8 @@
atime,
mtime,
) {
- const [atimeSec, atimeNsec] = toUnixTimeFromEpoch(atime);
- const [mtimeSec, mtimeNsec] = toUnixTimeFromEpoch(mtime);
+ const { 0: atimeSec, 1: atimeNsec } = toUnixTimeFromEpoch(atime);
+ const { 0: mtimeSec, 1: mtimeNsec } = toUnixTimeFromEpoch(mtime);
await core.opAsync(
"op_utime_async",
pathFromURL(path),
diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js
index de733d7eb..9c1d96a28 100644
--- a/runtime/js/40_spawn.js
+++ b/runtime/js/40_spawn.js
@@ -172,7 +172,7 @@
);
}
- const [status, stdout, stderr] = await SafePromiseAll([
+ const { 0: status, 1: stdout, 2: stderr } = await SafePromiseAll([
this.#status,
collectOutput(this.#stdout),
collectOutput(this.#stderr),