From 87c0ccab5fd84f8dd9cfbdf2896d6ff6ba4438b4 Mon Sep 17 00:00:00 2001 From: Yusuke Sakurai Date: Thu, 28 Nov 2019 23:24:50 +0900 Subject: [PATCH] bump: deno@v0.25.0 (#34) * bump: dink-bot@v0.3.3 * bump: deno@v0.25.0 --- .denov | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/bump.yml | 5 ++++- modules-lock.json | 4 ++-- modules.json | 2 +- redis.ts | 16 ++++++++++++++-- vendor/https/deno.land/std/fmt/colors.ts | 2 +- vendor/https/deno.land/std/io/bufio.ts | 2 +- vendor/https/deno.land/std/testing/asserts.ts | 2 +- vendor/https/deno.land/std/testing/mod.ts | 2 +- vendor/https/deno.land/std/util/async.ts | 2 +- 11 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.denov b/.denov index a2837254..5bd9725a 100644 --- a/.denov +++ b/.denov @@ -1 +1 @@ -v0.24.0 \ No newline at end of file +v0.25.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7caf2d8c..914eae7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,4 +20,4 @@ jobs: - name: Run Tests run: | export PATH=$HOME/.deno/bin:$PATH - deno -A test + deno test -A diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index d27d5f8e..034ac4c2 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -1,6 +1,9 @@ name: Bump on: + push: + branches: + - ci-test schedule: - cron: 0 13 * * * jobs: @@ -13,7 +16,7 @@ jobs: - 6379:6379 steps: - uses: actions/checkout@v1 - - uses: keroxp/dink-bot@v0.3.0 + - uses: keroxp/dink-bot@v0.3.3 with: github-repository: ${{ github.repository }} github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/modules-lock.json b/modules-lock.json index b3ba8286..76e04201 100644 --- a/modules-lock.json +++ b/modules-lock.json @@ -1,6 +1,6 @@ { "https://deno.land/std": { - "version": "@v0.24.0", + "version": "@v0.25.0", "modules": [ "/util/async.ts", "/testing/mod.ts", @@ -9,4 +9,4 @@ "/fmt/colors.ts" ] } -} +} \ No newline at end of file diff --git a/modules.json b/modules.json index b3ba8286..d16b41e8 100644 --- a/modules.json +++ b/modules.json @@ -1,6 +1,6 @@ { "https://deno.land/std": { - "version": "@v0.24.0", + "version": "@v0.25.0", "modules": [ "/util/async.ts", "/testing/mod.ts", diff --git a/redis.ts b/redis.ts index da068319..62ea7de8 100644 --- a/redis.ts +++ b/redis.ts @@ -1551,6 +1551,18 @@ export type RedisConnectOptions = { db?: number; }; +function prasePortLike(port: string | number | undefined): number { + if (typeof port === "string") { + return parseInt(port); + } else if (typeof port === "number") { + return port; + } else if (port === undefined) { + return 6379; + } else { + throw new Error("port is invalid: typeof=" + typeof port); + } +} + /** * Connect to Redis server * @param opts redis server's url http/https url with port number @@ -1562,11 +1574,11 @@ export async function connect({ hostname, port, tls, - db, + db }: RedisConnectOptions): Promise { const dialOpts: DialOptions = { hostname, - port: typeof port === "string" ? parseInt(port) : port ?? 6379 + port: prasePortLike(port) }; if (!Number.isSafeInteger(dialOpts.port)) { throw new Error("deno-redis: opts.port is invalid"); diff --git a/vendor/https/deno.land/std/fmt/colors.ts b/vendor/https/deno.land/std/fmt/colors.ts index 156f1a05..f5b82f6d 100644 --- a/vendor/https/deno.land/std/fmt/colors.ts +++ b/vendor/https/deno.land/std/fmt/colors.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.24.0/fmt/colors.ts"; +export * from "https://deno.land/std@v0.25.0/fmt/colors.ts"; diff --git a/vendor/https/deno.land/std/io/bufio.ts b/vendor/https/deno.land/std/io/bufio.ts index 1089c955..995ea647 100644 --- a/vendor/https/deno.land/std/io/bufio.ts +++ b/vendor/https/deno.land/std/io/bufio.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.24.0/io/bufio.ts"; +export * from "https://deno.land/std@v0.25.0/io/bufio.ts"; diff --git a/vendor/https/deno.land/std/testing/asserts.ts b/vendor/https/deno.land/std/testing/asserts.ts index 2f5e3e52..75e2caf3 100644 --- a/vendor/https/deno.land/std/testing/asserts.ts +++ b/vendor/https/deno.land/std/testing/asserts.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.24.0/testing/asserts.ts"; +export * from "https://deno.land/std@v0.25.0/testing/asserts.ts"; diff --git a/vendor/https/deno.land/std/testing/mod.ts b/vendor/https/deno.land/std/testing/mod.ts index 06fe96ef..ec5855be 100644 --- a/vendor/https/deno.land/std/testing/mod.ts +++ b/vendor/https/deno.land/std/testing/mod.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.24.0/testing/mod.ts"; +export * from "https://deno.land/std@v0.25.0/testing/mod.ts"; diff --git a/vendor/https/deno.land/std/util/async.ts b/vendor/https/deno.land/std/util/async.ts index e54360a1..453c886a 100644 --- a/vendor/https/deno.land/std/util/async.ts +++ b/vendor/https/deno.land/std/util/async.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.24.0/util/async.ts"; +export * from "https://deno.land/std@v0.25.0/util/async.ts";