From 495ff800d099819b9d1f0d940b7935c672eb0225 Mon Sep 17 00:00:00 2001 From: Yuki Tanaka Date: Mon, 15 Jul 2024 21:12:18 +0900 Subject: [PATCH] deps: migrate dependencies to jsr and npm (#440) Towards #438. This commit migrates dependencies from deno.land and esm.sh to jsr and npm. --- .github/workflows/build.yml | 2 +- connection.ts | 2 +- deno.json | 1 - deps/cluster-key-slot.js | 1 + deps/lodash-es.js | 3 ++ deps/std/assert.ts | 1 + deps/std/async.ts | 1 + deps/std/bytes.ts | 1 + deps/std/io.ts | 1 + deps/std/streams.ts | 1 + deps/std/testing.ts | 1 + experimental/cluster/mod.ts | 8 ++--- internal/buffered_readable_stream_test.ts | 5 +--- internal/concate_bytes_test.ts | 2 +- modules-lock.json | 29 ------------------- modules.json | 29 ------------------- protocol/deno_streams/command.ts | 3 +- protocol/deno_streams/mod.ts | 3 +- protocol/deno_streams/reply.ts | 2 +- protocol/shared/command.ts | 2 +- protocol/shared/command_test.ts | 2 +- protocol/web_streams/reply_test.ts | 2 +- tests/backoff_test.ts | 4 +-- tests/client_test.ts | 6 ++-- tests/cluster/test.ts | 8 ++--- tests/cluster/test_util.ts | 6 ++-- tests/cluster_test.ts | 9 ++---- tests/commands/acl.ts | 9 ++---- tests/commands/connection.ts | 15 ++-------- tests/commands/general.ts | 7 ++--- tests/commands/geo.ts | 8 ++--- tests/commands/hash.ts | 9 ++---- tests/commands/hyper_loglog.ts | 8 ++--- tests/commands/key.ts | 9 ++---- tests/commands/list.ts | 9 ++---- tests/commands/pipeline.ts | 7 ++--- tests/commands/pubsub.ts | 10 ++----- tests/commands/script.ts | 12 ++------ tests/commands/set.ts | 9 ++---- tests/commands/sorted_set.ts | 12 ++------ tests/commands/stream.ts | 10 ++----- tests/commands/string.ts | 9 ++---- tests/commands_test.ts | 6 +--- tests/reconnect_test.ts | 8 ++--- tests/test_util.ts | 2 +- tests/util_test.ts | 4 +-- tools/make_mod.ts | 4 +-- vendor/https/deno.land/std/assert/mod.ts | 1 - vendor/https/deno.land/std/async/delay.ts | 1 - vendor/https/deno.land/std/bytes/concat.ts | 1 - vendor/https/deno.land/std/io/buf_reader.ts | 1 - vendor/https/deno.land/std/io/buf_writer.ts | 1 - vendor/https/deno.land/std/io/read_all.ts | 1 - .../std/streams/reader_from_stream_reader.ts | 1 - vendor/https/deno.land/std/testing/bdd.ts | 1 - .../esm.sh/cluster-key-slot/lib/index.js | 3 -- vendor/https/esm.sh/lodash-es/sample.js | 3 -- vendor/https/esm.sh/lodash-es/shuffle.js | 3 -- vendor/https/esm.sh/lodash-es/uniqBy.js | 3 -- 59 files changed, 78 insertions(+), 244 deletions(-) create mode 100644 deps/cluster-key-slot.js create mode 100644 deps/lodash-es.js create mode 100644 deps/std/assert.ts create mode 100644 deps/std/async.ts create mode 100644 deps/std/bytes.ts create mode 100644 deps/std/io.ts create mode 100644 deps/std/streams.ts create mode 100644 deps/std/testing.ts delete mode 100644 modules-lock.json delete mode 100644 modules.json delete mode 100644 vendor/https/deno.land/std/assert/mod.ts delete mode 100644 vendor/https/deno.land/std/async/delay.ts delete mode 100644 vendor/https/deno.land/std/bytes/concat.ts delete mode 100644 vendor/https/deno.land/std/io/buf_reader.ts delete mode 100644 vendor/https/deno.land/std/io/buf_writer.ts delete mode 100644 vendor/https/deno.land/std/io/read_all.ts delete mode 100644 vendor/https/deno.land/std/streams/reader_from_stream_reader.ts delete mode 100644 vendor/https/deno.land/std/testing/bdd.ts delete mode 100644 vendor/https/esm.sh/cluster-key-slot/lib/index.js delete mode 100644 vendor/https/esm.sh/lodash-es/sample.js delete mode 100644 vendor/https/esm.sh/lodash-es/shuffle.js delete mode 100644 vendor/https/esm.sh/lodash-es/uniqBy.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9139154..759ad336 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: path: | ~/.deno ~/.cache/deno - key: ${{ runner.os }}-deno-${{ hashFiles('**/import_map.json', '**/.deno-version', '**/modules-lock.json') }} + key: ${{ runner.os }}-deno-${{ hashFiles('deps/**', '.denov') }} - name: Check mod.ts run: | deno task make_mod diff --git a/connection.ts b/connection.ts index eaf44623..14727ca8 100644 --- a/connection.ts +++ b/connection.ts @@ -10,7 +10,7 @@ import { import { Protocol as DenoStreamsProtocol } from "./protocol/deno_streams/mod.ts"; import type { Command, Protocol } from "./protocol/shared/protocol.ts"; import type { RedisReply, RedisValue } from "./protocol/shared/types.ts"; -import { delay } from "./vendor/https/deno.land/std/async/delay.ts"; +import { delay } from "./deps/std/async.ts"; export interface SendCommandOptions { /** diff --git a/deno.json b/deno.json index ca8bf3c9..ea669365 100644 --- a/deno.json +++ b/deno.json @@ -17,7 +17,6 @@ "test:doc": "deno test --doc --no-run --import-map=import_map.test.json", "coverage": "deno coverage ./coverage --lcov --output=coverage/lcov.info", "make_mod": "deno run --allow-read --allow-write --allow-run --check tools/make_mod.ts", - "dlink": "deno run --allow-read=modules.json,modules-lock.json,vendor --allow-write=modules-lock.json,vendor --allow-net=deno.land,esm.sh https://deno.land/x/dlink@v0.8.9/dlink.ts && deno fmt modules-lock.json vendor", "bench:deno-redis": "DENO_NO_PACKAGE_JSON=1 deno run --unstable --allow-net=127.0.0.1:6379 --allow-read --allow-env --allow-write=tmp --import-map=benchmark/import_map.json benchmark/deno-redis.ts", "bench:ioredis": "node benchmark/ioredis.js" }, diff --git a/deps/cluster-key-slot.js b/deps/cluster-key-slot.js new file mode 100644 index 00000000..031f3315 --- /dev/null +++ b/deps/cluster-key-slot.js @@ -0,0 +1 @@ +export { default as calculateSlot } from "npm:cluster-key-slot@1.1.0"; diff --git a/deps/lodash-es.js b/deps/lodash-es.js new file mode 100644 index 00000000..c4330c95 --- /dev/null +++ b/deps/lodash-es.js @@ -0,0 +1,3 @@ +export { default as sample } from "npm:lodash-es@4.17.21/sample.js"; +export { default as shuffle } from "npm:lodash-es@4.17.21/shuffle.js"; +export { default as uniqBy } from "npm:lodash-es@4.17.21/uniqBy.js"; diff --git a/deps/std/assert.ts b/deps/std/assert.ts new file mode 100644 index 00000000..0ca195b5 --- /dev/null +++ b/deps/std/assert.ts @@ -0,0 +1 @@ +export * from "jsr:@std/assert@0.224.0"; diff --git a/deps/std/async.ts b/deps/std/async.ts new file mode 100644 index 00000000..68b87557 --- /dev/null +++ b/deps/std/async.ts @@ -0,0 +1 @@ +export * from "jsr:@std/async@0.224.0"; diff --git a/deps/std/bytes.ts b/deps/std/bytes.ts new file mode 100644 index 00000000..947565be --- /dev/null +++ b/deps/std/bytes.ts @@ -0,0 +1 @@ +export * from "jsr:@std/bytes@0.224.0"; diff --git a/deps/std/io.ts b/deps/std/io.ts new file mode 100644 index 00000000..d5295c33 --- /dev/null +++ b/deps/std/io.ts @@ -0,0 +1 @@ +export * from "jsr:@std/io@0.224.0"; diff --git a/deps/std/streams.ts b/deps/std/streams.ts new file mode 100644 index 00000000..2b4a915f --- /dev/null +++ b/deps/std/streams.ts @@ -0,0 +1 @@ +export * from "jsr:@std/streams@0.224.0"; diff --git a/deps/std/testing.ts b/deps/std/testing.ts new file mode 100644 index 00000000..2291fcb3 --- /dev/null +++ b/deps/std/testing.ts @@ -0,0 +1 @@ +export * from "jsr:@std/testing@0.224.0/bdd"; diff --git a/experimental/cluster/mod.ts b/experimental/cluster/mod.ts index aa7b41f6..c173ca71 100644 --- a/experimental/cluster/mod.ts +++ b/experimental/cluster/mod.ts @@ -30,11 +30,9 @@ import type { Connection, SendCommandOptions } from "../../connection.ts"; import type { Redis } from "../../redis.ts"; import type { RedisReply, RedisValue } from "../../protocol/shared/types.ts"; import { ErrorReplyError } from "../../errors.ts"; -import { delay } from "../../vendor/https/deno.land/std/async/delay.ts"; -import calculateSlot from "../../vendor/https/esm.sh/cluster-key-slot/lib/index.js"; -import sample from "../../vendor/https/esm.sh/lodash-es/sample.js"; -import shuffle from "../../vendor/https/esm.sh/lodash-es/shuffle.js"; -import uniqBy from "../../vendor/https/esm.sh/lodash-es/uniqBy.js"; +import { delay } from "../../deps/std/async.ts"; +import { calculateSlot } from "../../deps/cluster-key-slot.js"; +import { sample, shuffle, uniqBy } from "../../deps/lodash-es.js"; export interface ClusterConnectOptions { nodes: Array; diff --git a/internal/buffered_readable_stream_test.ts b/internal/buffered_readable_stream_test.ts index 8e450f88..2b40e3e3 100644 --- a/internal/buffered_readable_stream_test.ts +++ b/internal/buffered_readable_stream_test.ts @@ -1,8 +1,5 @@ import { encoder } from "./encoding.ts"; -import { - assertEquals, - assertRejects, -} from "../vendor/https/deno.land/std/assert/mod.ts"; +import { assertEquals, assertRejects } from "../deps/std/assert.ts"; import { BufferedReadableStream } from "./buffered_readable_stream.ts"; Deno.test({ diff --git a/internal/concate_bytes_test.ts b/internal/concate_bytes_test.ts index 2f57b685..921704f8 100644 --- a/internal/concate_bytes_test.ts +++ b/internal/concate_bytes_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "../vendor/https/deno.land/std/assert/mod.ts"; +import { assertEquals } from "../deps/std/assert.ts"; import { concateBytes } from "./concate_bytes.ts"; Deno.test("concateBytes", () => { diff --git a/modules-lock.json b/modules-lock.json deleted file mode 100644 index cba1fdf6..00000000 --- a/modules-lock.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "https://deno.land/std": { - "version": "@0.224.0", - "modules": [ - "/assert/mod.ts", - "/async/delay.ts", - "/bytes/concat.ts", - "/testing/bdd.ts", - "/io/buf_reader.ts", - "/io/buf_writer.ts", - "/io/read_all.ts", - "/streams/reader_from_stream_reader.ts" - ] - }, - "https://esm.sh/lodash-es": { - "version": "@4.17.21", - "modules": [ - "/sample.js", - "/shuffle.js", - "/uniqBy.js" - ] - }, - "https://esm.sh/cluster-key-slot": { - "version": "@1.1.0", - "modules": [ - "/lib/index.js" - ] - } -} diff --git a/modules.json b/modules.json deleted file mode 100644 index cba1fdf6..00000000 --- a/modules.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "https://deno.land/std": { - "version": "@0.224.0", - "modules": [ - "/assert/mod.ts", - "/async/delay.ts", - "/bytes/concat.ts", - "/testing/bdd.ts", - "/io/buf_reader.ts", - "/io/buf_writer.ts", - "/io/read_all.ts", - "/streams/reader_from_stream_reader.ts" - ] - }, - "https://esm.sh/lodash-es": { - "version": "@4.17.21", - "modules": [ - "/sample.js", - "/shuffle.js", - "/uniqBy.js" - ] - }, - "https://esm.sh/cluster-key-slot": { - "version": "@1.1.0", - "modules": [ - "/lib/index.js" - ] - } -} diff --git a/protocol/deno_streams/command.ts b/protocol/deno_streams/command.ts index 7f99707d..712ad487 100644 --- a/protocol/deno_streams/command.ts +++ b/protocol/deno_streams/command.ts @@ -1,5 +1,4 @@ -import { BufReader } from "../../vendor/https/deno.land/std/io/buf_reader.ts"; -import { BufWriter } from "../../vendor/https/deno.land/std/io/buf_writer.ts"; +import { BufReader, BufWriter } from "../../deps/std/io.ts"; import { readReply } from "./reply.ts"; import { ErrorReplyError } from "../../errors.ts"; import type { RedisReply, RedisValue } from "../shared/types.ts"; diff --git a/protocol/deno_streams/mod.ts b/protocol/deno_streams/mod.ts index c43200bc..bedb69d7 100644 --- a/protocol/deno_streams/mod.ts +++ b/protocol/deno_streams/mod.ts @@ -1,5 +1,4 @@ -import { BufReader } from "../../vendor/https/deno.land/std/io/buf_reader.ts"; -import { BufWriter } from "../../vendor/https/deno.land/std/io/buf_writer.ts"; +import { BufReader, BufWriter } from "../../deps/std/io.ts"; import { readReply } from "./reply.ts"; import { sendCommand, sendCommands, writeCommand } from "./command.ts"; diff --git a/protocol/deno_streams/reply.ts b/protocol/deno_streams/reply.ts index 2de9f57a..1ffbad84 100644 --- a/protocol/deno_streams/reply.ts +++ b/protocol/deno_streams/reply.ts @@ -1,4 +1,4 @@ -import { BufReader } from "../../vendor/https/deno.land/std/io/buf_reader.ts"; +import { BufReader } from "../../deps/std/io.ts"; import type * as types from "../shared/types.ts"; import { ArrayReplyCode, diff --git a/protocol/shared/command.ts b/protocol/shared/command.ts index 35aa9351..dd750a2d 100644 --- a/protocol/shared/command.ts +++ b/protocol/shared/command.ts @@ -1,4 +1,4 @@ -import { concat } from "../../vendor/https/deno.land/std/bytes/concat.ts"; +import { concat } from "../../deps/std/bytes.ts"; import { encoder } from "../../internal/encoding.ts"; import type { RedisValue } from "./types.ts"; import type { Command } from "./protocol.ts"; diff --git a/protocol/shared/command_test.ts b/protocol/shared/command_test.ts index cc24ef09..b59b8abb 100644 --- a/protocol/shared/command_test.ts +++ b/protocol/shared/command_test.ts @@ -1,5 +1,5 @@ import { encodeCommand } from "./command.ts"; -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; Deno.test({ name: "encodeCommand", diff --git a/protocol/web_streams/reply_test.ts b/protocol/web_streams/reply_test.ts index 0db420df..b7d6b4bc 100644 --- a/protocol/web_streams/reply_test.ts +++ b/protocol/web_streams/reply_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; import { readReply } from "./reply.ts"; import { BufferedReadableStream } from "../../internal/buffered_readable_stream.ts"; diff --git a/tests/backoff_test.ts b/tests/backoff_test.ts index 4689d993..0bdeef4e 100644 --- a/tests/backoff_test.ts +++ b/tests/backoff_test.ts @@ -1,5 +1,5 @@ -import { assertEquals } from "../vendor/https/deno.land/std/assert/mod.ts"; -import { describe, it } from "../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../deps/std/assert.ts"; +import { describe, it } from "../deps/std/testing.ts"; import { exponentialBackoff } from "../backoff.ts"; diff --git a/tests/client_test.ts b/tests/client_test.ts index 282fca58..1fa0c063 100644 --- a/tests/client_test.ts +++ b/tests/client_test.ts @@ -1,11 +1,11 @@ import type { Redis } from "../redis.ts"; -import { delay } from "../vendor/https/deno.land/std/async/delay.ts"; +import { delay } from "../deps/std/async.ts"; import { assert, assertEquals, assertRejects, assertThrows, -} from "../vendor/https/deno.land/std/assert/mod.ts"; +} from "../deps/std/assert.ts"; import { afterAll, afterEach, @@ -13,7 +13,7 @@ import { beforeEach, describe, it, -} from "../vendor/https/deno.land/std/testing/bdd.ts"; +} from "../deps/std/testing.ts"; import { newClient, nextPort, startRedis, stopRedis } from "./test_util.ts"; import type { TestServer } from "./test_util.ts"; diff --git a/tests/cluster/test.ts b/tests/cluster/test.ts index 4695d6db..f27d575e 100644 --- a/tests/cluster/test.ts +++ b/tests/cluster/test.ts @@ -6,16 +6,16 @@ import { assertArrayIncludes, assertEquals, assertRejects, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; +} from "../../deps/std/assert.ts"; import { afterAll, afterEach, beforeAll, describe, it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; -import sample from "../../vendor/https/esm.sh/lodash-es/sample.js"; -import calculateSlot from "../../vendor/https/esm.sh/cluster-key-slot/lib/index.js"; +} from "../../deps/std/testing.ts"; +import { sample } from "../../deps/lodash-es.js"; +import { calculateSlot } from "../../deps/cluster-key-slot.js"; import { ErrorReplyError } from "../../errors.ts"; import { connect, create } from "../../redis.ts"; import type { CommandExecutor } from "../../executor.ts"; diff --git a/tests/cluster/test_util.ts b/tests/cluster/test_util.ts index 270d496a..42b56ddf 100644 --- a/tests/cluster/test_util.ts +++ b/tests/cluster/test_util.ts @@ -5,9 +5,9 @@ import { stopRedis, } from "../test_util.ts"; import type { TestServer } from "../test_util.ts"; -import { readAll } from "../../vendor/https/deno.land/std/io/read_all.ts"; -import { readerFromStreamReader } from "../../vendor/https/deno.land/std/streams/reader_from_stream_reader.ts"; -import { delay } from "../../vendor/https/deno.land/std/async/delay.ts"; +import { readAll } from "../../deps/std/io.ts"; +import { readerFromStreamReader } from "../../deps/std/streams.ts"; +import { delay } from "../../deps/std/async.ts"; export interface TestCluster { servers: TestServer[]; diff --git a/tests/cluster_test.ts b/tests/cluster_test.ts index e6acfe7d..5a7b3e0d 100644 --- a/tests/cluster_test.ts +++ b/tests/cluster_test.ts @@ -3,13 +3,8 @@ import { assert, assertEquals, assertStringIncludes, -} from "../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - describe, - it, -} from "../vendor/https/deno.land/std/testing/bdd.ts"; +} from "../deps/std/assert.ts"; +import { afterAll, beforeAll, describe, it } from "../deps/std/testing.ts"; import { newClient, nextPort, startRedis, stopRedis } from "./test_util.ts"; import type { TestServer } from "./test_util.ts"; diff --git a/tests/commands/acl.ts b/tests/commands/acl.ts index 34865c2c..7aaec2af 100644 --- a/tests/commands/acl.ts +++ b/tests/commands/acl.ts @@ -1,10 +1,5 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - describe, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, describe, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/connection.ts b/tests/commands/connection.ts index dec3fc88..365be6bb 100644 --- a/tests/commands/connection.ts +++ b/tests/commands/connection.ts @@ -1,16 +1,7 @@ import { createLazyClient } from "../../mod.ts"; -import { - assert, - assertEquals, - assertExists, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - describe, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; -import { delay } from "../../vendor/https/deno.land/std/async/delay.ts"; +import { assert, assertEquals, assertExists } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, describe, it } from "../../deps/std/testing.ts"; +import { delay } from "../../deps/std/async.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/general.ts b/tests/commands/general.ts index 7a5ab69b..b46523d4 100644 --- a/tests/commands/general.ts +++ b/tests/commands/general.ts @@ -1,16 +1,13 @@ import { ErrorReplyError } from "../../mod.ts"; import type { Redis } from "../../mod.ts"; -import { - assertEquals, - assertRejects, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; +import { assertEquals, assertRejects } from "../../deps/std/assert.ts"; import { afterAll, beforeAll, beforeEach, describe, it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +} from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; export function generalTests( diff --git a/tests/commands/geo.ts b/tests/commands/geo.ts index 0de071aa..ef716215 100644 --- a/tests/commands/geo.ts +++ b/tests/commands/geo.ts @@ -1,9 +1,5 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/hash.ts b/tests/commands/hash.ts index aa1e1299..18d965c2 100644 --- a/tests/commands/hash.ts +++ b/tests/commands/hash.ts @@ -1,10 +1,5 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - beforeEach, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, beforeEach, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/hyper_loglog.ts b/tests/commands/hyper_loglog.ts index 79096c7a..a736cb1b 100644 --- a/tests/commands/hyper_loglog.ts +++ b/tests/commands/hyper_loglog.ts @@ -1,9 +1,5 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/key.ts b/tests/commands/key.ts index 034d61ed..da401109 100644 --- a/tests/commands/key.ts +++ b/tests/commands/key.ts @@ -2,13 +2,8 @@ import { assert, assertArrayIncludes, assertEquals, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - beforeEach, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +} from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, beforeEach, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/list.ts b/tests/commands/list.ts index 520669fc..481a18c1 100644 --- a/tests/commands/list.ts +++ b/tests/commands/list.ts @@ -1,10 +1,5 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - beforeEach, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, beforeEach, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/pipeline.ts b/tests/commands/pipeline.ts index 8b459b7c..0e442cbe 100644 --- a/tests/commands/pipeline.ts +++ b/tests/commands/pipeline.ts @@ -1,9 +1,6 @@ import { ErrorReplyError, Raw } from "../../mod.ts"; -import { - assert, - assertEquals, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { it } from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assert, assertEquals } from "../../deps/std/assert.ts"; +import { it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; export function pipelineTests( diff --git a/tests/commands/pubsub.ts b/tests/commands/pubsub.ts index 35d7c737..a53329be 100644 --- a/tests/commands/pubsub.ts +++ b/tests/commands/pubsub.ts @@ -1,10 +1,6 @@ -import { delay } from "../../vendor/https/deno.land/std/async/delay.ts"; -import { - assert, - assertEquals, - assertRejects, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { describe, it } from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { delay } from "../../deps/std/async.ts"; +import { assert, assertEquals, assertRejects } from "../../deps/std/assert.ts"; +import { describe, it } from "../../deps/std/testing.ts"; import { nextPort, startRedis, stopRedis } from "../test_util.ts"; import type { Connector, TestServer } from "../test_util.ts"; diff --git a/tests/commands/script.ts b/tests/commands/script.ts index 3169ead3..da60b2a0 100644 --- a/tests/commands/script.ts +++ b/tests/commands/script.ts @@ -1,13 +1,5 @@ -import { - assert, - assertEquals, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - afterEach, - beforeAll, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assert, assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, afterEach, beforeAll, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/set.ts b/tests/commands/set.ts index 47f527e1..c942d0da 100644 --- a/tests/commands/set.ts +++ b/tests/commands/set.ts @@ -2,13 +2,8 @@ import { assert, assertArrayIncludes, assertEquals, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - beforeEach, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +} from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, beforeEach, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/sorted_set.ts b/tests/commands/sorted_set.ts index 732660bf..72a9b2b5 100644 --- a/tests/commands/sorted_set.ts +++ b/tests/commands/sorted_set.ts @@ -1,13 +1,5 @@ -import { - assert, - assertEquals, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - beforeEach, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assert, assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, beforeEach, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands/stream.ts b/tests/commands/stream.ts index fbe3daeb..deb9d27c 100644 --- a/tests/commands/stream.ts +++ b/tests/commands/stream.ts @@ -1,17 +1,13 @@ import { ErrorReplyError, Redis } from "../../mod.ts"; import { parseXId } from "../../stream.ts"; -import { delay } from "../../vendor/https/deno.land/std/async/delay.ts"; +import { delay } from "../../deps/std/async.ts"; import { assert, assertEquals, assertNotEquals, assertRejects, -} from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +} from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; export function streamTests( diff --git a/tests/commands/string.ts b/tests/commands/string.ts index 48f6c5aa..7bc2503b 100644 --- a/tests/commands/string.ts +++ b/tests/commands/string.ts @@ -1,10 +1,5 @@ -import { assertEquals } from "../../vendor/https/deno.land/std/assert/mod.ts"; -import { - afterAll, - beforeAll, - beforeEach, - it, -} from "../../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../../deps/std/assert.ts"; +import { afterAll, beforeAll, beforeEach, it } from "../../deps/std/testing.ts"; import type { Connector, TestServer } from "../test_util.ts"; import type { Redis } from "../../mod.ts"; diff --git a/tests/commands_test.ts b/tests/commands_test.ts index 1a1c2635..316dadfb 100644 --- a/tests/commands_test.ts +++ b/tests/commands_test.ts @@ -18,11 +18,7 @@ import { stringTests } from "./commands/string.ts"; import { connect } from "../redis.ts"; import { connect as connectWebStreamsConnection } from "../experimental/web_streams_connection/mod.ts"; -import { - afterAll, - beforeAll, - describe, -} from "../vendor/https/deno.land/std/testing/bdd.ts"; +import { afterAll, beforeAll, describe } from "../deps/std/testing.ts"; describe("commands", () => { let port!: number; diff --git a/tests/reconnect_test.ts b/tests/reconnect_test.ts index 83518eff..8f6b907c 100644 --- a/tests/reconnect_test.ts +++ b/tests/reconnect_test.ts @@ -1,9 +1,5 @@ -import { assertEquals } from "../vendor/https/deno.land/std/assert/mod.ts"; -import { - beforeAll, - describe, - it, -} from "../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../deps/std/assert.ts"; +import { beforeAll, describe, it } from "../deps/std/testing.ts"; import { newClient, nextPort, startRedis, stopRedis } from "./test_util.ts"; describe("reconnect", () => { diff --git a/tests/test_util.ts b/tests/test_util.ts index 86b8781e..87d88244 100644 --- a/tests/test_util.ts +++ b/tests/test_util.ts @@ -1,5 +1,5 @@ import { connect, Redis, RedisConnectOptions } from "../mod.ts"; -import { delay } from "../vendor/https/deno.land/std/async/delay.ts"; +import { delay } from "../deps/std/async.ts"; export type Connector = typeof connect; export interface TestServer { diff --git a/tests/util_test.ts b/tests/util_test.ts index cc9517b9..68b59f37 100644 --- a/tests/util_test.ts +++ b/tests/util_test.ts @@ -1,6 +1,6 @@ import { parseURL } from "../mod.ts"; -import { assertEquals } from "../vendor/https/deno.land/std/assert/mod.ts"; -import { describe, it } from "../vendor/https/deno.land/std/testing/bdd.ts"; +import { assertEquals } from "../deps/std/assert.ts"; +import { describe, it } from "../deps/std/testing.ts"; describe("util", { permissions: { diff --git a/tools/make_mod.ts b/tools/make_mod.ts index f2ecfd8e..7014693b 100755 --- a/tools/make_mod.ts +++ b/tools/make_mod.ts @@ -1,7 +1,7 @@ #!/usr/bin/env deno run --allow-read --allow-write --allow-run -import { readAll } from "../vendor/https/deno.land/std/io/read_all.ts"; -import { readerFromStreamReader } from "../vendor/https/deno.land/std/streams/reader_from_stream_reader.ts"; +import { readAll } from "../deps/std/io.ts"; +import { readerFromStreamReader } from "../deps/std/streams.ts"; const encoder = new TextEncoder(); const decoder = new TextDecoder(); diff --git a/vendor/https/deno.land/std/assert/mod.ts b/vendor/https/deno.land/std/assert/mod.ts deleted file mode 100644 index d866afce..00000000 --- a/vendor/https/deno.land/std/assert/mod.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/assert/mod.ts"; diff --git a/vendor/https/deno.land/std/async/delay.ts b/vendor/https/deno.land/std/async/delay.ts deleted file mode 100644 index 85a96db5..00000000 --- a/vendor/https/deno.land/std/async/delay.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/async/delay.ts"; diff --git a/vendor/https/deno.land/std/bytes/concat.ts b/vendor/https/deno.land/std/bytes/concat.ts deleted file mode 100644 index 2f7ae24b..00000000 --- a/vendor/https/deno.land/std/bytes/concat.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/bytes/concat.ts"; diff --git a/vendor/https/deno.land/std/io/buf_reader.ts b/vendor/https/deno.land/std/io/buf_reader.ts deleted file mode 100644 index 402b1241..00000000 --- a/vendor/https/deno.land/std/io/buf_reader.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/io/buf_reader.ts"; diff --git a/vendor/https/deno.land/std/io/buf_writer.ts b/vendor/https/deno.land/std/io/buf_writer.ts deleted file mode 100644 index 4ea206fa..00000000 --- a/vendor/https/deno.land/std/io/buf_writer.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/io/buf_writer.ts"; diff --git a/vendor/https/deno.land/std/io/read_all.ts b/vendor/https/deno.land/std/io/read_all.ts deleted file mode 100644 index eff6fcae..00000000 --- a/vendor/https/deno.land/std/io/read_all.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/io/read_all.ts"; diff --git a/vendor/https/deno.land/std/streams/reader_from_stream_reader.ts b/vendor/https/deno.land/std/streams/reader_from_stream_reader.ts deleted file mode 100644 index fc9f688c..00000000 --- a/vendor/https/deno.land/std/streams/reader_from_stream_reader.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/streams/reader_from_stream_reader.ts"; diff --git a/vendor/https/deno.land/std/testing/bdd.ts b/vendor/https/deno.land/std/testing/bdd.ts deleted file mode 100644 index baea27b1..00000000 --- a/vendor/https/deno.land/std/testing/bdd.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "https://deno.land/std@0.224.0/testing/bdd.ts"; diff --git a/vendor/https/esm.sh/cluster-key-slot/lib/index.js b/vendor/https/esm.sh/cluster-key-slot/lib/index.js deleted file mode 100644 index 64665bb5..00000000 --- a/vendor/https/esm.sh/cluster-key-slot/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "https://esm.sh/cluster-key-slot@1.1.0/lib/index.js"; -import { default as dew } from "https://esm.sh/cluster-key-slot@1.1.0/lib/index.js"; -export default dew; diff --git a/vendor/https/esm.sh/lodash-es/sample.js b/vendor/https/esm.sh/lodash-es/sample.js deleted file mode 100644 index dcec9dca..00000000 --- a/vendor/https/esm.sh/lodash-es/sample.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "https://esm.sh/lodash-es@4.17.21/sample.js"; -import { default as dew } from "https://esm.sh/lodash-es@4.17.21/sample.js"; -export default dew; diff --git a/vendor/https/esm.sh/lodash-es/shuffle.js b/vendor/https/esm.sh/lodash-es/shuffle.js deleted file mode 100644 index 6f92b206..00000000 --- a/vendor/https/esm.sh/lodash-es/shuffle.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "https://esm.sh/lodash-es@4.17.21/shuffle.js"; -import { default as dew } from "https://esm.sh/lodash-es@4.17.21/shuffle.js"; -export default dew; diff --git a/vendor/https/esm.sh/lodash-es/uniqBy.js b/vendor/https/esm.sh/lodash-es/uniqBy.js deleted file mode 100644 index 34ade107..00000000 --- a/vendor/https/esm.sh/lodash-es/uniqBy.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "https://esm.sh/lodash-es@4.17.21/uniqBy.js"; -import { default as dew } from "https://esm.sh/lodash-es@4.17.21/uniqBy.js"; -export default dew;