Skip to content

Commit 4966a6d

Browse files
authored
chore: update std to 0.79.0 (#9)
2 parents 2a5b705 + 252c2df commit 4966a6d

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
deno-version: [v1.4.2, nightly]
15+
deno-version: [v1.x, nightly]
1616
unstable: [false, true]
17-
# FIXME(lucacasonato): temporarially disable no-check testing (see https://github.com/denoland/deno/issues/7709)
18-
no-check: [false]
17+
no-check: [false, true]
1918
steps:
2019
- name: Setup Deno environment
21-
uses: denolib/setup-deno@v2.2.0
20+
uses: denolib/setup-deno@v2.3.0
2221
with:
2322
deno-version: ${{ matrix.deno-version }}
2423

deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export { hmac } from "https://denopkg.com/chiefbiiko/hmac@v1.0.2/mod.ts";
22

3-
import { createHash } from "https://deno.land/std@0.71.0/hash/mod.ts";
3+
import { createHash } from "https://deno.land/std@0.79.0/hash/mod.ts";
44
export function sha256Hex(data: string | Uint8Array): string {
55
const hasher = createHash("sha256");
66
hasher.update(data);

mod_test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { AWSSignerV4 } from "./mod.ts";
22
import {
33
assertEquals,
4-
assertStringContains,
5-
} from "https://deno.land/std@0.71.0/testing/asserts.ts";
4+
assertStringIncludes,
5+
} from "https://deno.land/std@0.79.0/testing/asserts.ts";
66

77
Deno.test("construct from env vars", async () => {
88
Deno.env.set("AWS_ACCESS_KEY_ID", "examplekey");
@@ -26,14 +26,14 @@ Deno.test("construct from env vars", async () => {
2626
const today = `${now.getFullYear()}${
2727
(now.getMonth() + 1).toString().padStart(2, "0")
2828
}${now.getDate().toString().padStart(2, "0")}`;
29-
assertStringContains(req.headers.get("x-amz-date")!, `${today}T`);
29+
assertStringIncludes(req.headers.get("x-amz-date")!, `${today}T`);
3030
assertEquals(req.headers.get("x-amz-security-token"), "sessiontoken");
3131
assertEquals(req.headers.get("x-hello"), "world");
3232
assertEquals(
3333
req.headers.get("host"),
3434
"test.dynamodb.us-east-1.amazonaws.com",
3535
);
36-
assertStringContains(
36+
assertStringIncludes(
3737
req.headers.get("Authorization")!,
3838
`AWS4-HMAC-SHA256 Credential=examplekey/${today}/us-east-1/dynamodb/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token;x-hello, Signature=`,
3939
);
@@ -60,14 +60,14 @@ Deno.test("construct manually", async () => {
6060
const today = `${now.getFullYear()}${
6161
(now.getMonth() + 1).toString().padStart(2, "0")
6262
}${now.getDate().toString().padStart(2, "0")}`;
63-
assertStringContains(req.headers.get("x-amz-date")!, `${today}T`);
63+
assertStringIncludes(req.headers.get("x-amz-date")!, `${today}T`);
6464
assertEquals(req.headers.get("x-amz-security-token"), "session_token");
6565
assertEquals(req.headers.get("x-hello"), "world");
6666
assertEquals(
6767
req.headers.get("host"),
6868
"test.dynamodb.us-east-1.amazonaws.com",
6969
);
70-
assertStringContains(
70+
assertStringIncludes(
7171
req.headers.get("Authorization")!,
7272
`AWS4-HMAC-SHA256 Credential=example_key/${today}/us-east-2/dynamodb/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token;x-hello, Signature=`,
7373
);

0 commit comments

Comments
 (0)