This commit is contained in:
Kitson Kelly 2021-09-22 12:17:08 +10:00 committed by GitHub
parent b8e946ee76
commit 7a1db16dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 10 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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");
@ -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), "");
},
});

View File

@ -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";