diff --git a/.github/workflows/jsr.yml b/.github/workflows/jsr.yml new file mode 100644 index 0000000..2de3f3a --- /dev/null +++ b/.github/workflows/jsr.yml @@ -0,0 +1,27 @@ +name: jsr + +env: + DENO_VERSION: 1.x + +on: + push: + tags: + - "v*" + +permissions: + contents: read + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: denoland/setup-deno@v1 + with: + deno-version: ${{ env.DENO_VERSION }} + - name: Publish + run: | + deno run -A jsr:@david/publish-on-tag@0.1.3 diff --git a/deno.jsonc b/deno.jsonc new file mode 100644 index 0000000..abdee7f --- /dev/null +++ b/deno.jsonc @@ -0,0 +1,23 @@ +{ + "name": "@shougo/ddu-kind-file", + "version": "0.0.0", + "exports": { + ".": "./denops/@ddu-kinds/file.ts" + }, + "publish": { + "include": [ + "denops/@ddu-kinds/**/*.ts" + ] + }, + "imports": { + }, + "lock": false, + "tasks": { + "check": "deno check denops/**/*.ts", + "lint": "deno lint denops", + "lint-fix": "deno lint --fix denops", + "fmt": "deno fmt denops", + "test": "deno test -A --doc --parallel --shuffle denops/**/*.ts", + "upgrade": "deno run -A jsr:@molt/cli **/*.ts --no-resolve --write" + } +} diff --git a/denops/@ddu-kinds/file.ts b/denops/@ddu-kinds/file.ts index 936c67a..608d048 100644 --- a/denops/@ddu-kinds/file.ts +++ b/denops/@ddu-kinds/file.ts @@ -1,35 +1,32 @@ import { ActionFlags, - ActionHistory, - Actions, + type ActionHistory, + type Actions, BaseKind, - Clipboard, - Context, - DduItem, - DduOptions, - PreviewContext, - Previewer, - SourceOptions, -} from "https://deno.land/x/ddu_vim@v4.1.0/types.ts"; -import { - basename, - Denops, - dirname, - ensure, - fn, - is, - vars, -} from "https://deno.land/x/ddu_vim@v4.1.0/deps.ts"; + type Clipboard, + type Context, + type DduItem, + type DduOptions, + type Denops, + type PreviewContext, + type Previewer, + type SourceOptions, +} from "jsr:@shougo/ddu-vim@5.0.0-pre10/types"; import { printError, treePath2Filename, -} from "https://deno.land/x/ddu_vim@v4.1.0/utils.ts"; +} from "jsr:@shougo/ddu-vim@5.0.0-pre10/utils"; + +import * as fn from "jsr:@denops/std@7.0.0/function"; +import * as vars from "jsr:@denops/std@7.0.0/variable"; +import { basename, dirname } from "jsr:@std/path@1.0.0"; import { isAbsolute, join, normalize, relative } from "jsr:@std/path@0.225.1"; import { copy, ensureDir, ensureFile, move } from "jsr:@std/fs@0.229.1"; import { ByteSliceStream } from "jsr:@std/streams@0.224.0/byte-slice-stream"; import { toArrayBuffer } from "jsr:@std/streams@0.224.0/to-array-buffer"; import { TextLineStream } from "jsr:@std/streams@0.224.0"; +import { ensure, is } from "jsr:@core/unknownutil@3.18.1"; export type ActionData = { bufNr?: number;