Skip to content

Commit

Permalink
docs(archive,assert,cache,cli,encoding,html,http,net,streams,text): r…
Browse files Browse the repository at this point in the history
…emove unstable Markdown alert (#5672)

* docs(archive,cli,html,http,net,streams,text): remove unstable Markdown alert

* update

* fix

* update

* fmt

* fix
  • Loading branch information
iuioiua authored Aug 22, 2024
1 parent afb9a4f commit dea7d77
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 143 deletions.
10 changes: 3 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,14 @@ So concrete examples are:
### Notices for unstable APIs

Each unstable API must have the
[`@experimental`](https://tsdoc.org/pages/tags/experimental/) TSDoc tag and a
[warning alert](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts)
after the starting description.
[`@experimental`](https://tsdoc.org/pages/tags/experimental/) TSDoc tag after
the starting description.

```ts
/**
* <description>
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* ...
*/
Expand Down
10 changes: 2 additions & 8 deletions archive/_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import type { Reader } from "@std/io/types";
/**
* Base interface for {@linkcode TarMeta}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface TarInfo {
/**
Expand Down Expand Up @@ -47,10 +44,7 @@ export interface TarInfo {
/**
* Base interface for {@linkcode TarMetaWithLinkName}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface TarMeta extends TarInfo {
/**
Expand Down
7 changes: 2 additions & 5 deletions archive/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* Tar is a utility for collecting multiple files (or any arbitrary data) into one
* archive file, while untar is the inverse utility to extract the files from an
* archive. Files are not compressed, only collected into the archive.
* archive. Files are not compressed, only collected into the archive.
*
* ```ts no-eval
* import { Tar } from "@std/archive/tar";
Expand Down Expand Up @@ -62,10 +62,7 @@
* writer.close();
* ```
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @module
*/
Expand Down
20 changes: 4 additions & 16 deletions archive/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ export type { TarInfo, TarMeta };
/**
* Options for {@linkcode Tar.append}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface TarOptions extends TarInfo {
/**
Expand Down Expand Up @@ -125,10 +122,7 @@ function formatHeader(data: TarData): Uint8Array {
/**
* Base interface for {@linkcode TarDataWithSource}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface TarData {
/** Name of the file, excluding directory names (if any). */
Expand Down Expand Up @@ -179,10 +173,7 @@ export interface TarData {
/**
* Tar data interface for {@linkcode Tar.data}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface TarDataWithSource extends TarData {
/**
Expand Down Expand Up @@ -250,10 +241,7 @@ export interface TarDataWithSource extends TarData {
* writer.close();
* ```
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export class Tar {
/** Tar data. */
Expand Down
25 changes: 5 additions & 20 deletions archive/untar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ export type { Reader };
* Extend TarMeta with the `linkName` property so that readers can access
* symbolic link values without polluting the world of archive writers.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface TarMetaWithLinkName extends TarMeta {
/** File name of the symbolic link. */
Expand All @@ -59,10 +56,7 @@ export interface TarMetaWithLinkName extends TarMeta {
/**
* Tar header with raw, unprocessed bytes as values.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export type TarHeader = {
[key in UstarFields]: Uint8Array;
Expand Down Expand Up @@ -102,10 +96,7 @@ function parseHeader(buffer: Uint8Array): TarHeader {
/**
* Tar entry
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @example Usage
* ```ts no-assert
Expand Down Expand Up @@ -133,10 +124,7 @@ export interface TarEntry extends TarMetaWithLinkName {}
/**
* Contains tar header metadata and a reader to the entry's body.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @example Usage
* ```ts no-assert
Expand Down Expand Up @@ -377,10 +365,7 @@ export class TarEntry implements Reader {
* }
* ```
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export class Untar {
/** Internal reader. */
Expand Down
4 changes: 1 addition & 3 deletions assert/never.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ import { AssertionError } from "./assertion_error.ts";
*/

/**
* **UNSTABLE**: New API, yet to be vetted.
*
* Make an assertion that `x` is of type `never`.
* If not then throw.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @example Exhaustivenss check
* ```ts
Expand Down
2 changes: 1 addition & 1 deletion cache/lru_cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type { MemoizationCache };
* https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
* ) cache.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* Automatically removes entries above the max size based on when they were
* last accessed with `get`, `set`, or `has`.
Expand Down
6 changes: 3 additions & 3 deletions cache/memoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { _serializeArgList } from "./_serialize_arg_list.ts";
/**
* A cache suitable for use with {@linkcode memoize}.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export type MemoizationCache<K, V> = {
has: (key: K) => boolean;
Expand All @@ -19,7 +19,7 @@ export type MemoizationCache<K, V> = {
/**
* Options for {@linkcode memoize}.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @typeParam Fn The type of the function to memoize.
* @typeParam Key The type of the cache key.
Expand Down Expand Up @@ -64,7 +64,7 @@ export type MemoizeOptions<
/**
* Cache the results of a function based on its arguments.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @typeParam Fn The type of the function to memoize.
* @typeParam Key The type of the cache key.
Expand Down
15 changes: 3 additions & 12 deletions cli/spinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ export type Ansi = string & {};
/**
* Color options for {@linkcode SpinnerOptions.color}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export type Color =
| "black"
Expand Down Expand Up @@ -53,10 +50,7 @@ const COLORS: Record<Color, string> = {
/**
* Options for {@linkcode Spinner}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export interface SpinnerOptions {
/**
Expand Down Expand Up @@ -86,8 +80,7 @@ export interface SpinnerOptions {
/**
* A spinner that can be used to indicate that something is loading.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @example Usage
* ```ts no-eval
Expand All @@ -101,8 +94,6 @@ export interface SpinnerOptions {
* console.log("Finished loading!");
* }, 3_000);
* ```
*
* @experimental
*/
export class Spinner {
#spinner: string[];
Expand Down
12 changes: 6 additions & 6 deletions encoding/base32hex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* {@link https://www.rfc-editor.org/rfc/rfc4648.html#section-7 | base32hex}
* encoding and decoding.
*
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* Modified from {@link [base32]}.
*
* This module is browser compatible.
Expand All @@ -23,8 +25,6 @@
* );
* ```
*
* @experimental
*
* @module
*/
import { decode, encode } from "./_base32_common.ts";
Expand All @@ -36,6 +36,8 @@ lookup.forEach((c, i) => revLookup[c.charCodeAt(0)] = i);
/**
* Decodes a base32hex-encoded string.
*
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc4648.html#section-7}
*
* @param b32 The base32hex-encoded string to decode.
Expand All @@ -51,8 +53,6 @@ lookup.forEach((c, i) => revLookup[c.charCodeAt(0)] = i);
* new TextEncoder().encode("6c60c0"),
* );
* ```
*
* @experimental
*/
export function decodeBase32Hex(b32: string): Uint8Array {
return decode(b32, lookup);
Expand All @@ -61,6 +61,8 @@ export function decodeBase32Hex(b32: string): Uint8Array {
/**
* Converts data into a base32hex-encoded string.
*
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @see {@link https://www.rfc-editor.org/rfc/rfc4648.html#section-7}
*
* @param data The data to encode.
Expand All @@ -73,8 +75,6 @@ export function decodeBase32Hex(b32: string): Uint8Array {
*
* assertEquals(encodeBase32Hex("6c60c0"), "6PHJCC3360======");
* ```
*
* @experimental
*/
export function encodeBase32Hex(
data: ArrayBuffer | Uint8Array | string,
Expand Down
5 changes: 1 addition & 4 deletions html/is_valid_custom_element_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ const CUSTOM_ELEMENT_NAME_CHARS =
* requirements defined in
* {@link https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name}.
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* The element name must not be any of the following:
* - `annotation-xml`
Expand Down
10 changes: 2 additions & 8 deletions http/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
/**
* HTTP Headers with status permanent
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @see {@link https://www.iana.org/assignments/http-fields/http-fields.xhtml#field-names | IANA Hypertext Transfer Protocol (HTTP) Field Name Registry}
*/
Expand Down Expand Up @@ -1198,9 +1195,6 @@ export const HEADER = {
/**
* A HTTP Header
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export type Header = typeof HEADER[keyof typeof HEADER];
10 changes: 2 additions & 8 deletions http/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
/**
* HTTP Methods derived from IANA Hypertext Transfer Protocol (HTTP) Method Registry
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*
* @see {@link https://www.iana.org/assignments/http-methods/http-methods.xhtml#methods | IANA Hypertext Transfer Protocol (HTTP) Method Registry}
*/
Expand Down Expand Up @@ -296,9 +293,6 @@ export const METHOD = {
/**
* A HTTP Method
*
* > [!WARNING]
* > **UNSTABLE**: New API, yet to be vetted.
*
* @experimental
* @experimental **UNSTABLE**: New API, yet to be vetted.
*/
export type Method = typeof METHOD[keyof typeof METHOD];
Loading

0 comments on commit dea7d77

Please sign in to comment.