From 385a7e271903a839606913e8162a99694904f258 Mon Sep 17 00:00:00 2001 From: Alisue Date: Sat, 21 May 2022 15:11:51 +0900 Subject: [PATCH 1/2] Update dependencies --- denops/@denops-private/cli.ts | 2 +- denops/@denops-private/host/nvim.ts | 2 +- denops/@denops-private/service.ts | 4 ++-- denops/@denops-private/worker/script.ts | 6 +++--- denops/@denops/impl.ts | 2 +- denops/@denops/test.ts | 4 ++-- denops/@denops/test/bypass/cli.ts | 4 ++-- denops/@denops/test/tester.ts | 6 +++--- denops/@denops/test/tester_test.ts | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/denops/@denops-private/cli.ts b/denops/@denops-private/cli.ts index 15c699c5..0e155cc5 100644 --- a/denops/@denops-private/cli.ts +++ b/denops/@denops-private/cli.ts @@ -1,4 +1,4 @@ -import { parse } from "https://deno.land/std@0.127.0/flags/mod.ts"; +import { parse } from "https://deno.land/std@0.140.0/flags/mod.ts"; import { using } from "https://deno.land/x/disposable@v1.0.2/mod.ts#^"; import { Service } from "./service.ts"; import { Vim } from "./host/vim.ts"; diff --git a/denops/@denops-private/host/nvim.ts b/denops/@denops-private/host/nvim.ts index 2c4fb938..59963d82 100644 --- a/denops/@denops-private/host/nvim.ts +++ b/denops/@denops-private/host/nvim.ts @@ -2,7 +2,7 @@ import { assertArray, assertString, } from "https://deno.land/x/unknownutil@v2.0.0/mod.ts#^"; -import { Session } from "https://deno.land/x/msgpack_rpc@v3.1.4/mod.ts#^"; +import { Session } from "https://deno.land/x/msgpack_rpc@v3.1.6/mod.ts#^"; import { responseTimeout } from "../defs.ts"; import { Invoker, isInvokerMethod } from "./invoker.ts"; import { Host } from "./base.ts"; diff --git a/denops/@denops-private/service.ts b/denops/@denops-private/service.ts index bcc4f5eb..89f08aba 100644 --- a/denops/@denops-private/service.ts +++ b/denops/@denops-private/service.ts @@ -8,11 +8,11 @@ import { Dispatcher as SessionDispatcher, Session, SessionOptions, -} from "https://deno.land/x/msgpack_rpc@v3.1.4/mod.ts#^"; +} from "https://deno.land/x/msgpack_rpc@v3.1.6/mod.ts#^"; import { WorkerReader, WorkerWriter, -} from "https://deno.land/x/workerio@v1.4.3/mod.ts#^"; +} from "https://deno.land/x/workerio@v1.4.4/mod.ts#^"; import { responseTimeout } from "./defs.ts"; import { Host } from "./host/base.ts"; import { Invoker, RegisterOptions } from "./host/invoker.ts"; diff --git a/denops/@denops-private/worker/script.ts b/denops/@denops-private/worker/script.ts index 25fd620d..87012956 100644 --- a/denops/@denops-private/worker/script.ts +++ b/denops/@denops-private/worker/script.ts @@ -1,16 +1,16 @@ -import { toFileUrl } from "https://deno.land/std@0.127.0/path/mod.ts"; +import { toFileUrl } from "https://deno.land/std@0.140.0/path/mod.ts"; import { assertObject, assertString, isObject, isString, } from "https://deno.land/x/unknownutil@v2.0.0/mod.ts#^"; -import { Session } from "https://deno.land/x/msgpack_rpc@v3.1.4/mod.ts#^"; +import { Session } from "https://deno.land/x/msgpack_rpc@v3.1.6/mod.ts#^"; import { using } from "https://deno.land/x/disposable@v1.0.2/mod.ts#^"; import { WorkerReader, WorkerWriter, -} from "https://deno.land/x/workerio@v1.4.3/mod.ts#^"; +} from "https://deno.land/x/workerio@v1.4.4/mod.ts#^"; import { responseTimeout } from "../defs.ts"; import type { Denops, Meta } from "../../@denops/mod.ts"; import { DenopsImpl } from "../../@denops/impl.ts"; diff --git a/denops/@denops/impl.ts b/denops/@denops/impl.ts index e02b1a19..56cced41 100644 --- a/denops/@denops/impl.ts +++ b/denops/@denops/impl.ts @@ -1,4 +1,4 @@ -import type { Session } from "https://deno.land/x/msgpack_rpc@v3.1.4/mod.ts#^"; +import type { Session } from "https://deno.land/x/msgpack_rpc@v3.1.6/mod.ts#^"; import { BatchError, Context, Denops, Dispatcher, Meta } from "./mod.ts"; export class DenopsImpl implements Denops { diff --git a/denops/@denops/test.ts b/denops/@denops/test.ts index b58a918c..dc616eb9 100644 --- a/denops/@denops/test.ts +++ b/denops/@denops/test.ts @@ -1,8 +1,8 @@ -import * as path from "https://deno.land/std@0.127.0/path/mod.ts"; +import * as path from "https://deno.land/std@0.140.0/path/mod.ts"; import { assertEquals, assertRejects, -} from "https://deno.land/std@0.127.0/testing/asserts.ts"; +} from "https://deno.land/std@0.140.0/testing/asserts.ts"; import { test } from "./test/tester.ts"; import { BatchError } from "./mod.ts"; diff --git a/denops/@denops/test/bypass/cli.ts b/denops/@denops/test/bypass/cli.ts index 9dc22384..a15f3be7 100644 --- a/denops/@denops/test/bypass/cli.ts +++ b/denops/@denops/test/bypass/cli.ts @@ -1,8 +1,8 @@ -import { copy } from "https://deno.land/std@0.127.0/streams/conversion.ts"; +import { copy } from "https://deno.land/std@0.140.0/streams/conversion.ts"; import { WorkerReader, WorkerWriter, -} from "https://deno.land/x/workerio@v1.4.3/mod.ts#^"; +} from "https://deno.land/x/workerio@v1.4.4/mod.ts#^"; const worker = self as unknown as Worker; const reader = new WorkerReader(worker); diff --git a/denops/@denops/test/tester.ts b/denops/@denops/test/tester.ts index 6b661b63..c4d3e575 100644 --- a/denops/@denops/test/tester.ts +++ b/denops/@denops/test/tester.ts @@ -1,7 +1,7 @@ -import * as path from "https://deno.land/std@0.127.0/path/mod.ts"; -import { Session } from "https://deno.land/x/msgpack_rpc@v3.1.4/mod.ts#^"; +import * as path from "https://deno.land/std@0.140.0/path/mod.ts"; +import { Session } from "https://deno.land/x/msgpack_rpc@v3.1.6/mod.ts#^"; import { using } from "https://deno.land/x/disposable@v1.0.2/mod.ts#^"; -import { deadline } from "https://deno.land/std@0.127.0/async/mod.ts"; +import { deadline } from "https://deno.land/std@0.140.0/async/mod.ts"; import type { Denops, Meta } from "../mod.ts"; import { DenopsImpl } from "../impl.ts"; import { DENOPS_TEST_NVIM, DENOPS_TEST_VIM, run } from "./runner.ts"; diff --git a/denops/@denops/test/tester_test.ts b/denops/@denops/test/tester_test.ts index a7409d2e..fe424f3b 100644 --- a/denops/@denops/test/tester_test.ts +++ b/denops/@denops/test/tester_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "https://deno.land/std@0.127.0/testing/asserts.ts"; +import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts"; import { test } from "./tester.ts"; test( From dfb21c42f0372a2f1bee31342eda292d3e42590e Mon Sep 17 00:00:00 2001 From: Alisue Date: Sat, 21 May 2022 15:33:50 +0900 Subject: [PATCH 2/2] Fix type error on Deno v1.22.0 --- denops/@denops-private/service.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/denops/@denops-private/service.ts b/denops/@denops-private/service.ts index 89f08aba..4d35f3a8 100644 --- a/denops/@denops-private/service.ts +++ b/denops/@denops-private/service.ts @@ -1,3 +1,4 @@ +import { compareVersions } from "https://deno.land/x/compare_versions@0.4.0/mod.ts#^"; import { assertArray, assertString, @@ -20,6 +21,13 @@ import type { Meta } from "../@denops/mod.ts"; const workerScript = "./worker/script.ts"; +// Prior to Deno v1.22.0, `Deno` namespace is not available on Worker +// https://deno.com/blog/v1.22#deno-namespace-is-available-in-workers-by-default +// deno-lint-ignore no-explicit-any +const workerOptions: any = compareVersions(Deno.version.deno, "1.22.0") === -1 + ? { deno: { namespace: true } } + : {}; + /** * Service manage plugins and is visible from the host (Vim/Neovim) through `invoke()` function. */ @@ -62,9 +70,7 @@ export class Service implements ServiceApi { { name, type: "module", - deno: { - namespace: true, - }, + ...workerOptions, }, ); worker.postMessage({ name, script, meta });