Skip to content

Commit

Permalink
Merge pull request #159 from Soremwar/deno_v1.2.2
Browse files Browse the repository at this point in the history
Bump Deno to v1.2.2, replace checksum lib for std/hash
  • Loading branch information
hayd authored Aug 3, 2020
2 parents 28249fb + a0e91b5 commit 85f0aec
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install deno
uses: denolib/setup-deno@master
with:
deno-version: 1.2.0
deno-version: 1.2.2

- name: Check formatting
run: deno fmt --check
Expand Down
2 changes: 1 addition & 1 deletion connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import { BufReader, BufWriter, Hash } from "./deps.ts";
import { BufReader, BufWriter } from "./deps.ts";
import { PacketWriter } from "./packet_writer.ts";
import { hashMd5Password, readUInt32BE } from "./utils.ts";
import { PacketReader } from "./packet_reader.ts";
Expand Down
11 changes: 4 additions & 7 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
export {
BufReader,
BufWriter,
} from "https://deno.land/[email protected]/io/bufio.ts";

export { copyBytes } from "https://deno.land/[email protected]/bytes/mod.ts";

} from "https://deno.land/[email protected]/io/bufio.ts";
export { copyBytes } from "https://deno.land/[email protected]/bytes/mod.ts";
export {
Deferred,
deferred,
} from "https://deno.land/[email protected]/async/deferred.ts";

export { Hash } from "https://deno.land/x/[email protected]/mod.ts";
} from "https://deno.land/[email protected]/async/deferred.ts";
export { createHash } from "https://deno.land/[email protected]/hash/mod.ts";
2 changes: 1 addition & 1 deletion test_deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export {
assertStringContains,
assertThrows,
assertThrowsAsync,
} from "https://deno.land/std@0.61.0/testing/asserts.ts";
} from "https://deno.land/std@0.63.0/testing/asserts.ts";
4 changes: 2 additions & 2 deletions utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Hash } from "./deps.ts";
import { createHash } from "./deps.ts";

export function readInt16BE(buffer: Uint8Array, offset: number): number {
offset = offset >>> 0;
Expand Down Expand Up @@ -36,7 +36,7 @@ export function readUInt32BE(buffer: Uint8Array, offset: number): number {
const encoder = new TextEncoder();

function md5(bytes: Uint8Array): string {
return new Hash("md5").digest(bytes).hex();
return createHash("md5").update(bytes).toString("hex");
}

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

0 comments on commit 85f0aec

Please sign in to comment.