Skip to content

Commit

Permalink
chore(streams, archive): remove deprecated exports (#3107)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Jan 14, 2023
1 parent 1e6bd9a commit a11c957
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 577 deletions.
3 changes: 1 addition & 2 deletions archive/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@
*
* @module
*/
/** @deprecated (will be removed after 0.171.0) TODO: export all once overlapping objects/types are removed */
export { Tar, type TarData, type TarDataWithSource } from "./tar.ts";
export * from "./tar.ts";
export * from "./untar.ts";
39 changes: 0 additions & 39 deletions archive/tar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,42 +297,3 @@ export class Tar {
return new MultiReader(readers);
}
}

export {
/** @deprecated (will be removed after 0.171.0) Import from `std/archive/untar.ts` instead. */
TarEntry,
/** @deprecated (will be removed after 0.171.0) Import from `std/archive/untar.ts` instead. */
type TarHeader,
/**
* @deprecated (will be removed after 0.171.0) Import from `std/archive/untar.ts` instead.
*
* A class to extract a tar archive
*
* @example
* ```ts
* import { Untar } from "https://deno.land/std@$STD_VERSION/archive/tar.ts";
* import { ensureFile } from "https://deno.land/std@$STD_VERSION/fs/ensure_file.ts";
* import { ensureDir } from "https://deno.land/std@$STD_VERSION/fs/ensure_dir.ts";
* import { copy } from "https://deno.land/std@$STD_VERSION/streams/copy.ts";
*
* const reader = await Deno.open("./out.tar", { read: true });
* const untar = new Untar(reader);
*
* for await (const entry of untar) {
* console.log(entry); // metadata
*
* if (entry.type === "directory") {
* await ensureDir(entry.fileName);
* continue;
* }
*
* await ensureFile(entry.fileName);
* const file = await Deno.open(entry.fileName, { write: true });
* // <entry> is a reader.
* await copy(entry, file);
* }
* reader.close();
* ```
*/
Untar,
} from "./untar.ts";
56 changes: 0 additions & 56 deletions streams/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,59 +165,3 @@ export class Buffer {
this.#reslice(m);
}
}

export {
/**
* @deprecated (will be removed after 0.171.0) Import from `std/streams/limited_bytes_transform_stream.ts` instead.
*
* A TransformStream that will only read & enqueue `size` amount of bytes.
* This operation is chunk based and not BYOB based,
* and as such will read more than needed.
*
* if options.error is set, then instead of terminating the stream,
* an error will be thrown.
*
* ```ts
* import { LimitedBytesTransformStream } from "https://deno.land/std@$STD_VERSION/streams/buffer.ts";
* const res = await fetch("https://example.com");
* const parts = res.body!
* .pipeThrough(new LimitedBytesTransformStream(512 * 1024));
* ```
*/
LimitedBytesTransformStream,
} from "./limited_bytes_transform_stream.ts";

export {
/**
* @deprecated (will be removed after 0.171.0) Import from `std/streams/limited_transform_stream.ts` instead.
*
* A TransformStream that will only read & enqueue `size` amount of chunks.
*
* if options.error is set, then instead of terminating the stream,
* an error will be thrown.
*
* ```ts
* import { LimitedTransformStream } from "https://deno.land/std@$STD_VERSION/streams/buffer.ts";
* const res = await fetch("https://example.com");
* const parts = res.body!.pipeThrough(new LimitedTransformStream(50));
* ```
*/
LimitedTransformStream,
} from "./limited_transform_stream.ts";

export {
/**
* @deprecated (will be removed after 0.171.0) Import from `std/streams/byte_slice_stream.ts` instead.
*
* A transform stream that only transforms from the zero-indexed `start` and `end` bytes (both inclusive).
*
* @example
* ```ts
* import { ByteSliceStream } from "https://deno.land/std@$STD_VERSION/streams/buffer.ts";
* const response = await fetch("https://example.com");
* const rangedStream = response.body!
* .pipeThrough(new ByteSliceStream(3, 8));
* ```
*/
ByteSliceStream,
} from "./byte_slice_stream.ts";
Loading

0 comments on commit a11c957

Please sign in to comment.