Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(encoding/unstable): move base64url-stream module to unstable-base64url-stream #5959

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _tools/check_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const ENTRY_POINTS = [
"../encoding/unstable_base64_stream.ts",
"../encoding/unstable_base32hex_stream.ts",
"../encoding/unstable_base32_stream.ts",
"../encoding/unstable_base64url_stream.ts",
"../encoding/unstable_base32hex_stream.ts",
"../encoding/unstable_hex_stream.ts",
"../expect/mod.ts",
Expand Down
2 changes: 1 addition & 1 deletion encoding/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"./base64": "./base64.ts",
"./unstable-base64-stream": "./unstable_base64_stream.ts",
"./base64url": "./base64url.ts",
"./base64url-stream": "./base64url_stream.ts",
"./unstable-base64url-stream": "./unstable_base64url_stream.ts",
"./hex": "./hex.ts",
"./unstable-hex-stream": "./unstable_hex_stream.ts",
"./varint": "./varint.ts"
Expand Down
1 change: 0 additions & 1 deletion encoding/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ export * from "./base32.ts";
export * from "./base58.ts";
export * from "./base64.ts";
export * from "./base64url.ts";
export * from "./base64url_stream.ts";
export * from "./hex.ts";
export * from "./varint.ts";
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
/**
* Utilities for encoding and decoding to and from base64url in a streaming manner.
*
* ```ts
* import { assertEquals } from "@std/assert";
* import { Base64UrlDecoderStream } from "@std/encoding/unstable-base64url-stream";
* import { toText } from "@std/streams/to-text";
*
* const stream = ReadableStream.from(["SGVsbG8s", "IHdvcmxkIQ"])
* .pipeThrough(new Base64UrlDecoderStream())
* .pipeThrough(new TextDecoderStream());
*
* assertEquals(await toText(stream), "Hello, world!");
* ```
*
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @module
Expand All @@ -22,7 +34,7 @@ import { decodeBase64Url, encodeBase64Url } from "./base64url.ts";
* ```ts
* import { assertEquals } from "@std/assert";
* import { encodeBase64Url } from "@std/encoding/base64url";
* import { Base64UrlEncoderStream } from "@std/encoding/base64url-stream";
* import { Base64UrlEncoderStream } from "@std/encoding/unstable-base64url-stream";
* import { toText } from "@std/streams/to-text";
*
* const stream = ReadableStream.from(["Hello,", " world!"])
Expand Down Expand Up @@ -68,7 +80,7 @@ export class Base64UrlEncoderStream
* ```ts
* import { assertEquals } from "@std/assert";
* import { encodeBase64Url } from "@std/encoding/base64url";
* import { Base64UrlDecoderStream } from "@std/encoding/base64url-stream";
* import { Base64UrlDecoderStream } from "@std/encoding/unstable-base64url-stream";
* import { toText } from "@std/streams/to-text";
*
* const stream = ReadableStream.from(["SGVsbG8s", "IHdvcmxkIQ"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { encodeBase64Url } from "./base64url.ts";
import {
Base64UrlDecoderStream,
Base64UrlEncoderStream,
} from "./base64url_stream.ts";
} from "./unstable_base64url_stream.ts";
import { RandomSliceStream } from "./_random_slice_stream.ts";
import { toText } from "@std/streams/to-text";
import { concat } from "@std/bytes/concat";
Expand Down