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

refactor(archive): prepare for noUncheckedIndexedAccess #4110

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

syhol
Copy link
Contributor

@syhol syhol commented Jan 5, 2024

Handling all noUncheckedIndexedAccess issues for the archive module, tracked in #4040

@syhol syhol requested a review from kt3k as a code owner January 5, 2024 00:46
archive/untar.ts Show resolved Hide resolved
Comment on lines +51 to +53
export type TarHeader = {
[key in UstarFields]: Uint8Array;
};
Copy link
Contributor Author

@syhol syhol Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't want this public type to have this slight change, we could look at creating a new non-exported type and casting the header to this new type inside getMetadata: https://github.com/denoland/deno_std/blob/b64357605cf55edc2fdd278e057d7f0b9f665195/archive/untar.ts#L256-L293

However I understand this submodule is likely to change a fair bit soon with the Streams API updates, so perhaps we don't need to be so cautious in this case?

@iuioiua iuioiua changed the title refactor(archive): prepare for noUncheckedIndexedAccess refactor(archive): prepare for noUncheckedIndexedAccess Jan 5, 2024
Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you. @crowlKats, can you PTAL? This touches on a few points relating to the upcoming streams variations.

@iuioiua iuioiua merged commit efb3866 into denoland:main Jan 8, 2024
12 checks passed
timreichen pushed a commit to timreichen/std that referenced this pull request Jan 8, 2024
)

* refactor(archive): prepare for noUncheckedIndexedAccess

* adjust test to handle new TarHeader requirements
iuioiua added a commit that referenced this pull request Jan 11, 2024
* initial commit

* Update log/logger.ts

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* replace WARNING with WARN

* update

* refactor(cli): make `Spinner` constructor options more readable (#4091)

* initial commit

* update

* docs(testing): fix assertion deprecation notices (#4122)

* refactor(assert): remove `void` return types (#4124)

* fix(http): punt removal version of `unstable_cookie_map.ts` (#4125)

* chore: ignore `/docs` in license checker tool (#4123)

* deprecation(semver): rename `rangeFormat()` to `formatRange()` (#4090)

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* refactor(archive): prepare for `noUncheckedIndexedAccess` (#4110)

* refactor(archive): prepare for noUncheckedIndexedAccess

* adjust test to handle new TarHeader requirements

* revert WARNING

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Simon Holloway <simon@syhol.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants