Skip to content

Commit 87c0cca

Browse files
authored
1 parent 2e0e600 commit 87c0cca

File tree

11 files changed

+28
-13
lines changed

11 files changed

+28
-13
lines changed

.denov

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.24.0
1+
v0.25.0

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: Run Tests
2121
run: |
2222
export PATH=$HOME/.deno/bin:$PATH
23-
deno -A test
23+
deno test -A

.github/workflows/bump.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Bump
22

33
on:
4+
push:
5+
branches:
6+
- ci-test
47
schedule:
58
- cron: 0 13 * * *
69
jobs:
@@ -13,7 +16,7 @@ jobs:
1316
- 6379:6379
1417
steps:
1518
- uses: actions/checkout@v1
16-
- uses: keroxp/[email protected].0
19+
- uses: keroxp/[email protected].3
1720
with:
1821
github-repository: ${{ github.repository }}
1922
github-token: ${{ secrets.GITHUB_TOKEN }}

modules-lock.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"https://deno.land/std": {
3-
"version": "@v0.24.0",
3+
"version": "@v0.25.0",
44
"modules": [
55
"/util/async.ts",
66
"/testing/mod.ts",
@@ -9,4 +9,4 @@
99
"/fmt/colors.ts"
1010
]
1111
}
12-
}
12+
}

modules.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"https://deno.land/std": {
3-
"version": "@v0.24.0",
3+
"version": "@v0.25.0",
44
"modules": [
55
"/util/async.ts",
66
"/testing/mod.ts",

redis.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,18 @@ export type RedisConnectOptions = {
15511551
db?: number;
15521552
};
15531553

1554+
function prasePortLike(port: string | number | undefined): number {
1555+
if (typeof port === "string") {
1556+
return parseInt(port);
1557+
} else if (typeof port === "number") {
1558+
return port;
1559+
} else if (port === undefined) {
1560+
return 6379;
1561+
} else {
1562+
throw new Error("port is invalid: typeof=" + typeof port);
1563+
}
1564+
}
1565+
15541566
/**
15551567
* Connect to Redis server
15561568
* @param opts redis server's url http/https url with port number
@@ -1562,11 +1574,11 @@ export async function connect({
15621574
hostname,
15631575
port,
15641576
tls,
1565-
db,
1577+
db
15661578
}: RedisConnectOptions): Promise<Redis> {
15671579
const dialOpts: DialOptions = {
15681580
hostname,
1569-
port: typeof port === "string" ? parseInt(port) : port ?? 6379
1581+
port: prasePortLike(port)
15701582
};
15711583
if (!Number.isSafeInteger(dialOpts.port)) {
15721584
throw new Error("deno-redis: opts.port is invalid");
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@v0.24.0/fmt/colors.ts";
1+
export * from "https://deno.land/std@v0.25.0/fmt/colors.ts";
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@v0.24.0/io/bufio.ts";
1+
export * from "https://deno.land/std@v0.25.0/io/bufio.ts";
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@v0.24.0/testing/asserts.ts";
1+
export * from "https://deno.land/std@v0.25.0/testing/asserts.ts";
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@v0.24.0/testing/mod.ts";
1+
export * from "https://deno.land/std@v0.25.0/testing/mod.ts";
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "https://deno.land/std@v0.24.0/util/async.ts";
1+
export * from "https://deno.land/std@v0.25.0/util/async.ts";

0 commit comments

Comments
 (0)