Skip to content

Commit

Permalink
feat: use dink for module version management (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
keroxp authored Sep 14, 2019
1 parent 80d5132 commit 31f3127
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.ts]
indent_style = space
indent_size = 2
5 changes: 1 addition & 4 deletions io.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
BufReader,
BufWriter
} from "https://deno.land/[email protected]/io/bufio.ts";
import { BufReader, BufWriter } from "./vendor/https/deno.land/std/io/bufio.ts";
import Buffer = Deno.Buffer;
import { ErrorReplyError } from "./errors.ts";

Expand Down
6 changes: 6 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"https://deno.land/std": {
"version": "@v0.17.0",
"modules": ["/testing/mod.ts", "/testing/asserts.ts", "/io/bufio.ts"]
}
}
5 changes: 1 addition & 4 deletions pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
BufReader,
BufWriter
} from "https://deno.land/[email protected]/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";
Expand Down
4 changes: 2 additions & 2 deletions pipeline_test.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
5 changes: 1 addition & 4 deletions pubsub.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
BufReader,
BufWriter
} from "https://deno.land/[email protected]/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 = {
Expand Down
4 changes: 2 additions & 2 deletions pubsub_test.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
5 changes: 1 addition & 4 deletions redis.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
type Reader = Deno.Reader;
type Writer = Deno.Writer;
type Closer = Deno.Closer;
import {
BufReader,
BufWriter
} from "https://deno.land/[email protected]/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";
Expand Down
4 changes: 2 additions & 2 deletions redis_test.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
3 changes: 2 additions & 1 deletion test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "./redis_test.ts";
import "./pubsub_test.ts";
import "./pipeline_test.ts";
import "https://deno.land/[email protected]/testing/main.ts";
import { runIfMain } from "./vendor/https/deno.land/std/testing/mod.ts";
runIfMain(import.meta);
1 change: 1 addition & 0 deletions vendor/https/deno.land/std/io/bufio.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "https://deno.land/[email protected]/io/bufio.ts";
1 change: 1 addition & 0 deletions vendor/https/deno.land/std/testing/asserts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "https://deno.land/[email protected]/testing/asserts.ts";
1 change: 1 addition & 0 deletions vendor/https/deno.land/std/testing/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "https://deno.land/[email protected]/testing/mod.ts";

0 comments on commit 31f3127

Please sign in to comment.