Skip to content

Commit 125afab

Browse files
authored
Merge pull request #171 from vim-denops/upgrade
💥 Follow the latest denops.vim (v4)
2 parents 4470ee2 + 9e2451f commit 125afab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+8318
-6122
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,11 @@ jobs:
3434
with:
3535
deno-version: "${{ matrix.version }}"
3636
- name: Lint check
37-
run: make lint
38-
if: matrix.version == '1.x'
37+
run: deno lint
3938
- name: Format check
40-
run: make fmt-check
41-
if: matrix.version == '1.x'
39+
run: deno fmt --check
4240
- name: Type check
43-
run: make type-check
41+
run: deno task check
4442

4543
test:
4644
strategy:
@@ -50,11 +48,11 @@ jobs:
5048
- macos-latest
5149
- ubuntu-latest
5250
version:
53-
- "1.17.1"
51+
- "1.28.0"
5452
- "1.x"
5553
host_version:
56-
- vim: "v8.2.3452"
57-
nvim: "v0.6.0"
54+
- vim: "v9.0.0472"
55+
nvim: "v0.8.0"
5856
runs-on: ${{ matrix.runner }}
5957
timeout-minutes: 15
6058
steps:
@@ -94,7 +92,7 @@ jobs:
9492
env:
9593
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable_path }}
9694
- name: Test
97-
run: make test
95+
run: deno task test
9896
env:
9997
DENOPS_TEST_DENOPS_PATH: "../denops.vim"
10098
DENOPS_TEST_VIM_EXECUTABLE: ${{ steps.vim.outputs.executable_path }}

.github/workflows/udd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
deno-version: "1.x"
1616
- name: Update dependencies
1717
run: |
18-
make deps > ../output.txt
18+
deno task upgrade > ../output.txt
1919
env:
2020
NO_COLOR: 1
2121
- name: Read ../output.txt

Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 🐜 denops_std
22

3-
[![Vim 8.2.3452 or above](https://img.shields.io/badge/Vim-Support%208.2.3452-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v8.2.3452)
4-
[![Neovim 0.6.0 or above](https://img.shields.io/badge/Neovim-Support%200.6.0-yellowgreen.svg?logo=neovim&logoColor=white)](https://github.com/neovim/neovim/tree/v0.6.0)
3+
[![Vim 9.0.0472 or above](https://img.shields.io/badge/Vim-Support%209.0.0472-yellowgreen.svg?logo=vim)](https://github.com/vim/vim/tree/v9.0.0472)
4+
[![Neovim 0.8.0 or above](https://img.shields.io/badge/Neovim-Support%200.8.0-yellowgreen.svg?logo=neovim&logoColor=white)](https://github.com/neovim/neovim/tree/v0.8.0)
55
[![Test](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml/badge.svg)](https://github.com/vim-denops/deno-denops-std/actions/workflows/test.yml)
66
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_std/mod.ts)
77
[![Documentation](https://img.shields.io/badge/denops-Documentation-yellow.svg)](https://vim-denops.github.io/denops-documentation/)

deno.jsonc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"lock": false,
3+
"tasks": {
4+
"test": "deno test --no-lock --unstable -A --doc --parallel --shuffle",
5+
"check": "deno check --no-lock --unstable $(find . -name '*.ts')",
6+
"upgrade": "deno run --no-lock -A https://deno.land/x/udd/main.ts $(find . -name '*.ts')",
7+
"gen:function": "deno run --no-lock --unstable -A ./scripts/gen-function/gen-function.ts",
8+
"gen:option": "deno run --no-lock --unstable -A ./scripts/gen-option/gen-option.ts",
9+
"gen": "deno task gen:function && deno task gen:option && deno fmt"
10+
}
11+
}

denops_std/anonymous/mod.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
* A module to provide anonymous function which is callable from
33
* outside of the plugin (Vim or other plugins.)
44
*
5+
* @deprecated Use `lambda` module instead.
56
* @module
67
*/
7-
import type { Denops } from "https://deno.land/x/denops_core@v3.4.1/mod.ts";
8+
import type { Denops } from "https://deno.land/x/denops_core@v4.0.0/mod.ts";
89

910
// https://github.com/microsoft/TypeScript/issues/26223#issuecomment-674500430
1011
export type TupleOf<T, N extends number> = N extends N
@@ -55,6 +56,8 @@ export type Callback = (...args: unknown[]) => Promise<unknown> | unknown;
5556
* });
5657
* }
5758
* ```
59+
*
60+
* @deprecated Use `lambda.register()` function instead.
5861
*/
5962
export function add<N extends number>(
6063
denops: Denops,
@@ -98,6 +101,8 @@ export function add<N extends number>(
98101
* await denops.dispatch(denops.name, ids[0]);
99102
* }
100103
* ```
104+
*
105+
* @deprecated Use `lambda.register()` function instead.
101106
*/
102107
export function once<N extends number>(
103108
denops: Denops,
@@ -147,6 +152,8 @@ export function once<N extends number>(
147152
* await denops.dispatch(denops.name, ids[1]);
148153
* }
149154
* ```
155+
*
156+
* @deprecated Use `lambda.unregister()` function instead.
150157
*/
151158
export function remove<N extends number>(
152159
denops: Denops,

denops_std/anonymous/mod_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
assertEquals,
33
assertRejects,
4-
} from "https://deno.land/std@0.170.0/testing/asserts.ts";
4+
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
55
import { test } from "https://deno.land/x/denops_test@v1.0.1/mod.ts";
66
import * as anonymous from "./mod.ts";
77

denops_std/argument/flags_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/std@0.170.0/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
22
import { parseFlags } from "./flags.ts";
33

44
Deno.test("parseFlags", () => {

denops_std/argument/mod_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/std@0.170.0/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
22
import { parse } from "./mod.ts";
33

44
Deno.test("parse", () => {

denops_std/argument/opts_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/std@0.170.0/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
22
import { parseOpts } from "./opts.ts";
33

44
Deno.test("parseOpts", () => {

denops_std/autocmd/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Denops } from "https://deno.land/x/denops_core@v3.4.1/mod.ts";
1+
import { Denops } from "https://deno.land/x/denops_core@v4.0.0/mod.ts";
22
import {
33
AutocmdEvent,
44
DefineOptions,

denops_std/autocmd/common_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/std@0.170.0/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
22
import { test } from "https://deno.land/x/denops_test@v1.0.1/mod.ts";
33
import { globals } from "../variable/mod.ts";
44
import { define, emit, emitAll, list, remove } from "./common.ts";

denops_std/autocmd/group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Denops } from "https://deno.land/x/denops_core@v3.4.1/mod.ts";
1+
import type { Denops } from "https://deno.land/x/denops_core@v4.0.0/mod.ts";
22
import { execute } from "../helper/execute.ts";
33
import { AutocmdEvent, DefineOptions, RemoveOptions } from "./types.ts";
44
import { buildDefineExpr, buildRemoveExpr } from "./utils.ts";

denops_std/autocmd/group_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assertEquals } from "https://deno.land/std@0.170.0/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
22
import { test } from "https://deno.land/x/denops_test@v1.0.1/mod.ts";
33
import { globals } from "../variable/mod.ts";
44
import { group } from "./group.ts";

denops_std/batch/batch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
Denops,
44
Dispatcher,
55
Meta,
6-
} from "https://deno.land/x/denops_core@v3.4.1/mod.ts";
6+
} from "https://deno.land/x/denops_core@v4.0.0/mod.ts";
77

88
type Redraw = undefined | boolean;
99

denops_std/batch/batch_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { assertEquals } from "https://deno.land/std@0.170.0/testing/asserts.ts";
1+
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
22
import {
33
assertSpyCall,
44
assertSpyCalls,
55
spy,
6-
} from "https://deno.land/std@0.170.0/testing/mock.ts";
6+
} from "https://deno.land/std@0.171.0/testing/mock.ts";
77
import { test } from "https://deno.land/x/denops_test@v1.0.1/mod.ts";
88
import { batch, BatchHelper } from "./batch.ts";
99

denops_std/batch/gather.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
Denops,
44
Dispatcher,
55
Meta,
6-
} from "https://deno.land/x/denops_core@v3.4.1/mod.ts";
6+
} from "https://deno.land/x/denops_core@v4.0.0/mod.ts";
77

88
class GatherHelper implements Denops {
99
#denops: Denops;

denops_std/batch/gather_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
assertEquals,
33
assertRejects,
4-
} from "https://deno.land/std@0.170.0/testing/asserts.ts";
4+
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
55
import { test } from "https://deno.land/x/denops_test@v1.0.1/mod.ts";
66
import { gather, GatherHelper } from "./gather.ts";
77

denops_std/buffer/buffer.ts

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Denops } from "https://deno.land/x/denops_core@v3.4.1/mod.ts";
1+
import type { Denops } from "https://deno.land/x/denops_core@v4.0.0/mod.ts";
22
import * as autocmd from "../autocmd/mod.ts";
33
import * as batch from "../batch/mod.ts";
44
import * as fn from "../function/mod.ts";
@@ -389,38 +389,7 @@ export interface ReplaceOptions {
389389
}
390390

391391
/**
392-
* Assign content to the buffer with given format and encoding.
393-
*
394-
* @deprecated Use `decode()` and `replace()` individually instead.
395-
*/
396-
export async function assign(
397-
denops: Denops,
398-
bufnr: number,
399-
data: Uint8Array,
400-
options: AssignOptions = {},
401-
): Promise<void> {
402-
const { content, fileformat, fileencoding } = await decode(
403-
denops,
404-
bufnr,
405-
data,
406-
options,
407-
);
408-
const preprocessor = options.preprocessor ?? ((v: string[]) => v);
409-
const repl = preprocessor(content);
410-
await replace(denops, bufnr, repl, {
411-
fileformat,
412-
fileencoding,
413-
});
414-
}
415-
416-
export interface AssignOptions extends DecodeOptions {
417-
preprocessor?: (repl: string[]) => string[];
418-
}
419-
420-
/**
421-
* Concrete the buffer
422-
*
423-
* This function will perform the followings
392+
* Concrete the buffer.
424393
*
425394
* - The `buftype` option become "nofile"
426395
* - The `swapfile` become disabled

0 commit comments

Comments
 (0)