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

fix: bump typescript and fix errors #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

estrattonbailey
Copy link
Collaborator

@estrattonbailey estrattonbailey commented Jul 5, 2023

Just kicking the tires, minor stuff. This won't result in a package version bump.

@@ -84,7 +84,7 @@ export function gretch<T = DefaultGretchResponse, A = DefaultGretchError>(
...(rest as RequestInit),
};
const controller =
typeof AbortController !== "undefined" ? new AbortController() : null;
typeof AbortController !== "undefined" ? new AbortController() : undefined;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TS didn't like an optional param (evals to Type | undefined) being potentially null

Comment on lines +107 to +109
([] as GretchBeforeHook[])
.concat(hooks.before)
.forEach((hook) => hook(request, opts));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just flattening an array and iterating over it

Comment on lines +4 to +7
attempts: number;
codes: number[];
methods: string[];
delay: number;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

User options use Partial<RetryOptions>, and we merge in defaults, so the source type should be non-optionally typed.

Copy link
Contributor

@wjohnson-truework wjohnson-truework left a comment

Choose a reason for hiding this comment

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

Nervous to merge this without at least a patch bump due to the changes. Bump the patch version (which will prevent breakages in existing apps), and this should be fine.

@wjohnson-truework wjohnson-truework dismissed their stale review September 15, 2023 22:51

Dismissing bc needs a version bump, but don't want to block with req changes

@estrattonbailey
Copy link
Collaborator Author

Hey sorry for the delay on these, my headspace has been taken up by my new job. Hope to get back to these soon! In the meantime obviously feel free to do as you wish with the library ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants