Skip to content

Commit d3c1e6a

Browse files
committed
📝 Add breaking changes to README.md of option module
1 parent 2942e5b commit d3c1e6a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

denops_std/option/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,28 @@ To add options manually, create or modify corresponding module under `option`,
77
`_manual.ts` under corresponding module. After that, execute `make gen` on the
88
repository top so that `gen-option.ts` automatically remove duplicated options
99
from `_generated.ts`.
10+
11+
### 💥 Breaking Changes (v5)
12+
13+
When a Boolean option was specified in Getter, 0 or 1 was returned instead of
14+
Boolean, but since v5, Boolean has been returned.
15+
16+
```ts
17+
import type { Denops } from "https://deno.land/x/denops_std/mod.ts";
18+
import * as op from "https://deno.land/x/denops_std/option/mod.ts";
19+
20+
export async function test(denops: Denops) {
21+
await denops.cmd("setglobal autoread");
22+
await denops.cmd("setlocal autoread");
23+
24+
console.log(await op.autoread.get(denops));
25+
console.log(await op.autoread.getGlobal(denops));
26+
console.log(await op.autoread.getLocal(denops));
27+
console.log(await op.autoread.getBuffer(denops, 1));
28+
console.log(await op.autoread.getWindow(denops, 1));
29+
}
30+
```
31+
32+
Above shows `true` five times in v5 but `1` five times in v4.
33+
34+
https://github.com/vim-denops/deno-denops-std/pull/204

0 commit comments

Comments
 (0)