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..063cb34 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,21 +77,23 @@ jobs: - macos-latest - ubuntu-latest deno_version: - - "1.45.0" - - "1.x" + - "~2.3" + - "2.x" host_version: - - vim: "v9.1.0448" - nvim: "v0.10.0" + - vim: "v9.1.1646" + nvim: "v0.11.3" 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 - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: ${{ matrix.deno_version }} @@ -133,26 +135,14 @@ 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: 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/.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/README.md b/README.md index 7376171..ea014ee 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" + - "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..9908112 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,15 +1,11 @@ { "name": "@denops/test", - "version": "0.0.0", "exports": { ".": "./mod.ts", "./stub": "./stub.ts", "./tester": "./tester.ts", "./with": "./with.ts" }, - "exclude": [ - ".coverage" - ], "publish": { "include": [ "**/*.ts", @@ -25,13 +21,16 @@ "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" }, "imports": { "jsr:@denops/test": "./mod.ts" + }, + "lint": { + "rules": { + "exclude": [ + "no-import-prefix" + ] + } } } 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 () => {