From 42f88a224a28d9a82405ea77616027acb3a6d1b9 Mon Sep 17 00:00:00 2001 From: Milly Date: Sun, 19 Oct 2025 09:24:57 +0900 Subject: [PATCH 1/2] :package: Upgrade @denops/core to ^8.0.1 --- deno.jsonc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deno.jsonc b/deno.jsonc index 1322df6c..266a1320 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -37,7 +37,7 @@ "imports": { "@core/asyncutil": "jsr:@core/asyncutil@^1.2.0", "@core/unknownutil": "jsr:@core/unknownutil@^4.3.0", - "@denops/core": "jsr:@denops/core@^8.0.0", + "@denops/core": "jsr:@denops/core@^8.0.1", "@denops/test": "jsr:@denops/test@^4.0.0", "@lambdalisue/errorutil": "jsr:@lambdalisue/errorutil@^1.1.1", "@lambdalisue/itertools": "jsr:@lambdalisue/itertools@^1.1.2", From fcabe6cb1036e5828622d20fc2a732ba986e81b5 Mon Sep 17 00:00:00 2001 From: Milly Date: Sun, 19 Oct 2025 09:26:20 +0900 Subject: [PATCH 2/2] :+1: Use Call type from @denops/core v8.0.1 Apply the new `Call` type introduced in @denops/core v8.0.1 (PR #16). This replaces the duplicated tuple type `[string, ...unknown[]]` with the standardized `Call` type, improving type consistency and maintainability across the codebase. Related: https://github.com/vim-denops/deno-denops-core/pull/16 --- batch/batch.ts | 8 ++++---- batch/collect.ts | 8 ++++---- eval/use_eval.ts | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/batch/batch.ts b/batch/batch.ts index f85fb917..e650a0e7 100644 --- a/batch/batch.ts +++ b/batch/batch.ts @@ -1,10 +1,10 @@ -import type { Context, Denops, Dispatcher, Meta } from "@denops/core"; +import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core"; type Redraw = undefined | boolean; class BatchHelper implements Denops { #denops: Denops; - #calls: [string, ...unknown[]][]; + #calls: Call[]; #redraw: Redraw; #closed: boolean; @@ -14,7 +14,7 @@ class BatchHelper implements Denops { this.#closed = false; } - static getCalls(helper: BatchHelper): [string, ...unknown[]][] { + static getCalls(helper: BatchHelper): Call[] { return helper.#calls; } @@ -64,7 +64,7 @@ class BatchHelper implements Denops { return Promise.resolve(); } - batch(...calls: [string, ...unknown[]][]): Promise { + batch(...calls: Call[]): Promise { if (this.#closed) { return this.#denops.batch(...calls); } diff --git a/batch/collect.ts b/batch/collect.ts index 8fb07f8d..0014919f 100644 --- a/batch/collect.ts +++ b/batch/collect.ts @@ -1,4 +1,4 @@ -import type { Context, Denops, Dispatcher, Meta } from "@denops/core"; +import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core"; type VimVoid = T extends void ? 0 : T; @@ -8,7 +8,7 @@ type Collect = { class CollectHelper implements Denops { #denops: Denops; - #calls: [string, ...unknown[]][]; + #calls: Call[]; #closed: boolean; constructor(denops: Denops) { @@ -17,7 +17,7 @@ class CollectHelper implements Denops { this.#closed = false; } - static getCalls(helper: CollectHelper): [string, ...unknown[]][] { + static getCalls(helper: CollectHelper): Call[] { return helper.#calls; } @@ -63,7 +63,7 @@ class CollectHelper implements Denops { return Promise.resolve(); } - batch(..._calls: [string, ...unknown[]][]): Promise { + batch(..._calls: Call[]): Promise { throw new Error("The 'batch' method is not available on CollectHelper."); } diff --git a/eval/use_eval.ts b/eval/use_eval.ts index a15e35a0..ee275ed9 100644 --- a/eval/use_eval.ts +++ b/eval/use_eval.ts @@ -4,7 +4,7 @@ * @module */ -import type { Context, Denops, Dispatcher, Meta } from "@denops/core"; +import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core"; import { isString } from "@core/unknownutil/is/string"; import { isUndefined } from "@core/unknownutil/is/undefined"; import { ulid } from "@std/ulid"; @@ -105,11 +105,11 @@ class UseEvalHelper implements Denops { ); } - async batch(...calls: [string, ...unknown[]][]): Promise { + async batch(...calls: Call[]): Promise { const suffix = await ensurePrerequisites(this.#denops); const callHelper = `DenopsStd_Eval_UseEval_Call_${suffix}`; return await this.#denops.batch( - ...calls.map(([fn, ...args]): [string, ...unknown[]] => [ + ...calls.map(([fn, ...args]): Call => [ callHelper, fn, stringify(trimEndOfArgs(args)),