diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..f7926408 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[*.ts] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/io.ts b/io.ts index 3c206cee..655eea31 100644 --- a/io.ts +++ b/io.ts @@ -1,7 +1,4 @@ -import { - BufReader, - BufWriter -} from "https://deno.land/std@v0.17.0/io/bufio.ts"; +import { BufReader, BufWriter } from "./vendor/https/deno.land/std/io/bufio.ts"; import Buffer = Deno.Buffer; import { ErrorReplyError } from "./errors.ts"; diff --git a/modules.json b/modules.json new file mode 100644 index 00000000..af8d2bda --- /dev/null +++ b/modules.json @@ -0,0 +1,6 @@ +{ + "https://deno.land/std": { + "version": "@v0.17.0", + "modules": ["/testing/mod.ts", "/testing/asserts.ts", "/io/bufio.ts"] + } +} diff --git a/pipeline.ts b/pipeline.ts index f0d7e889..c495c4c2 100644 --- a/pipeline.ts +++ b/pipeline.ts @@ -1,7 +1,4 @@ -import { - BufReader, - BufWriter -} from "https://deno.land/std@v0.17.0/io/bufio.ts"; +import { BufReader, BufWriter } from "./vendor/https/deno.land/std/io/bufio.ts"; import { createRequest, readReply, RedisRawReply } from "./io.ts"; import { ErrorReplyError } from "./errors.ts"; import { create, Redis } from "./redis.ts"; diff --git a/pipeline_test.ts b/pipeline_test.ts index c1bc2fbf..8a902a05 100644 --- a/pipeline_test.ts +++ b/pipeline_test.ts @@ -1,5 +1,5 @@ -import { test } from "https://deno.land/std@v0.17.0/testing/mod.ts"; -import { assertEquals } from "https://deno.land/std@v0.17.0/testing/asserts.ts"; +import { test } from "./vendor/https/deno.land/std/testing/mod.ts"; +import { assertEquals } from "./vendor/https/deno.land/std/testing/asserts.ts"; import { connect } from "./redis.ts"; const addr = "127.0.0.1:6379"; diff --git a/pubsub.ts b/pubsub.ts index 68574335..f80ffef9 100644 --- a/pubsub.ts +++ b/pubsub.ts @@ -1,7 +1,4 @@ -import { - BufReader, - BufWriter -} from "https://deno.land/std@v0.17.0/io/bufio.ts"; +import { BufReader, BufWriter } from "./vendor/https/deno.land/std/io/bufio.ts"; import { createRequest, readArrayReply, sendCommand } from "./io.ts"; export type RedisSubscription = { diff --git a/pubsub_test.ts b/pubsub_test.ts index 38349a8e..f234e19d 100644 --- a/pubsub_test.ts +++ b/pubsub_test.ts @@ -1,5 +1,5 @@ -import { test } from "https://deno.land/std@v0.17.0/testing/mod.ts"; -import { assertEquals } from "https://deno.land/std@v0.17.0/testing/asserts.ts"; +import { test } from "./vendor/https/deno.land/std/testing/mod.ts"; +import { assertEquals } from "./vendor/https/deno.land/std/testing/asserts.ts"; import { connect } from "./redis.ts"; import { RedisPubSubMessage } from "./pubsub.ts"; diff --git a/redis.ts b/redis.ts index 3519d7ad..303055f9 100644 --- a/redis.ts +++ b/redis.ts @@ -1,10 +1,7 @@ type Reader = Deno.Reader; type Writer = Deno.Writer; type Closer = Deno.Closer; -import { - BufReader, - BufWriter -} from "https://deno.land/std@v0.17.0/io/bufio.ts"; +import { BufReader, BufWriter } from "./vendor/https/deno.land/std/io/bufio.ts"; import { ConnectionClosedError } from "./errors.ts"; import { psubscribe, RedisSubscription, subscribe } from "./pubsub.ts"; import { RedisRawReply, sendCommand } from "./io.ts"; diff --git a/redis_test.ts b/redis_test.ts index 04220ad5..4c241fc9 100644 --- a/redis_test.ts +++ b/redis_test.ts @@ -1,6 +1,6 @@ import { connect } from "./redis.ts"; -import { test } from "https://deno.land/std@v0.17.0/testing/mod.ts"; -import { assertEquals } from "https://deno.land/std@v0.17.0/testing/asserts.ts"; +import { test } from "./vendor/https/deno.land/std/testing/mod.ts"; +import { assertEquals } from "./vendor/https/deno.land/std/testing/asserts.ts"; // can be substituted with env variable const addr = "127.0.0.1:6379"; diff --git a/test.ts b/test.ts index 4475e06e..e8d53fe7 100644 --- a/test.ts +++ b/test.ts @@ -1,4 +1,5 @@ import "./redis_test.ts"; import "./pubsub_test.ts"; import "./pipeline_test.ts"; -import "https://deno.land/std@v0.17.0/testing/main.ts"; +import { runIfMain } from "./vendor/https/deno.land/std/testing/mod.ts"; +runIfMain(import.meta); diff --git a/vendor/https/deno.land/std/io/bufio.ts b/vendor/https/deno.land/std/io/bufio.ts new file mode 100644 index 00000000..46982d6a --- /dev/null +++ b/vendor/https/deno.land/std/io/bufio.ts @@ -0,0 +1 @@ +export * from "https://deno.land/std@v0.17.0/io/bufio.ts"; diff --git a/vendor/https/deno.land/std/testing/asserts.ts b/vendor/https/deno.land/std/testing/asserts.ts new file mode 100644 index 00000000..b9591202 --- /dev/null +++ b/vendor/https/deno.land/std/testing/asserts.ts @@ -0,0 +1 @@ +export * from "https://deno.land/std@v0.17.0/testing/asserts.ts"; diff --git a/vendor/https/deno.land/std/testing/mod.ts b/vendor/https/deno.land/std/testing/mod.ts new file mode 100644 index 00000000..adf3ebec --- /dev/null +++ b/vendor/https/deno.land/std/testing/mod.ts @@ -0,0 +1 @@ +export * from "https://deno.land/std@v0.17.0/testing/mod.ts";