Skip to content

📦 Upgrade dependencies to JSR package #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 60 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
name: test
name: Test

on:
schedule:
- cron: "0 7 * * 0"
push:
branches:
- main
pull_request:
paths:
- "**.md"
- "**.ts"
- "deno.jsonc"
- ".github/workflows/test.yml"
workflow_dispatch:
inputs:
denops_branch:
description: "Denops revision to test"
required: false
default: "main"

defaults:
run:
shell: bash --noprofile --norc -eo pipefail {0}

env:
DENOPS_BRANCH: ${{ github.event.inputs.denops_branch || 'main' }}

jobs:
check:
strategy:
matrix:
runner:
- ubuntu-latest
version:
deno_version:
- "1.x"
runs-on: ${{ matrix.runner }}
steps:
Expand All @@ -28,7 +39,13 @@ jobs:
- uses: actions/checkout@v4
- uses: denoland/[email protected]
with:
deno-version: "${{ matrix.version }}"
deno-version: "${{ matrix.deno_version }}"
- uses: actions/cache@v4
with:
key: deno-${{ hashFiles('**/*') }}
restore-keys: deno-
path: |
/home/runner/.cache/deno/deps/https/deno.land
- name: Lint check
run: deno lint
- name: Format check
Expand All @@ -43,54 +60,67 @@ jobs:
- windows-latest
- macos-latest
- ubuntu-latest
version:
- "1.38.x"
deno_version:
- "1.45.0"
- "1.x"
host_version:
- vim: "v9.0.1499"
nvim: "v0.8.0"
- vim: "v9.1.0448"
nvim: "v0.10.0"
runs-on: ${{ matrix.runner }}
timeout-minutes: 15
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@v4
with:
repository: "vim-denops/denops.vim"
path: ".deps/denops.vim"

- uses: denoland/[email protected]
with:
deno-version: "${{ matrix.version }}"
deno-version: "${{ matrix.deno_version }}"

- name: Get denops
run: |
git clone https://github.com/vim-denops/denops.vim /tmp/denops.vim
echo "DENOPS_TEST_DENOPS_PATH=/tmp/denops.vim" >> "$GITHUB_ENV"

- name: Try switching denops branch
run: |
git -C /tmp/denops.vim switch ${{ env.DENOPS_BRANCH }} || true
git -C /tmp/denops.vim branch

- uses: rhysd/action-setup-vim@v1
id: vim
with:
version: "${{ matrix.host_version.vim }}"
- name: Check Vim
run: |
echo ${DENOPS_TEST_VIM}
${DENOPS_TEST_VIM} --version
env:
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable }}

- uses: rhysd/action-setup-vim@v1
id: nvim
with:
neovim: true
version: "${{ matrix.host_version.nvim }}"
- name: Check Neovim

- name: Export executables
run: |
echo "DENOPS_TEST_VIM_EXECUTABLE=${{ steps.vim.outputs.executable }}" >> "$GITHUB_ENV"
echo "DENOPS_TEST_NVIM_EXECUTABLE=${{ steps.nvim.outputs.executable }}" >> "$GITHUB_ENV"

- name: Check versions
run: |
echo ${DENOPS_TEST_NVIM}
${DENOPS_TEST_NVIM} --version
env:
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable }}
deno --version
${DENOPS_TEST_VIM_EXECUTABLE} --version
${DENOPS_TEST_NVIM_EXECUTABLE} --version

- name: Perform pre-cache
run: |
deno cache ${DENOPS_TEST_DENOPS_PATH}/denops/@denops-private/mod.ts ./denops/gin/main.ts

- name: Test
run: deno task test:coverage
env:
DENOPS_TEST_DENOPS_PATH: ".deps/denops.vim"
DENOPS_TEST_VIM_EXECUTABLE: ${{ steps.vim.outputs.executable }}
DENOPS_TEST_NVIM_EXECUTABLE: ${{ steps.nvim.outputs.executable }}
timeout-minutes: 15

- run: |
deno task coverage --lcov > coverage.lcov

- uses: codecov/codecov-action@v4
with:
os: ${{ runner.os }}
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/update.yml

This file was deleted.

12 changes: 8 additions & 4 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"lock": false,
"exclude": ["docs/**", ".deps/**", ".coverage/**"],
"exclude": [
"docs/**",
".coverage/**"
],
"tasks": {
"check": "deno check ./**/*.ts",
"test": "deno test -A --parallel --shuffle --doc",
"test:coverage": "deno task test --coverage=.coverage",
"check": "deno check ./**/*.ts",
"coverage": "deno coverage .coverage --exclude=cli.ts --exclude=worker.ts --exclude=testdata/",
"upgrade": "deno run -q -A https://deno.land/x/[email protected]/cli.ts ./**/*.ts",
"upgrade:commit": "deno task -q upgrade --commit --prefix :package: --pre-commit=fmt"
"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:write": "deno task -q update --write",
"update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint"
}
}
4 changes: 2 additions & 2 deletions denops/gin/action/add.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/branch_delete.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate =
Expand Down
6 changes: 3 additions & 3 deletions denops/gin/action/branch_move.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import * as helper from "https://deno.land/x/denops_std@v6.0.1/helper/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import * as helper from "jsr:@denops/std@^7.0.0/helper";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { branch: string };
Expand Down
6 changes: 3 additions & 3 deletions denops/gin/action/branch_new.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import * as helper from "https://deno.land/x/denops_std@v6.0.1/helper/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import * as helper from "jsr:@denops/std@^7.0.0/helper";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { target?: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/browse.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commit: string; path?: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/chaperon.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/cherry_pick.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commit: string };
Expand Down
14 changes: 7 additions & 7 deletions denops/gin/action/core.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import * as buffer from "https://deno.land/x/denops_std@v6.0.1/buffer/mod.ts";
import * as fn from "https://deno.land/x/denops_std@v6.0.1/function/mod.ts";
import * as helper from "https://deno.land/x/denops_std@v6.0.1/helper/mod.ts";
import * as mapping from "https://deno.land/x/denops_std@v6.0.1/mapping/mod.ts";
import { assert, is } from "https://deno.land/x/unknownutil@v3.14.1/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import * as buffer from "jsr:@denops/std@^7.0.0/buffer";
import * as fn from "jsr:@denops/std@^7.0.0/function";
import * as helper from "jsr:@denops/std@^7.0.0/helper";
import * as mapping from "jsr:@denops/std@^7.0.0/mapping";
import { assert, is } from "jsr:@core/unknownutil@^4.0.0";

let rangeInternal: Range | undefined;

Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/diff.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/diff_smart.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string; XY: string };
Expand Down
6 changes: 3 additions & 3 deletions denops/gin/action/echo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import * as helper from "https://deno.land/x/denops_std@v6.0.1/helper/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import * as helper from "jsr:@denops/std@^7.0.0/helper";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = unknown;
Expand Down
6 changes: 3 additions & 3 deletions denops/gin/action/edit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import * as buffer from "https://deno.land/x/denops_std@v6.0.1/buffer/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import * as buffer from "jsr:@denops/std@^7.0.0/buffer";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/fixup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commit: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/log.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commitish: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/merge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commit: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/patch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { alias, define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
6 changes: 3 additions & 3 deletions denops/gin/action/rebase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import * as helper from "https://deno.land/x/denops_std@v6.0.1/helper/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import * as helper from "jsr:@denops/std@^7.0.0/helper";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commit: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/reset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { commit: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/reset_file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
4 changes: 2 additions & 2 deletions denops/gin/action/restore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Denops } from "https://deno.land/x/denops_std@v6.0.1/mod.ts";
import * as batch from "https://deno.land/x/denops_std@v6.0.1/batch/mod.ts";
import type { Denops } from "jsr:@denops/std@^7.0.0";
import * as batch from "jsr:@denops/std@^7.0.0/batch";
import { define, GatherCandidates, Range } from "./core.ts";

export type Candidate = { path: string };
Expand Down
Loading