diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec4dedd3a..0381a20cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,24 +35,24 @@ jobs: # - macos-latest - ubuntu-latest version: - - "1.45.0" - - "1.x" + - "2.3.0" + - "2.x" host_version: - - vim: "v9.1.0488" - nvim: "v0.10.0" + - vim: "v9.1.1646" + nvim: "v0.11.3" runs-on: ${{ matrix.runner }} steps: - run: git config --global init.defaultBranch main - run: git config --global core.autocrlf false if: runner.os == 'Windows' - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: path: "./repo" - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: repository: "vim-denops/denops.vim" path: "./denops.vim" - - uses: denoland/setup-deno@v1 + - uses: denoland/setup-deno@v2 with: deno-version: "${{ matrix.version }}" - uses: actions/cache@v4 @@ -69,7 +69,7 @@ jobs: - name: Format check working-directory: ./repo run: deno task fmt-check - - uses: thinca/action-setup-vim@v1 + - uses: thinca/action-setup-vim@v2 id: vim with: vim_type: "Vim" @@ -81,7 +81,7 @@ jobs: ${DENOPS_TEST_VIM} --version env: DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable_path }} - - uses: thinca/action-setup-vim@v1 + - uses: thinca/action-setup-vim@v2 id: nvim with: vim_type: "Neovim" diff --git a/deno.json b/deno.json index 46cede1d5..dffd0710c 100644 --- a/deno.json +++ b/deno.json @@ -1,10 +1,17 @@ { "lock": false, - "unstable": ["kv"], "tasks": { + "check": "deno task fmt-check && deno task lint && deno task test", "fmt-check": "deno fmt --check denops", - "lint": "deno lint", - "test": "deno test -A", - "check": "deno task fmt-check && deno task lint && deno task test" - } + "lint": "deno lint denops", + "test": "deno test -A denops" + }, + "unstable": [ + "kv" + ], + "workspace": [ + "./denops/@ddc-sources/skkeleton", + "./denops/@ddc-sources/skkeleton_okuri", + "./denops/skkeleton" + ] } diff --git a/denops/@ddc-sources/skkeleton/deno.json b/denops/@ddc-sources/skkeleton/deno.json new file mode 100644 index 000000000..16974e1d7 --- /dev/null +++ b/denops/@ddc-sources/skkeleton/deno.json @@ -0,0 +1,6 @@ +{ + "imports": { + "@denops/std": "jsr:@denops/std@^8.0.0", + "@shougo/ddc-vim": "jsr:@shougo/ddc-vim@^10.0.0" + } +} diff --git a/denops/@ddc-sources/skkeleton.ts b/denops/@ddc-sources/skkeleton/main.ts similarity index 91% rename from denops/@ddc-sources/skkeleton.ts rename to denops/@ddc-sources/skkeleton/main.ts index 4f9d1b397..82be3b624 100644 --- a/denops/@ddc-sources/skkeleton.ts +++ b/denops/@ddc-sources/skkeleton/main.ts @@ -1,17 +1,14 @@ -import type { CompletionData, RankData } from "../skkeleton/types.ts"; +import type { CompletionData, RankData } from "../../skkeleton/types.ts"; -import * as fn from "jsr:@denops/std@^7.6.0/function"; +import * as fn from "@denops/std/function"; import { BaseSource, type GatherArguments, type GetCompletePositionArguments, type GetPreviewerArguments, type OnCompleteDoneArguments, -} from "jsr:@shougo/ddc-vim@~9.1.0/source"; -import { - type DdcGatherItems, - Previewer, -} from "jsr:@shougo/ddc-vim@~9.1.0/types"; +} from "@shougo/ddc-vim/source"; +import { type DdcGatherItems, Previewer } from "@shougo/ddc-vim/types"; export type CompletionMetadata = { kana: string; diff --git a/denops/@ddc-sources/skkeleton_okuri/deno.json b/denops/@ddc-sources/skkeleton_okuri/deno.json new file mode 100644 index 000000000..68a3e2298 --- /dev/null +++ b/denops/@ddc-sources/skkeleton_okuri/deno.json @@ -0,0 +1,6 @@ +{ + "imports": { + "@shougo/ddc-vim": "jsr:@shougo/ddc-vim@^10.0.0", + "@std/assert": "jsr:@std/assert@^1.0.14" + } +} diff --git a/denops/@ddc-sources/skkeleton_okuri.ts b/denops/@ddc-sources/skkeleton_okuri/main.ts similarity index 89% rename from denops/@ddc-sources/skkeleton_okuri.ts rename to denops/@ddc-sources/skkeleton_okuri/main.ts index 69fa04bff..bb69fe161 100644 --- a/denops/@ddc-sources/skkeleton_okuri.ts +++ b/denops/@ddc-sources/skkeleton_okuri/main.ts @@ -1,13 +1,13 @@ -import { getOkuriStr } from "../skkeleton/okuri.ts"; -import { okuriSplits } from "./skkeleton/okurisplits.ts"; +import { getOkuriStr } from "../../skkeleton/okuri.ts"; +import { okuriSplits } from "./okurisplits.ts"; import { BaseSource, type GatherArguments, type GetCompletePositionArguments, type OnCompleteDoneArguments, -} from "jsr:@shougo/ddc-vim@~9.1.0/source"; -import { type Item } from "jsr:@shougo/ddc-vim@~9.1.0/types"; +} from "@shougo/ddc-vim/source"; +import { type Item } from "@shougo/ddc-vim/types"; type Never = Record; diff --git a/denops/@ddc-sources/skkeleton/okurisplits.ts b/denops/@ddc-sources/skkeleton_okuri/okurisplits.ts similarity index 100% rename from denops/@ddc-sources/skkeleton/okurisplits.ts rename to denops/@ddc-sources/skkeleton_okuri/okurisplits.ts diff --git a/denops/@ddc-sources/skkeleton/okurisplits_test.ts b/denops/@ddc-sources/skkeleton_okuri/okurisplits_test.ts similarity index 84% rename from denops/@ddc-sources/skkeleton/okurisplits_test.ts rename to denops/@ddc-sources/skkeleton_okuri/okurisplits_test.ts index 5a7f634eb..92500a0c5 100644 --- a/denops/@ddc-sources/skkeleton/okurisplits_test.ts +++ b/denops/@ddc-sources/skkeleton_okuri/okurisplits_test.ts @@ -1,6 +1,6 @@ import { okuriSplits } from "./okurisplits.ts"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { assertEquals } from "@std/assert/equals"; Deno.test({ name: "split", diff --git a/denops/skkeleton/config.ts b/denops/skkeleton/config.ts index bff79cf89..0e321492e 100644 --- a/denops/skkeleton/config.ts +++ b/denops/skkeleton/config.ts @@ -2,9 +2,9 @@ import { getKanaTable, loadKanaTableFiles } from "./kana.ts"; import { ConfigOptions, Encode, Encoding } from "./types.ts"; import { homeExpand } from "./util.ts"; -import { ensure } from "jsr:@core/unknownutil@~4.3.0/ensure"; -import { is } from "jsr:@core/unknownutil@~4.3.0/is"; -import { Denops } from "jsr:@denops/std@^7.6.0"; +import { ensure } from "@core/unknownutil/ensure"; +import { is } from "@core/unknownutil/is"; +import { Denops } from "@denops/std"; export const config: Omit & { globalDictionaries: [string, string][]; diff --git a/denops/skkeleton/config_test.ts b/denops/skkeleton/config_test.ts index f72056c8d..bbc9619ec 100644 --- a/denops/skkeleton/config_test.ts +++ b/denops/skkeleton/config_test.ts @@ -6,8 +6,8 @@ import { dispatch } from "./function/testutil.ts"; import { currentContext, currentLibrary, variables } from "./store.ts"; import { test } from "./testutil.ts"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import type { Denops } from "@denops/std"; +import { assertEquals } from "@std/assert/equals"; const defaultConfig = { ...config }; diff --git a/denops/skkeleton/context.ts b/denops/skkeleton/context.ts index fbb5c74c7..6fab4b07c 100644 --- a/denops/skkeleton/context.ts +++ b/denops/skkeleton/context.ts @@ -3,7 +3,7 @@ import { HenkanType } from "./dictionary.ts"; import { PreEdit } from "./preedit.ts"; import { initializeState, State, toString } from "./state.ts"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; +import type { Denops } from "@denops/std"; type CandidateResult = { type: HenkanType; diff --git a/denops/skkeleton/deno.json b/denops/skkeleton/deno.json new file mode 100644 index 000000000..cd91eb3b1 --- /dev/null +++ b/denops/skkeleton/deno.json @@ -0,0 +1,20 @@ +{ + "imports": { + "@core/asyncutil": "jsr:@core/asyncutil@^1.2.0", + "@core/unknownutil": "jsr:@core/unknownutil@^4.3.0", + "@denops/std": "jsr:@denops/std@^8.0.0", + "@denops/test": "jsr:@denops/test@^3.0.4", + "@geolonia/japanese-numeral": "npm:@geolonia/japanese-numeral@^1.0.2", + "@lambdalisue/import-map-importer": "jsr:@lambdalisue/import-map-importer@^0.5.1", + "@std/assert": "jsr:@std/assert@^1.0.13", + "@std/async": "jsr:@std/async@^1.0.14", + "@std/collections": "jsr:@std/collections@^1.1.2", + "@std/msgpack": "jsr:@std/msgpack@^1.0.3", + "@std/path": "jsr:@std/path@^1.1.1", + "@std/streams": "jsr:@std/streams@^1.0.10", + "@std/yaml": "jsr:@std/yaml@^1.0.9", + "cr-numeral": "npm:cr-numeral@^1.1.3", + "encoding-japanese": "npm:encoding-japanese@^2.2.0", + "jsonschema": "npm:jsonschema@^1.5.0" + } +} diff --git a/denops/skkeleton/dictionary.ts b/denops/skkeleton/dictionary.ts index bf7953780..926154f81 100644 --- a/denops/skkeleton/dictionary.ts +++ b/denops/skkeleton/dictionary.ts @@ -1,11 +1,16 @@ import { config } from "./config.ts"; import type { CompletionData, RankData } from "./types.ts"; -import { number2kanji } from "npm:@geolonia/japanese-numeral@1.0.2"; -import { convertNumberToRoman } from "npm:cr-numeral@1.1.3"; -import { is, Predicate } from "jsr:@core/unknownutil@~4.3.0"; -import { zip } from "jsr:@std/collections@~1.0.5/zip"; -import { toFileUrl } from "jsr:@std/path@~1.0.3/to-file-url"; +import { number2kanji } from "@geolonia/japanese-numeral"; +import { convertNumberToRoman } from "cr-numeral"; + +import { is, Predicate } from "@core/unknownutil"; +import { + ImportMapImporter, + loadImportMap, +} from "@lambdalisue/import-map-importer"; +import { zip } from "@std/collections/zip"; +import { fromFileUrl } from "@std/path/from-file-url"; export const okuriAriMarker = ";; okuri-ari entries."; export const okuriNasiMarker = ";; okuri-nasi entries."; @@ -310,27 +315,35 @@ export class Library { } } -export async function load(paths: Record): Promise { - const userMod = await import( - toFileUrl(paths["sources/user_dictionary"]).href +export async function load(sources: string[]): Promise { + const importMap = await loadImportMap( + fromFileUrl(import.meta.resolve("./deno.json")), + ); + const importer = new ImportMapImporter(importMap); + // deno-lint-ignore no-explicit-any + const userMod = await importer.import( + import.meta.resolve("./sources/user_dictionary.ts"), ); const userDictionary = await (new userMod.Source()).getUserDictionary(); const dictionaries: Dictionary[] = []; - for (const source of config.sources) { - const key = `sources/${source}`; - const path = paths[key]; + for (const source of sources) { + try { + // deno-lint-ignore no-explicit-any + const mod = await importer.import( + import.meta.resolve(`./sources/${source}.ts`), + ); - if (!path) { + dictionaries.push( + ...await (new mod.Source().getDictionaries()), + ); + } catch (e) { console.error(`Invalid source name: ${source}`); + if (config.debug) { + console.error(e); + } continue; } - - const mod = await import(toFileUrl(path).href); - - dictionaries.push( - ...await (new mod.Source().getDictionaries()), - ); } return new Library(dictionaries, userDictionary); diff --git a/denops/skkeleton/dictionary_test.ts b/denops/skkeleton/dictionary_test.ts index 82735e0ac..ee6da5630 100644 --- a/denops/skkeleton/dictionary_test.ts +++ b/denops/skkeleton/dictionary_test.ts @@ -3,10 +3,10 @@ import { Dictionary as SkkDictionary } from "./sources/skk_dictionary.ts"; import { Dictionary as DenoKvDictionary } from "./sources/deno_kv.ts"; import { Dictionary as UserDictionary } from "./sources/user_dictionary.ts"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; -import { dirname } from "jsr:@std/path@~1.0.3/dirname"; -import { fromFileUrl } from "jsr:@std/path@~1.0.3/from-file-url"; -import { join } from "jsr:@std/path@~1.0.3/join"; +import { assertEquals } from "@std/assert/equals"; +import { dirname } from "@std/path/dirname"; +import { fromFileUrl } from "@std/path/from-file-url"; +import { join } from "@std/path/join"; const newJisyoJson = join( dirname(fromFileUrl(import.meta.url)), diff --git a/denops/skkeleton/function/common_test.ts b/denops/skkeleton/function/common_test.ts index d582f06bd..80704713f 100644 --- a/denops/skkeleton/function/common_test.ts +++ b/denops/skkeleton/function/common_test.ts @@ -5,7 +5,7 @@ import { cancel, kakutei, kakuteiKey } from "./common.ts"; import { katakana } from "./mode.ts"; import { dispatch } from "./testutil.ts"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { assertEquals } from "@std/assert/equals"; const lib = await currentLibrary.get(); diff --git a/denops/skkeleton/function/dictionary.ts b/denops/skkeleton/function/dictionary.ts index fc7659187..f2982d24d 100644 --- a/denops/skkeleton/function/dictionary.ts +++ b/denops/skkeleton/function/dictionary.ts @@ -5,12 +5,12 @@ import { HenkanState } from "../state.ts"; import { kakutei } from "./common.ts"; import { modeChange } from "../mode.ts"; -import * as autocmd from "jsr:@denops/std@^7.6.0/autocmd"; -import { batch } from "jsr:@denops/std@^7.6.0/batch"; -import * as fn from "jsr:@denops/std@^7.6.0/function"; -import * as mapping from "jsr:@denops/std@^7.6.0/mapping"; -import * as op from "jsr:@denops/std@^7.6.0/option"; -import * as vars from "jsr:@denops/std@^7.6.0/variable"; +import * as autocmd from "@denops/std/autocmd"; +import { batch } from "@denops/std/batch"; +import * as fn from "@denops/std/function"; +import * as mapping from "@denops/std/mapping"; +import * as op from "@denops/std/option"; +import * as vars from "@denops/std/variable"; const cmapKeys = ["", ""]; diff --git a/denops/skkeleton/function/dictionary_test.ts b/denops/skkeleton/function/dictionary_test.ts index 6cdc22fa2..c10d17f3b 100644 --- a/denops/skkeleton/function/dictionary_test.ts +++ b/denops/skkeleton/function/dictionary_test.ts @@ -4,8 +4,8 @@ import { currentContext } from "../store.ts"; import { test } from "../testutil.ts"; import { registerWord } from "./dictionary.ts"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import type { Denops } from "@denops/std"; +import { assertEquals } from "@std/assert/equals"; test({ mode: "all", diff --git a/denops/skkeleton/function/disable.ts b/denops/skkeleton/function/disable.ts index 0777cab7a..7edcb440e 100644 --- a/denops/skkeleton/function/disable.ts +++ b/denops/skkeleton/function/disable.ts @@ -3,7 +3,7 @@ import type { Context } from "../context.ts"; import { initializeState } from "../state.ts"; import { kakutei } from "./common.ts"; -import * as autocmd from "jsr:@denops/std@^7.6.0/autocmd"; +import * as autocmd from "@denops/std/autocmd"; export async function disable(context: Context) { const denops = context.denops!; diff --git a/denops/skkeleton/function/disable_test.ts b/denops/skkeleton/function/disable_test.ts index d08d291cb..b2f5fbeda 100644 --- a/denops/skkeleton/function/disable_test.ts +++ b/denops/skkeleton/function/disable_test.ts @@ -2,8 +2,8 @@ import { currentContext } from "../store.ts"; import { test } from "../testutil.ts"; import { dispatch } from "./testutil.ts"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import type { Denops } from "@denops/std"; +import { assertEquals } from "@std/assert/equals"; // deno-lint-ignore no-explicit-any async function getResult(x: Promise): Promise { diff --git a/denops/skkeleton/function/henkan.ts b/denops/skkeleton/function/henkan.ts index 93dedc744..3927007ca 100644 --- a/denops/skkeleton/function/henkan.ts +++ b/denops/skkeleton/function/henkan.ts @@ -10,8 +10,8 @@ import { kakutei } from "./common.ts"; import { registerWord } from "./dictionary.ts"; import { acceptResult, henkanPoint, kakuteiFeed, kanaInput } from "./input.ts"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; -import { Mutex } from "jsr:@core/asyncutil@^1.2.0/mutex"; +import { Mutex } from "@core/asyncutil/mutex"; +import type { Denops } from "@denops/std"; const mutex = new Mutex(); diff --git a/denops/skkeleton/function/henkan_test.ts b/denops/skkeleton/function/henkan_test.ts index 242bcdaf0..83d89f728 100644 --- a/denops/skkeleton/function/henkan_test.ts +++ b/denops/skkeleton/function/henkan_test.ts @@ -4,7 +4,7 @@ import { currentLibrary } from "../store.ts"; import { henkanFirst } from "./henkan.ts"; import { dispatch } from "./testutil.ts"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { assertEquals } from "@std/assert/equals"; const l = await currentLibrary.get(); await l.registerHenkanResult("okurinasi", "へんかん", "返還"); diff --git a/denops/skkeleton/function/input_test.ts b/denops/skkeleton/function/input_test.ts index 437fdf148..f310d171d 100644 --- a/denops/skkeleton/function/input_test.ts +++ b/denops/skkeleton/function/input_test.ts @@ -6,9 +6,9 @@ import { deleteChar, henkanPoint } from "./input.ts"; import { hankatakana, katakana } from "./mode.ts"; import { dispatch } from "./testutil.ts"; -import { Denops } from "jsr:@denops/std@^7.6.0"; -import * as op from "jsr:@denops/std@^7.6.0/option"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { Denops } from "@denops/std"; +import * as op from "@denops/std/option"; +import { assertEquals } from "@std/assert/equals"; Deno.test({ name: "kana input", diff --git a/denops/skkeleton/function/mode_test.ts b/denops/skkeleton/function/mode_test.ts index c7c83b587..7f9460ef0 100644 --- a/denops/skkeleton/function/mode_test.ts +++ b/denops/skkeleton/function/mode_test.ts @@ -7,10 +7,10 @@ import { deleteChar, kanaInput } from "./input.ts"; import { abbrev, hankatakana, katakana, zenkaku } from "./mode.ts"; import { dispatch } from "./testutil.ts"; -import { Denops } from "jsr:@denops/std@^7.6.0"; -import * as autocmd from "jsr:@denops/std@^7.6.0/autocmd"; -import * as vars from "jsr:@denops/std@^7.6.0/variable"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { Denops } from "@denops/std"; +import * as autocmd from "@denops/std/autocmd"; +import * as vars from "@denops/std/variable"; +import { assertEquals } from "@std/assert/equals"; test({ mode: "all", diff --git a/denops/skkeleton/kana.ts b/denops/skkeleton/kana.ts index 4cd99ac56..fb6691c65 100644 --- a/denops/skkeleton/kana.ts +++ b/denops/skkeleton/kana.ts @@ -5,9 +5,9 @@ import { romToZen } from "./kana/rom_zen.ts"; import type { KanaResult, KanaTable } from "./kana/type.ts"; import { Cell, readFileWithEncoding } from "./util.ts"; -import { distinctBy } from "jsr:@std/collections@~1.0.5/distinct-by"; -import { is } from "jsr:@core/unknownutil@~4.3.0/is"; -import { assert } from "jsr:@core/unknownutil@~4.3.0/assert"; +import { distinctBy } from "@std/collections/distinct-by"; +import { is } from "@core/unknownutil/is"; +import { assert } from "@core/unknownutil/assert"; type PartialKanaTable = [string, KanaResult | null][]; diff --git a/denops/skkeleton/kana_test.ts b/denops/skkeleton/kana_test.ts index bbeead8ba..4e32aa2a0 100644 --- a/denops/skkeleton/kana_test.ts +++ b/denops/skkeleton/kana_test.ts @@ -5,8 +5,8 @@ import { registerKanaTable } from "./kana.ts"; import { currentContext } from "./store.ts"; import { test } from "./testutil.ts"; -import { Denops } from "jsr:@denops/std@^7.6.0"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { Denops } from "@denops/std"; +import { assertEquals } from "@std/assert/equals"; Deno.test({ name: "customize kanatable", diff --git a/denops/skkeleton/keymap_test.ts b/denops/skkeleton/keymap_test.ts index 7cf9c0bcd..65017eb12 100644 --- a/denops/skkeleton/keymap_test.ts +++ b/denops/skkeleton/keymap_test.ts @@ -2,8 +2,8 @@ import { test } from "./testutil.ts"; import { currentLibrary } from "./store.ts"; import { currentContext } from "./store.ts"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import type { Denops } from "@denops/std"; +import { assertEquals } from "@std/assert/equals"; test({ mode: "nvim", // can input mode test only in nvim diff --git a/denops/skkeleton/main.ts b/denops/skkeleton/main.ts index 443f18ad9..0a5d1644f 100644 --- a/denops/skkeleton/main.ts +++ b/denops/skkeleton/main.ts @@ -12,14 +12,13 @@ import { handleKey, registerKeyMap } from "./keymap.ts"; import { initializeStateWithAbbrev } from "./mode.ts"; import { keyToNotation, notationToKey, receiveNotation } from "./notation.ts"; import { currentContext, currentLibrary, variables } from "./store.ts"; -import { globpath } from "./util.ts"; import type { CompletionData, RankData } from "./types.ts"; -import { as, assert, is } from "jsr:@core/unknownutil@~4.3.0"; -import type { Denops, Entrypoint } from "jsr:@denops/std@^7.6.0"; -import * as autocmd from "jsr:@denops/std@^7.6.0/autocmd"; -import * as fn from "jsr:@denops/std@^7.6.0/function"; -import * as vars from "jsr:@denops/std@^7.6.0/variable"; +import { as, assert, is } from "@core/unknownutil"; +import type { Denops, Entrypoint } from "@denops/std"; +import * as autocmd from "@denops/std/autocmd"; +import * as fn from "@denops/std/function"; +import * as vars from "@denops/std/variable"; type CompleteInfo = { pum_visible: boolean; @@ -62,12 +61,9 @@ async function init(denops: Denops) { } currentContext.init().denops = denops; - currentLibrary.setInitializer(async () => + currentLibrary.setInitializer(() => loadDictionary( - await globpath( - denops, - "denops/skkeleton/sources", - ), + config.sources, ) ); diff --git a/denops/skkeleton/mode.ts b/denops/skkeleton/mode.ts index 37aabda72..546f38acb 100644 --- a/denops/skkeleton/mode.ts +++ b/denops/skkeleton/mode.ts @@ -3,8 +3,8 @@ import { Context } from "./context.ts"; import { initializeState } from "./state.ts"; import { variables } from "./store.ts"; -import * as autocmd from "jsr:@denops/std@^7.6.0/autocmd"; -import * as vars from "jsr:@denops/std@^7.6.0/variable"; +import * as autocmd from "@denops/std/autocmd"; +import * as vars from "@denops/std/variable"; export async function modeChange(context: Context, mode: string) { context.mode = mode; diff --git a/denops/skkeleton/notation.ts b/denops/skkeleton/notation.ts index 5a80ee371..3cd0cb0c2 100644 --- a/denops/skkeleton/notation.ts +++ b/denops/skkeleton/notation.ts @@ -1,6 +1,6 @@ -import { assert } from "jsr:@core/unknownutil@~4.3.0/assert"; -import { is } from "jsr:@core/unknownutil@~4.3.0/is"; -import type { Denops } from "jsr:@denops/std@^7.6.0"; +import { assert } from "@core/unknownutil/assert"; +import { is } from "@core/unknownutil/is"; +import type { Denops } from "@denops/std"; let received = false; export let notationToKey: Record = {}; diff --git a/denops/skkeleton/preedit_test.ts b/denops/skkeleton/preedit_test.ts index afff3bd38..fe6d90c7a 100644 --- a/denops/skkeleton/preedit_test.ts +++ b/denops/skkeleton/preedit_test.ts @@ -1,6 +1,6 @@ import { PreEdit } from "./preedit.ts"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { assertEquals } from "@std/assert/equals"; Deno.test({ name: "preedit test", diff --git a/denops/skkeleton/sources/deno_kv.ts b/denops/skkeleton/sources/deno_kv.ts index d5bd8a674..db1a9ce9d 100644 --- a/denops/skkeleton/sources/deno_kv.ts +++ b/denops/skkeleton/sources/deno_kv.ts @@ -14,10 +14,10 @@ import jisyoschema from "https://cdn.jsdelivr.net/gh/skk-dict/jisyo/schema/jisyo type: "json", }; -import jsonschema from "npm:jsonschema@1.4.1"; +import jsonschema from "jsonschema"; -import { decode as msgpackDecode } from "jsr:@std/msgpack@~1.0.2/decode"; -import { parse as yamlParse } from "jsr:@std/yaml@~1.0.5/parse"; +import { decode as msgpackDecode } from "@std/msgpack/decode"; +import { parse as yamlParse } from "@std/yaml/parse"; interface Jisyo { okuri_ari: Record; diff --git a/denops/skkeleton/sources/google_japanese_input.ts b/denops/skkeleton/sources/google_japanese_input.ts index 1027cd8c8..e1dd919cd 100644 --- a/denops/skkeleton/sources/google_japanese_input.ts +++ b/denops/skkeleton/sources/google_japanese_input.ts @@ -6,7 +6,7 @@ import { } from "../dictionary.ts"; import type { CompletionData } from "../types.ts"; -import { deadline } from "jsr:@std/async@~1.0.4/deadline"; +import { deadline } from "@std/async/deadline"; export class Source implements BaseSource { getDictionaries(): Promise { diff --git a/denops/skkeleton/sources/skk_dictionary.ts b/denops/skkeleton/sources/skk_dictionary.ts index 26bdfccce..2e120d9e4 100644 --- a/denops/skkeleton/sources/skk_dictionary.ts +++ b/denops/skkeleton/sources/skk_dictionary.ts @@ -14,10 +14,10 @@ import jisyoschema from "https://cdn.jsdelivr.net/gh/skk-dict/jisyo/schema/jisyo type: "json", }; -import jsonschema from "npm:jsonschema@1.4.1"; +import jsonschema from "jsonschema"; -import { decode as msgpackDecode } from "jsr:@std/msgpack@~1.0.2/decode"; -import { parse as yamlParse } from "jsr:@std/yaml@~1.0.5/parse"; +import { decode as msgpackDecode } from "@std/msgpack/decode"; +import { parse as yamlParse } from "@std/yaml/parse"; interface Jisyo { okuri_ari: Record; diff --git a/denops/skkeleton/sources/skk_server.ts b/denops/skkeleton/sources/skk_server.ts index 4c969868a..d0fafd685 100644 --- a/denops/skkeleton/sources/skk_server.ts +++ b/denops/skkeleton/sources/skk_server.ts @@ -9,9 +9,9 @@ import { Encode } from "../types.ts"; import type { CompletionData, Encoding, SkkServerOptions } from "../types.ts"; // NOTE: import * as encoding does not work! -import encoding from "npm:encoding-japanese@2.2.0"; +import encoding from "encoding-japanese"; -import { TextLineStream } from "jsr:@std/streams@~1.0.3/text-line-stream"; +import { TextLineStream } from "@std/streams/text-line-stream"; type Server = { conn: Deno.Conn; diff --git a/denops/skkeleton/sources/user_dictionary.ts b/denops/skkeleton/sources/user_dictionary.ts index 641525f58..ab198ecfd 100644 --- a/denops/skkeleton/sources/user_dictionary.ts +++ b/denops/skkeleton/sources/user_dictionary.ts @@ -11,8 +11,8 @@ import { UserDictionaryPath, } from "../dictionary.ts"; -import { is } from "jsr:@core/unknownutil@~4.3.0/is"; -import { assert } from "jsr:@core/unknownutil@~4.3.0/assert"; +import { is } from "@core/unknownutil/is"; +import { assert } from "@core/unknownutil/assert"; export class Source implements BaseSource { async getDictionaries(): Promise { diff --git a/denops/skkeleton/testutil.ts b/denops/skkeleton/testutil.ts index ed09b2feb..d1265a4ce 100644 --- a/denops/skkeleton/testutil.ts +++ b/denops/skkeleton/testutil.ts @@ -1,11 +1,11 @@ import { main } from "./main.ts"; import { currentContext } from "./store.ts"; -import { Denops } from "jsr:@denops/std@^7.6.0"; -import * as autocmd from "jsr:@denops/std@^7.6.0/autocmd"; -import * as DenopsTest from "jsr:@denops/test@^3.0.4"; -import { resolve } from "jsr:@std/path@~1.0.3/resolve"; -import { fromFileUrl } from "jsr:@std/path@~1.0.3/from-file-url"; +import { Denops } from "@denops/std"; +import * as autocmd from "@denops/std/autocmd"; +import * as DenopsTest from "@denops/test"; +import { resolve } from "@std/path/resolve"; +import { fromFileUrl } from "@std/path/from-file-url"; const runtimepath = resolve( fromFileUrl(new URL("../..", import.meta.url)), diff --git a/denops/skkeleton/util.ts b/denops/skkeleton/util.ts index b8a1d0d24..09b07e7ba 100644 --- a/denops/skkeleton/util.ts +++ b/denops/skkeleton/util.ts @@ -1,11 +1,11 @@ // NOTE: import * as encoding does not work! -import encoding from "npm:encoding-japanese@2.2.0"; +import encoding from "encoding-japanese"; -import { Denops } from "jsr:@denops/std@^7.6.0"; -import * as fn from "jsr:@denops/std@^7.6.0/function"; -import * as op from "jsr:@denops/std@^7.6.0/option"; -import { basename } from "jsr:@std/path@~1.0.3/basename"; -import { parse } from "jsr:@std/path@~1.0.3/parse"; +import { Denops } from "@denops/std"; +import * as fn from "@denops/std/function"; +import * as op from "@denops/std/option"; +import { basename } from "@std/path/basename"; +import { parse } from "@std/path/parse"; export class Cell { initialized = false; diff --git a/denops/skkeleton/util_test.ts b/denops/skkeleton/util_test.ts index 2a9d9ea55..50722f3d2 100644 --- a/denops/skkeleton/util_test.ts +++ b/denops/skkeleton/util_test.ts @@ -1,6 +1,6 @@ import { LazyCell } from "./util.ts"; -import { assertEquals } from "jsr:@std/assert@~1.0.3/equals"; +import { assertEquals } from "@std/assert/equals"; Deno.test({ name: "LazyCell", diff --git a/doc/skkeleton.jax b/doc/skkeleton.jax index a13aa3ee5..02d56f09f 100644 --- a/doc/skkeleton.jax +++ b/doc/skkeleton.jax @@ -11,7 +11,7 @@ INTRODUCTION *skkeleton-introduction* REQUIRED *skkeleton-required* 基本的に作者が最新のVimを利用しているため古いバージョンのVimでの動作は -保証しませんが、テストはVim v9.0.0449 Neovim 0.8.0 以降で動かしているので +保証しませんが、テストはVim v9.1.1646 Neovim 0.11.3 以降で動かしているので それ以降であれば動くと思います。 他の条件は|denops.vim|に準拠します。 @@ -631,6 +631,13 @@ skkeleton側では |g:skkeleton#mapped_keys| に応じて ============================================================================== COMPATIBILITY *skkeleton-compatibility* +2024-12-17~ +- denops.vimのv8で追加された仕様に追従 + - v7以前のdenops.vimで使いたい方はdenopsv7ブランチを使用してください + +2024-12-17~ +- "usePopup" オプションを廃止し、cmdline含め常にpopupを表示するようにした + 2024-12-17~ - "usePopup" オプションを廃止し、cmdline含め常にpopupを表示するようにした