* refactor(archive): An implementation of Tar as streams
* fmt(archive): Ran `deno fmt`
* fix(archive): fixed JSDoc examples in tar_streams.ts
* fix(archive): fixed JSDoc examples so `deno task test` doesn't complain
* fix(archive): lint license error
* fix(archive): lint error files not exported
* set(archive): Set current time as mtime for default
* resolve(archive): resolves comments made
* add(archive): `{ mode: 'byob' }` support for TarStream
* add(archive): `{ mode: 'byob' }` support for UnTarStream
* adjust(archive): The logical flow of a few if statements
* tests(archive): Updated Tests for Un/TarStream
* fix(archive): TarStream mtime wasn't an octal
* fix(archive): TarStream tests
* add(archive): Added parsePathname function
Added parsePathname function abstracting the logic out of TarStream allowing the developer to validate pathnames before providing them to TarStream hoping it doesn't throw an error and require the archive creation to start all over again.
* fix(archive): extra bytes incorrectly appending at the end of files
When the appending file was exactly divisible by 512 bytes, an extra 512 bytes was being appending instead of zero to fill in the gap, causing the next header to be read at the wrong place.
* adjust(archive): to always return the amount of bytes requested
Instead of using enqueue, the leftover bytes are saved for later for the next buffer provided.
* tweaks
* fix
* docs(archive): Link to the spec that they're following
* docs(archive): fix spelling
* add(archive): function validTarSteamOptions
- To make sure, if TarStreamOptions are being provided, that they are in the correct format so as to not create bad tarballs.
* add(archive): more tests
* fix(archive): validTarStreamOptions
* add(archive): tests for validTarStreamOptions
* refactor(archive): code to copy the changes made in the @doctor/tar-stream version
* test(archive): added from @doctor/tar-stream
* chore: nit on anonymous function
* refactor(archive): UnTarStream that fixes unexplainable memory leak
- The second newest test introduced here '... with invalid ending' seems to detect a memory leak due to an invalid tarball. I couldn't figure out why the memory leak was happening but I know this restructure of the code doesn't have that same memory leak.
* chore: fmt
* tests(archive): added remaining tests to cover many lines as possible
* adjust(archive): remove simplify pathname code
* adjust(archive): remove checking for duplicate pathnames in taring process
* adjust(archive): A readable will exist on TarEntry unless string values 1-6
* tests(archive): added more tests for higher coverage
* adjust(archives): TarStream and UnTarStream to implement TransformStream
* docs(archive): moved TarStreamOptions docs into properties.
* adjust(archive): TarStreamFile to take a ReadableSteam instead of an Iterable | AsyncIterable
* adjust(archive): to use FixedChunkStream instead of rolling it's own implementation
* fix(archive): lint error
* adjust(archive): Error types and messages
* adjust(archive): more Error messages / improve tests
* refactor(archive): UnTarStream to return TarStreamChunk instead of TarStreamEntry
* fix(archive): JSDoc example
* adjust(archive): mode, uid, gid options to be provided as numbers instead of strings.
* adjust(archive): TarStream's pathname to be only of type string
* fix(archive): prefix/name to ignore everything past the first NULL
* adjust(archive): `checksum` and `pad` to not be exposed from UnTarStream
* adjust(archive): checksum calculation
* change(archive): `.slice` to `.subarray`
* doc(archive): "octal number" to "octal literal"
* adjust(archive): TarStreamOptions to be optional with defaults
* doc(archive): added more docs for the interfaces
* docs(archive): denoting defaults
* docs(archive): updated for new lint rules
* adjust(archive): Tests to use assertRejects where appropriate & add `validPathname` function
- The `validPathname` is meant to be a nicer exposed function for users of this lib to validate that their pathnames are valid before pipping it through the TarStream, over exposing parsePathname where the user may be confused about what to do with the result.
* adjust(archive): to use `Date.now()` instead of `new Date().getTime()`
Co-authored-by: ud2 <sjx233@qq.com>
* adjust(archive): mode, uid, and gid to be numbers instead of strings when Untaring
* tests(archive): adjust two tests to also validate the contents of the files are valid
* adjust(archive): linkname, uname, and gname to follow the same decoding rules as name and prefix
* rename(archive): UnTarStream to UntarStream
* fix(archive): type that was missed getting updated
* tests(archive): adjust check headers test to validate all header properties instead of just pathnames
* rename(archive): `pathname` properties to `path`
* docs(archive): updated to be more descriptive
* docs(archive): Updated error types
* adjust(archive): `validPath` to `assertValidPath`
* adjust(archive): `validTarStreamOptions` to `assertValidTarStreamOptions`
* revert(archive): UntarStream to produce TarStreamEntry instead of TarStreamChunk
* refactor: remove redundant `void` return types
* docs: cleanup assertion function docs
* docs: correct `TarStream` example
* docs: minor docs cleanups
* refactor: improve error class specificity
* docs: add `@experimental` JSDoc tags
* docs(archive): Updated examples for `assertValidPath` and `assertValidTarStreamOptions```
* fix(archive): problem with tests
- I suspect the problem is that a file that was read by `Deno.readDir` changed size between being read at `Deno.stat` and when `Deno.open` finished pulling it all in.
* update error messages
* update error messages
* fix typos
* refactor: tweak error messages
* refactor: tweaks and add type field
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: ud2 <sjx233@qq.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
* Refactored to get rid of unnecessary function.
All that needs to be done here is to check if
the version is windows. Handling each combination
of runtime and operating system will make
the existing osType difficult to test and maintain.
* Changed browser version of isWindows.
It was using a deprecated web API.
* Refactored getIsWindows.
* Added node/bun version of isWindows.
* Got cross platform os module working.
* Handled Deno error.
* Fixed type errors.
* Removed node:os import.
This is how NodeJS checks to see
if the underlying OS is windows.
* tweaks
* fix
* cleanup
* tweak
* fix
* Added support for node.
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
* refactor(dotenv): add parse function and test
* refactor(dotenv): escape single quotes in stringify function
* refactor(dotenv): fix stringify function to correctly escape single quotes
* refactor(dotenv): fix stringify function to correctly escape single quotes
* tweak
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
refactor(assert, datetime, fmt, io, streams): use `throw new Error` instead of `throw`
To ensure consistency across the codebase, this commit refactors the
codebase to use `throw new Error` instead of `throw` for throwing
errors.
https://github.com/denoland/std/issues/5854
* docs(cache): document valid range information for TTL values
* add test for documented TTL range
* tweaks
* Apply suggestions from code review
Co-authored-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>