Skip to content

Commit

Permalink
Merge pull request #394 from vim-denops/no-exact-version
Browse files Browse the repository at this point in the history
👍 add `^` prefix to dependency versions
  • Loading branch information
lambdalisue authored Aug 3, 2024
2 parents 8c920ec + 83ac196 commit cd628cd
Show file tree
Hide file tree
Showing 45 changed files with 117 additions and 112 deletions.
6 changes: 3 additions & 3 deletions denops/@denops-private/cli.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
readableStreamFromWorker,
writableStreamFromWorker,
} from "jsr:@lambdalisue/workerio@4.0.1";
import { deadline } from "jsr:@std/async@1.0.1/deadline";
import { parseArgs } from "jsr:@std/cli@1.0.1/parse-args";
} from "jsr:@lambdalisue/workerio@^4.0.1";
import { deadline } from "jsr:@std/async@^1.0.1/deadline";
import { parseArgs } from "jsr:@std/cli@^1.0.1/parse-args";
import { asyncSignal } from "jsr:@milly/async-signal@^1.0.0";

const WORKER_SCRIPT = import.meta.resolve("./worker.ts");
Expand Down
14 changes: 7 additions & 7 deletions denops/@denops-private/cli_test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// NOTE: Use sinon to stub the getter property.
// @deno-types="npm:@types/sinon@17.0.3"
import sinon from "npm:sinon@18.0.0";
// @deno-types="npm:@types/sinon@^17.0.3"
import sinon from "npm:sinon@^18.0.0";

import {
assertEquals,
assertMatch,
assertNotMatch,
assertStringIncludes,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import {
assertSpyCallArgs,
assertSpyCalls,
Expand All @@ -16,10 +16,10 @@ import {
spy,
type Stub,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import { FakeTime } from "jsr:@std/testing@1.0.0-rc.5/time";
import { delay } from "jsr:@std/async@1.0.1/delay";
import { promiseState } from "jsr:@lambdalisue/async@2.1.1";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import { FakeTime } from "jsr:@std/testing@^1.0.0-rc.5/time";
import { delay } from "jsr:@std/async@^1.0.1/delay";
import { promiseState } from "jsr:@lambdalisue/async@^2.1.1";
import {
createFakeTcpConn,
createFakeTcpListener,
Expand Down
11 changes: 8 additions & 3 deletions denops/@denops-private/denops.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { Context, Denops, Dispatcher, Meta } from "jsr:@denops/core@7.0.0";
import { BatchError } from "jsr:@denops/core@7.0.0";
import { ensure, is } from "jsr:@core/unknownutil@3.18.1";
import {
BatchError,
type Context,
type Denops,
type Dispatcher,
type Meta,
} from "jsr:@denops/core@^7.0.0";
import { ensure, is } from "jsr:@core/unknownutil@^3.18.1";
import type { Host as HostOrigin } from "./host.ts";
import type { Service as ServiceOrigin } from "./service.ts";

Expand Down
8 changes: 4 additions & 4 deletions denops/@denops-private/denops_test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { BatchError, type Meta } from "jsr:@denops/core@7.0.0";
import { BatchError, type Meta } from "jsr:@denops/core@^7.0.0";
import {
assertEquals,
assertInstanceOf,
assertRejects,
assertStrictEquals,
unimplemented,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import {
assertSpyCallArgs,
assertSpyCalls,
resolvesNext,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import { promiseState } from "jsr:@lambdalisue/async@2.1.1";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import { promiseState } from "jsr:@lambdalisue/async@^2.1.1";
import { DenopsImpl, type Host, type Service } from "./denops.ts";

type BatchReturn = [results: unknown[], errmsg: string];
Expand Down
4 changes: 2 additions & 2 deletions denops/@denops-private/error.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { is } from "jsr:@core/unknownutil@3.18.1";
import { is } from "jsr:@core/unknownutil@^3.18.1";
import {
fromErrorObject,
isErrorObject,
toErrorObject,
tryOr,
} from "jsr:@lambdalisue/errorutil@1.1.0";
} from "jsr:@lambdalisue/errorutil@^1.1.0";

export function errorSerializer(err: unknown): unknown {
if (err instanceof Error) {
Expand Down
4 changes: 2 additions & 2 deletions denops/@denops-private/error_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assert, assertEquals, assertInstanceOf } from "jsr:@std/assert@1.0.1";
import { is } from "jsr:@core/unknownutil@3.18.1";
import { assert, assertEquals, assertInstanceOf } from "jsr:@std/assert@^1.0.1";
import { is } from "jsr:@core/unknownutil@^3.18.1";
import { errorDeserializer, errorSerializer } from "./error.ts";

Deno.test("errorSerializer", async (t) => {
Expand Down
2 changes: 1 addition & 1 deletion denops/@denops-private/host.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ensure, is, type Predicate } from "jsr:@core/unknownutil@3.18.1";
import { ensure, is, type Predicate } from "jsr:@core/unknownutil@^3.18.1";

/**
* Host (Vim/Neovim) which is visible from Service
Expand Down
4 changes: 2 additions & 2 deletions denops/@denops-private/host/nvim.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ensure, is } from "jsr:@core/unknownutil@3.18.1";
import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@2.4.0";
import { ensure, is } from "jsr:@core/unknownutil@^3.18.1";
import { Client, Session } from "jsr:@lambdalisue/messagepack-rpc@^2.4.0";
import { errorDeserializer, errorSerializer } from "../error.ts";
import { getVersionOr } from "../version.ts";
import { type Host, invoke, type Service } from "../host.ts";
Expand Down
12 changes: 6 additions & 6 deletions denops/@denops-private/host/nvim_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import {
assertMatch,
assertRejects,
assertStringIncludes,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import {
assertSpyCallArgs,
assertSpyCalls,
resolvesNext,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import { delay } from "jsr:@std/async@1.0.1/delay";
import { promiseState } from "jsr:@lambdalisue/async@2.1.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@1.1.0";
import { Client } from "jsr:@lambdalisue/messagepack-rpc@2.4.0";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import { delay } from "jsr:@std/async@^1.0.1/delay";
import { promiseState } from "jsr:@lambdalisue/async@^2.1.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@^1.1.0";
import { Client } from "jsr:@lambdalisue/messagepack-rpc@^2.4.0";
import { withNeovim } from "/denops-testutil/with.ts";
import type { Service } from "../host.ts";
import { Neovim } from "./nvim.ts";
Expand Down
4 changes: 2 additions & 2 deletions denops/@denops-private/host/vim.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ensure, is } from "jsr:@core/unknownutil@3.18.1";
import { ensure, is } from "jsr:@core/unknownutil@^3.18.1";
import {
Client,
type Message,
Session,
} from "jsr:@denops/vim-channel-command@4.0.2";
} from "jsr:@denops/vim-channel-command@^4.0.2";
import { type Host, invoke, type Service } from "../host.ts";

export class Vim implements Host {
Expand Down
12 changes: 6 additions & 6 deletions denops/@denops-private/host/vim_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import {
assertEquals,
assertMatch,
assertRejects,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import {
assertSpyCallArgs,
assertSpyCalls,
resolvesNext,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import { delay } from "jsr:@std/async@1.0.1/delay";
import { promiseState } from "jsr:@lambdalisue/async@2.1.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@1.1.0";
import { Client, Session } from "jsr:@denops/vim-channel-command@4.0.2";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import { delay } from "jsr:@std/async@^1.0.1/delay";
import { promiseState } from "jsr:@lambdalisue/async@^2.1.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@^1.1.0";
import { Client, Session } from "jsr:@denops/vim-channel-command@^4.0.2";
import { withVim } from "/denops-testutil/with.ts";
import type { Service } from "../host.ts";
import { Vim } from "./vim.ts";
Expand Down
8 changes: 4 additions & 4 deletions denops/@denops-private/host_test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { assertThrows } from "jsr:@std/assert@1.0.1";
import { assertThrows } from "jsr:@std/assert@^1.0.1";
import {
assertSpyCall,
assertSpyCalls,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import { AssertError } from "jsr:@core/unknownutil@3.18.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@1.1.0";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import { AssertError } from "jsr:@core/unknownutil@^3.18.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@^1.1.0";
import { invoke, type Service } from "./host.ts";

Deno.test("invoke", async (t) => {
Expand Down
6 changes: 3 additions & 3 deletions denops/@denops-private/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Denops, Entrypoint, Meta } from "jsr:@denops/core@7.0.0";
import { toFileUrl } from "jsr:@std/path@1.0.2/to-file-url";
import { toErrorObject } from "jsr:@lambdalisue/errorutil@1.1.0";
import type { Denops, Entrypoint, Meta } from "jsr:@denops/core@^7.0.0";
import { toFileUrl } from "jsr:@std/path@^1.0.2/to-file-url";
import { toErrorObject } from "jsr:@lambdalisue/errorutil@^1.1.0";
import { DenopsImpl, type Host } from "./denops.ts";
import type { CallbackId, Service as HostService } from "./host.ts";

Expand Down
12 changes: 6 additions & 6 deletions denops/@denops-private/service_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import {
assertRejects,
assertStrictEquals,
assertThrows,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import {
assertSpyCall,
assertSpyCalls,
resolvesNext,
spy,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import type { Meta } from "jsr:@denops/core@7.0.0";
import { promiseState } from "jsr:@lambdalisue/async@2.1.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@1.1.0";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import type { Meta } from "jsr:@denops/core@^7.0.0";
import { promiseState } from "jsr:@lambdalisue/async@^2.1.1";
import { unimplemented } from "jsr:@lambdalisue/errorutil@^1.1.0";
import type { Host } from "./denops.ts";
import { Service } from "./service.ts";
import { toFileUrl } from "jsr:@std/path@1.0.2/to-file-url";
import { toFileUrl } from "jsr:@std/path@^1.0.2/to-file-url";

const NOOP = () => {};

Expand Down
4 changes: 2 additions & 2 deletions denops/@denops-private/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta } from "jsr:@denops/core@7.0.0";
import { is, type Predicate } from "jsr:@core/unknownutil@3.18.1";
import type { Meta } from "jsr:@denops/core@^7.0.0";
import { is, type Predicate } from "jsr:@core/unknownutil@^3.18.1";

export const isMeta: Predicate<Meta> = is.ObjectOf({
mode: is.LiteralOneOf(["release", "debug", "test"] as const),
Expand Down
8 changes: 4 additions & 4 deletions denops/@denops-private/version.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dirname } from "jsr:@std/path@1.0.2/dirname";
import { fromFileUrl } from "jsr:@std/path@1.0.2/from-file-url";
import type { SemVer } from "jsr:@std/semver@0.224.3/types";
import { parse } from "jsr:@std/semver@0.224.3/parse";
import { dirname } from "jsr:@std/path@^1.0.2/dirname";
import { fromFileUrl } from "jsr:@std/path@^1.0.2/from-file-url";
import type { SemVer } from "jsr:@std/semver@^0.224.3/types";
import { parse } from "jsr:@std/semver@^0.224.3/parse";

const decoder = new TextDecoder();

Expand Down
8 changes: 4 additions & 4 deletions denops/@denops-private/version_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert, assertEquals } from "jsr:@std/assert@1.0.1";
import { resolvesNext, stub } from "jsr:@std/testing@1.0.0-rc.5/mock";
import type { SemVer } from "jsr:@std/semver@0.224.3/types";
import { is, type Predicate } from "jsr:@core/unknownutil@3.18.1";
import { assert, assertEquals } from "jsr:@std/assert@^1.0.1";
import { resolvesNext, stub } from "jsr:@std/testing@^1.0.0-rc.5/mock";
import type { SemVer } from "jsr:@std/semver@^0.224.3/types";
import { is, type Predicate } from "jsr:@core/unknownutil@^3.18.1";
import { getVersionOr } from "./version.ts";

Deno.test("getVersionOr()", async (t) => {
Expand Down
8 changes: 4 additions & 4 deletions denops/@denops-private/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import {
readableStreamFromWorker,
writableStreamFromWorker,
} from "jsr:@lambdalisue/workerio@4.0.1";
import { ensure } from "jsr:@core/unknownutil@3.18.1";
import { pop } from "jsr:@lambdalisue/streamtools@1.0.0";
} from "jsr:@lambdalisue/workerio@^4.0.1";
import { ensure } from "jsr:@core/unknownutil@^3.18.1";
import { pop } from "jsr:@lambdalisue/streamtools@^1.0.0";
import { asyncSignal } from "jsr:@milly/async-signal@^1.0.0";
import type { Meta } from "jsr:@denops/core@7.0.0";
import type { Meta } from "jsr:@denops/core@^7.0.0";
import type { Host, HostConstructor } from "./host.ts";
import { Vim } from "./host/vim.ts";
import { Neovim } from "./host/nvim.ts";
Expand Down
10 changes: 5 additions & 5 deletions denops/@denops-private/worker_test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// @deno-types="npm:@types/sinon@17.0.3"
import sinon from "npm:sinon@18.0.0";
import sinon from "npm:sinon@^18.0.0";
import {
assertEquals,
assertInstanceOf,
assertMatch,
assertObjectMatch,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import {
assertSpyCalls,
resolvesNext,
spy,
stub,
} from "jsr:@std/testing@1.0.0-rc.5/mock";
import { delay } from "jsr:@std/async@1.0.1/delay";
import { DisposableStack } from "jsr:@nick/dispose@1.1.0/disposable-stack";
} from "jsr:@std/testing@^1.0.0-rc.5/mock";
import { delay } from "jsr:@std/async@^1.0.1/delay";
import { DisposableStack } from "jsr:@nick/dispose@^1.1.0/disposable-stack";
import * as nvimCodec from "jsr:@lambdalisue/messagepack@^1.0.1";
import { createFakeMeta } from "/denops-testutil/mock.ts";
import { Neovim } from "./host/nvim.ts";
Expand Down
6 changes: 3 additions & 3 deletions tests/denops/runtime/functions/plugin_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
assertMatch,
assertRejects,
assertStringIncludes,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import { delay } from "jsr:@std/async@^0.224.0";
import { join } from "jsr:@std/path@1.0.2/join";
import { AsyncDisposableStack } from "jsr:@nick/dispose@1.1.0/async-disposable-stack";
import { join } from "jsr:@std/path@^1.0.2/join";
import { AsyncDisposableStack } from "jsr:@nick/dispose@^1.1.0/async-disposable-stack";
import { testHost } from "/denops-testutil/host.ts";
import { wait } from "/denops-testutil/wait.ts";

Expand Down
4 changes: 2 additions & 2 deletions tests/denops/runtime/functions/server_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
assertFalse,
assertMatch,
assertRejects,
} from "jsr:@std/assert@1.0.1";
} from "jsr:@std/assert@^1.0.1";
import { delay } from "jsr:@std/async@^0.224.0/delay";
import { AsyncDisposableStack } from "jsr:@nick/dispose@1.1.0/async-disposable-stack";
import { AsyncDisposableStack } from "jsr:@nick/dispose@^1.1.0/async-disposable-stack";
import { testHost } from "/denops-testutil/host.ts";
import { useSharedServer } from "/denops-testutil/shared_server.ts";
import { wait } from "/denops-testutil/wait.ts";
Expand Down
2 changes: 1 addition & 1 deletion tests/denops/runtime/plugin_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, assertMatch } from "jsr:@std/assert@1.0.1";
import { assertEquals, assertMatch } from "jsr:@std/assert@^1.0.1";
import { delay } from "jsr:@std/async@^0.224.0/delay";
import { withHost } from "/denops-testutil/host.ts";
import { useSharedServer } from "/denops-testutil/shared_server.ts";
Expand Down
2 changes: 1 addition & 1 deletion tests/denops/testdata/dummy_invalid_constraint_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = (_denops) => {
// Mimic the situation
Expand Down
2 changes: 1 addition & 1 deletion tests/denops/testdata/dummy_invalid_constraint_plugin2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = (_denops) => {
// Mimic the situation
Expand Down
2 changes: 1 addition & 1 deletion tests/denops/testdata/dummy_invalid_dispose_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = (_denops) => {
return {
Expand Down
2 changes: 1 addition & 1 deletion tests/denops/testdata/dummy_invalid_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = (_denops) => {
throw new Error("This is dummy error");
Expand Down
4 changes: 2 additions & 2 deletions tests/denops/testdata/dummy_invalid_wait_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import { delay } from "jsr:@std/async@1.0.1/delay";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";
import { delay } from "jsr:@std/async@^1.0.1/delay";

export const main: Entrypoint = async (_denops) => {
await delay(1000);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

// NOTE: This should not be called, a directory starting with '@' is not a denops plugin.
export const main: Entrypoint = async (denops) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

// NOTE: This should not be called, a directory contains '.' is not a valid denops plugin.
export const main: Entrypoint = async (denops) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = (_denops) => {
throw new Error("This is dummy error");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = async (denops) => {
await denops.cmd("echo 'Hello, Denops!'");
Expand Down
2 changes: 1 addition & 1 deletion tests/denops/testdata/dummy_valid_dispose_plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Entrypoint } from "jsr:@denops/core@7.0.0";
import type { Entrypoint } from "jsr:@denops/core@^7.0.0";

export const main: Entrypoint = (denops) => {
return {
Expand Down
Loading

0 comments on commit cd628cd

Please sign in to comment.