From 166de2e5866978bab067ab90334e6ace92df907e Mon Sep 17 00:00:00 2001 From: Alisue Date: Mon, 29 Sep 2025 02:46:38 +0900 Subject: [PATCH 1/7] :package: Upgrade Denops to v8 --- denops.ts | 2 +- plugin.ts | 2 +- stub.ts | 2 +- stub_test.ts | 2 +- tester.ts | 2 +- with.ts | 2 +- with_test.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/denops.ts b/denops.ts index 396ecdc..7917e75 100644 --- a/denops.ts +++ b/denops.ts @@ -3,7 +3,7 @@ import type { Denops, Dispatcher, Meta, -} from "jsr:@denops/core@^7.0.0"; +} from "jsr:@denops/core@^8.0.0"; import type { Client } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1"; export class DenopsImpl implements Denops { diff --git a/plugin.ts b/plugin.ts index baaa25f..1b0b465 100644 --- a/plugin.ts +++ b/plugin.ts @@ -1,4 +1,4 @@ -import type { Denops } from "jsr:@denops/core@^7.0.0"; +import type { Denops } from "jsr:@denops/core@^8.0.0"; import { as, assert, ensure, is } from "jsr:@core/unknownutil@^4.0.0"; import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1"; import { errorDeserializer, errorSerializer } from "./error.ts"; diff --git a/stub.ts b/stub.ts index 0f7bd66..d35b047 100644 --- a/stub.ts +++ b/stub.ts @@ -3,7 +3,7 @@ import type { Denops, Dispatcher, Meta, -} from "jsr:@denops/core@^7.0.0"; +} from "jsr:@denops/core@^8.0.0"; /** * Represents a stubber object for `Denops`. diff --git a/stub_test.ts b/stub_test.ts index df0829a..84d52f9 100644 --- a/stub_test.ts +++ b/stub_test.ts @@ -1,6 +1,6 @@ import { assertSpyCall, spy } from "jsr:@std/testing@^1.0.0/mock"; import { assertEquals } from "jsr:@std/assert@^1.0.0"; -import type { Denops } from "jsr:@denops/core@^7.0.0"; +import type { Denops } from "jsr:@denops/core@^8.0.0"; import { DenopsStub } from "./stub.ts"; Deno.test("`DenopsStub`", async (t) => { diff --git a/tester.ts b/tester.ts index aff8f9f..b6e7ee3 100644 --- a/tester.ts +++ b/tester.ts @@ -1,5 +1,5 @@ import { sample } from "jsr:@std/collections@^1.0.5/sample"; -import type { Denops } from "jsr:@denops/core@^7.0.0"; +import type { Denops } from "jsr:@denops/core@^8.0.0"; import type { RunMode } from "./runner.ts"; import { withDenops } from "./with.ts"; diff --git a/with.ts b/with.ts index 0cc8672..cb2deba 100644 --- a/with.ts +++ b/with.ts @@ -1,7 +1,7 @@ import { deadline } from "jsr:@std/async@^1.0.0/deadline"; import { assert, is } from "jsr:@core/unknownutil@^4.0.0"; import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.1.1"; -import type { Denops, Meta } from "jsr:@denops/core@^7.0.0"; +import type { Denops, Meta } from "jsr:@denops/core@^8.0.0"; import { getConfig } from "./conf.ts"; import { run, type RunMode } from "./runner.ts"; import { DenopsImpl } from "./denops.ts"; diff --git a/with_test.ts b/with_test.ts index cc49e68..02f37b1 100644 --- a/with_test.ts +++ b/with_test.ts @@ -6,7 +6,7 @@ import { assertRejects, } from "jsr:@std/assert@^1.0.0"; import { assertSpyCalls, spy, stub } from "jsr:@std/testing@^1.0.0/mock"; -import type { Denops } from "jsr:@denops/core@^7.0.0"; +import type { Denops } from "jsr:@denops/core@^8.0.0"; import { withDenops } from "./with.ts"; Deno.test("test(mode:vim) start vim to test denops features", async () => { From faa979efad7641c87e7a309fc5fe9ca7612189b5 Mon Sep 17 00:00:00 2001 From: Alisue Date: Mon, 29 Sep 2025 02:52:25 +0900 Subject: [PATCH 2/7] :coffee: Follow Denops v8 requirements --- .github/workflows/jsr.yml | 6 +++--- .github/workflows/test.yml | 26 +++++++------------------- README.md | 16 ++++++++-------- deno.jsonc | 24 +++++++----------------- 4 files changed, 25 insertions(+), 47 deletions(-) diff --git a/.github/workflows/jsr.yml b/.github/workflows/jsr.yml index 2de3f3a..be42ca4 100644 --- a/.github/workflows/jsr.yml +++ b/.github/workflows/jsr.yml @@ -1,7 +1,7 @@ name: jsr env: - DENO_VERSION: 1.x + DENO_VERSION: 2.x on: push: @@ -19,9 +19,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: ${{ env.DENO_VERSION }} - name: Publish run: | - deno run -A jsr:@david/publish-on-tag@0.1.3 + deno run -A jsr:@david/publish-on-tag@0.2.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8eca590..943d0dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: runner: - ubuntu-latest deno_version: - - "1.x" + - "2.x" runs-on: ${{ matrix.runner }} steps: - run: git config --global core.autocrlf false @@ -45,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: "${{ matrix.deno_version }}" @@ -77,11 +77,11 @@ jobs: - macos-latest - ubuntu-latest deno_version: - - "1.45.0" - - "1.x" + - "2.3.0" + - "2.x" host_version: - - vim: "v9.1.0448" - nvim: "v0.10.0" + - vim: "v9.1.1646" + nvim: "v0.11.3" runs-on: ${{ matrix.runner }} @@ -91,7 +91,7 @@ jobs: - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: ${{ matrix.deno_version }} @@ -144,15 +144,3 @@ jobs: os: ${{ runner.os }} files: ./coverage.lcov token: ${{ secrets.CODECOV_TOKEN }} - - jsr-publish: - needs: check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 - with: - deno-version: "1.x" - - name: Publish (dry-run) - run: | - deno publish --dry-run diff --git a/README.md b/README.md index 7376171..24c129b 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ [![Test](https://github.com/vim-denops/deno-denops-test/actions/workflows/test.yml/badge.svg)](https://github.com/vim-denops/deno-denops-test/actions/workflows/test.yml) [![codecov](https://codecov.io/github/vim-denops/deno-denops-test/branch/main/graph/badge.svg?token=X9O5XB4O1S)](https://codecov.io/github/vim-denops/deno-denops-test) -[![Deno 1.45.0 or above](https://img.shields.io/badge/Deno-Support%201.45.0-yellowgreen.svg?logo=deno)](https://github.com/denoland/deno/tree/v1.45.0) -[![Vim 9.1.0448 or above](https://img.shields.io/badge/Vim-Support%209.1.0448-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v9.1.0448) -[![Neovim 0.10.0 or above](https://img.shields.io/badge/Neovim-Support%200.10.0-yellowgreen.svg?logo=neovim&logoColor=white)](https://github.com/neovim/neovim/tree/v0.10.0) +[![Deno 2.3.0 or above](https://img.shields.io/badge/Deno-Support%202.3.0-yellowgreen.svg?logo=deno)](https://github.com/denoland/deno/tree/v2.3.0) +[![Vim 9.1.1646 or above](https://img.shields.io/badge/Vim-Support%209.1.1646-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v9.1.1646) +[![Neovim 0.11.3 or above](https://img.shields.io/badge/Neovim-Support%200.11.3-yellowgreen.svg?logo=neovim&logoColor=white)](https://github.com/neovim/neovim/tree/v0.11.3) A [Deno] module designed for testing [denops.vim]. This module is intended to be used in the unit tests of denops plugins. @@ -125,11 +125,11 @@ jobs: - macos-latest - ubuntu-latest deno_version: - - "1.45.0" - - "1.x" + - "2.3.0" + - "2.x" host_version: - - vim: "v9.1.0448" - nvim: "v0.10.0" + - vim: "v9.1.1646" + nvim: "v0.11.3" runs-on: ${{ matrix.runner }} @@ -139,7 +139,7 @@ jobs: - uses: actions/checkout@v4 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: ${{ matrix.deno_version }} diff --git a/deno.jsonc b/deno.jsonc index 47608ec..68f2c77 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,25 +1,15 @@ { "name": "@denops/test", - "version": "0.0.0", "exports": { ".": "./mod.ts", "./stub": "./stub.ts", "./tester": "./tester.ts", - "./with": "./with.ts" + "./with": "./with.ts", }, - "exclude": [ - ".coverage" - ], + "exclude": [".coverage"], "publish": { - "include": [ - "**/*.ts", - "README.md", - "LICENSE" - ], - "exclude": [ - "**/*_test.ts", - ".*" - ] + "include": ["**/*.ts", "README.md", "LICENSE"], + "exclude": ["**/*_test.ts", ".*"], }, "tasks": { "check": "deno check **/*.ts", @@ -29,9 +19,9 @@ "coverage": "deno coverage .coverage", "update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts", "update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint", - "apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts" + "apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts", }, "imports": { - "jsr:@denops/test": "./mod.ts" - } + "jsr:@denops/test": "./mod.ts", + }, } From 6d21a44ef95628acfc14ad948e80f62165a95f52 Mon Sep 17 00:00:00 2001 From: Alisue Date: Mon, 29 Sep 2025 02:54:29 +0900 Subject: [PATCH 3/7] :coffee: Avoid `no-import-prefix` lint rule --- deno.jsonc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/deno.jsonc b/deno.jsonc index 68f2c77..0eb939e 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -4,12 +4,12 @@ ".": "./mod.ts", "./stub": "./stub.ts", "./tester": "./tester.ts", - "./with": "./with.ts", + "./with": "./with.ts" }, "exclude": [".coverage"], "publish": { "include": ["**/*.ts", "README.md", "LICENSE"], - "exclude": ["**/*_test.ts", ".*"], + "exclude": ["**/*_test.ts", ".*"] }, "tasks": { "check": "deno check **/*.ts", @@ -19,9 +19,14 @@ "coverage": "deno coverage .coverage", "update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts", "update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint", - "apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts", + "apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts" }, "imports": { - "jsr:@denops/test": "./mod.ts", + "jsr:@denops/test": "./mod.ts" }, + "lint": { + "rules": { + "exclude": ["no-import-prefix"] + } + } } From e769196092a23f3febfd246f5e63756e5ae84011 Mon Sep 17 00:00:00 2001 From: Alisue Date: Sun, 5 Oct 2025 15:01:38 +0900 Subject: [PATCH 4/7] :coffee: Use ~2.3 instead of 2.3.0 for deno_version matrix --- .github/workflows/test.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 943d0dd..b39a5d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,7 +77,7 @@ jobs: - macos-latest - ubuntu-latest deno_version: - - "2.3.0" + - "~2.3" - "2.x" host_version: - vim: "v9.1.1646" diff --git a/README.md b/README.md index 24c129b..ea014ee 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ jobs: - macos-latest - ubuntu-latest deno_version: - - "2.3.0" + - "~2.3" - "2.x" host_version: - vim: "v9.1.1646" From 67995b756e313ad9404184ad73cb9a95a1c18048 Mon Sep 17 00:00:00 2001 From: Alisue Date: Sun, 5 Oct 2025 21:13:01 +0900 Subject: [PATCH 5/7] :coffee: Remove coverage related tasks and directly apply in CI --- .github/workflows/test.yml | 4 ++-- deno.jsonc | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b39a5d8..58d5aab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,11 +133,11 @@ jobs: deno cache ./mod.ts - name: Run tests - run: deno task test:coverage + run: deno task test --coverage=cov timeout-minutes: 15 - run: | - deno task coverage --lcov > coverage.lcov + deno coverage --lcov cov > coverage.lcov - uses: codecov/codecov-action@v4 with: diff --git a/deno.jsonc b/deno.jsonc index 0eb939e..1a19612 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -6,17 +6,21 @@ "./tester": "./tester.ts", "./with": "./with.ts" }, - "exclude": [".coverage"], "publish": { - "include": ["**/*.ts", "README.md", "LICENSE"], - "exclude": ["**/*_test.ts", ".*"] + "include": [ + "**/*.ts", + "README.md", + "LICENSE" + ], + "exclude": [ + "**/*_test.ts", + ".*" + ] }, "tasks": { "check": "deno check **/*.ts", "check:doc": "deno test --doc --no-run", "test": "deno test -A --parallel --shuffle", - "test:coverage": "deno task test --coverage=.coverage", - "coverage": "deno coverage .coverage", "update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts", "update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint", "apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts" @@ -26,7 +30,9 @@ }, "lint": { "rules": { - "exclude": ["no-import-prefix"] + "exclude": [ + "no-import-prefix" + ] } } } From 247b9713f79af7489a85edc0fc5681fcc64ee8ba Mon Sep 17 00:00:00 2001 From: Alisue Date: Sun, 5 Oct 2025 21:13:46 +0900 Subject: [PATCH 6/7] :coffee: Remove update related tasks and CI We now can use deno's built-in functionality to update dependencies. --- .github/workflows/update.yml | 19 ------------------- deno.jsonc | 2 -- 2 files changed, 21 deletions(-) delete mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml deleted file mode 100644 index feb2162..0000000 --- a/.github/workflows/update.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: update - -on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - -jobs: - update: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: hasundue/molt-action@v1 - with: - branch: automation/update-dependencies - config: false - labels: automation - token: ${{ secrets.PA_TOKEN }} - source: "**/*.ts" diff --git a/deno.jsonc b/deno.jsonc index 1a19612..9908112 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -21,8 +21,6 @@ "check": "deno check **/*.ts", "check:doc": "deno test --doc --no-run", "test": "deno test -A --parallel --shuffle", - "update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts", - "update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint", "apply:supported-versions": "deno run --allow-env --allow-net --allow-read --allow-write .scripts/apply-supported-versions.ts" }, "imports": { From 23146b3c691338d6f03eb4db29246003ab6b862d Mon Sep 17 00:00:00 2001 From: Alisue Date: Sun, 5 Oct 2025 21:14:40 +0900 Subject: [PATCH 7/7] :coffee: Force LF on Windows --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58d5aab..063cb34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,7 +86,9 @@ jobs: runs-on: ${{ matrix.runner }} steps: - - run: git config --global core.autocrlf false + - run: | + git config --global core.autocrlf false + git config --global core.eol lf if: runner.os == 'Windows' - uses: actions/checkout@v4