Skip to content

Commit 85f0aec

Browse files
authored
Merge pull request #159 from Soremwar/deno_v1.2.2
Bump Deno to v1.2.2, replace checksum lib for std/hash
2 parents 28249fb + a0e91b5 commit 85f0aec

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install deno
2828
uses: denolib/setup-deno@master
2929
with:
30-
deno-version: 1.2.0
30+
deno-version: 1.2.2
3131

3232
- name: Check formatting
3333
run: deno fmt --check

connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727
*/
2828

29-
import { BufReader, BufWriter, Hash } from "./deps.ts";
29+
import { BufReader, BufWriter } from "./deps.ts";
3030
import { PacketWriter } from "./packet_writer.ts";
3131
import { hashMd5Password, readUInt32BE } from "./utils.ts";
3232
import { PacketReader } from "./packet_reader.ts";

deps.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
export {
22
BufReader,
33
BufWriter,
4-
} from "https://deno.land/[email protected]/io/bufio.ts";
5-
6-
export { copyBytes } from "https://deno.land/[email protected]/bytes/mod.ts";
7-
4+
} from "https://deno.land/[email protected]/io/bufio.ts";
5+
export { copyBytes } from "https://deno.land/[email protected]/bytes/mod.ts";
86
export {
97
Deferred,
108
deferred,
11-
} from "https://deno.land/[email protected]/async/deferred.ts";
12-
13-
export { Hash } from "https://deno.land/x/[email protected]/mod.ts";
9+
} from "https://deno.land/[email protected]/async/deferred.ts";
10+
export { createHash } from "https://deno.land/[email protected]/hash/mod.ts";

test_deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ export {
55
assertStringContains,
66
assertThrows,
77
assertThrowsAsync,
8-
} from "https://deno.land/std@0.61.0/testing/asserts.ts";
8+
} from "https://deno.land/std@0.63.0/testing/asserts.ts";

utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Hash } from "./deps.ts";
1+
import { createHash } from "./deps.ts";
22

33
export function readInt16BE(buffer: Uint8Array, offset: number): number {
44
offset = offset >>> 0;
@@ -36,7 +36,7 @@ export function readUInt32BE(buffer: Uint8Array, offset: number): number {
3636
const encoder = new TextEncoder();
3737

3838
function md5(bytes: Uint8Array): string {
39-
return new Hash("md5").digest(bytes).hex();
39+
return createHash("md5").update(bytes).toString("hex");
4040
}
4141

4242
// https://www.postgresql.org/docs/current/protocol-flow.html

0 commit comments

Comments
 (0)