mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
0.108.0
This commit is contained in:
parent
b8e946ee76
commit
7a1db16dba
12
Releases.md
12
Releases.md
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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), "");
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user