Skip to content

Commit

Permalink
0.108.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk authored Sep 22, 2021
1 parent b8e946e commit 7a1db16
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
12 changes: 12 additions & 0 deletions Releases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### 0.108.0 / 2021.09.21

- fix: use `strict-ts44.tsconfig.json` on release tests (#1278)
- fix(collections): improve handling of arrays containing undefined (#1282)
- feat(testing/asserts): add `assertThrows()` overload to receive error (#1219)
- feat(std/node): add `ParsedUrlQuery` to `querystring` (#1229)
- feat(collections): use function overloading (#1286)
- chore(node/events): remove unnecessary `@ts-ignore` comments (#1280)
- docs(collections): add browser-compatibility comment (#1285)
- docs(encoding): add hex docs (#1287)
- docs(collections): replace console.assert with assertEquals (#1293)

### 0.107.0 / 2021.09.14

- BREAKING(http): cookie headers as params (#1041)
Expand Down
2 changes: 1 addition & 1 deletion node/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export class Buffer extends Uint8Array {

const b = this.subarray(start, end);
if (encoding === "hex") return new TextDecoder().decode(hex.encode(b));
if (encoding === "base64") return base64.encode(b.buffer);
if (encoding === "base64") return base64.encode(b);

return new TextDecoder(encoding).decode(b);
}
Expand Down
16 changes: 8 additions & 8 deletions node/string_decoder_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ Deno.test({
let decoder;

decoder = new StringDecoder("base64");
assertEquals(decoder.write(Buffer.from("E1", "hex")), "4Q==");
assertEquals(decoder.end(), "4QAA");
assertEquals(decoder.write(Buffer.from("E1", "hex")), "");
assertEquals(decoder.end(), "4Q==");

decoder = new StringDecoder("base64");
assertEquals(decoder.write(Buffer.from("E18B", "hex")), "4Ys=");
assertEquals(decoder.end(), "4YsA");
assertEquals(decoder.write(Buffer.from("E18B", "hex")), "");
assertEquals(decoder.end(), "4Ys=");

decoder = new StringDecoder("base64");
assertEquals(decoder.write(Buffer.from("\ufffd")), "77+9");
Expand All @@ -66,16 +66,16 @@ Deno.test({
assertEquals(decoder.end(), "");

decoder = new StringDecoder("base64");
assertEquals(decoder.write(Buffer.from("EFBFBDE2", "hex")), "77+94g==");
assertEquals(decoder.end(), "4gAA");
assertEquals(decoder.write(Buffer.from("EFBFBDE2", "hex")), "77+9");
assertEquals(decoder.end(), "4g==");

decoder = new StringDecoder("base64");
assertEquals(decoder.write(Buffer.from("F1", "hex")), "8Q==");
assertEquals(decoder.write(Buffer.from("F1", "hex")), "");
assertEquals(decoder.write(Buffer.from("41F2", "hex")), "8UHy");
assertEquals(decoder.end(), "");

decoder = new StringDecoder("base64");
assertEquals(decoder.text(Buffer.from([0x41]), 2), "QQ==");
assertEquals(decoder.text(Buffer.from([0x41]), 2), "");
},
});

Expand Down
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* the cli's API is stable. In the future when std becomes stable, likely we
* will match versions with cli as we have in the past.
*/
export const VERSION = "0.107.0";
export const VERSION = "0.108.0";

0 comments on commit 7a1db16

Please sign in to comment.