-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add missing fetch imports #593
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { fetch } from "undici"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems very easy to forget to do. Can we add a Lint rule to disallow using the global There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PRO-755 , it should be a super quick ticket but I'm wrapping up for today and I don't have time to switch branches and test it out. I'm also unsure what's the current state of linting in this repo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🫡 |
||
|
||
type CacheEntry = { json: any | null; status: number; statusText: string }; | ||
|
||
export const cache: Map<string, CacheEntry> = new Map(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been "broken"* for months from what I can tell but it seemed like a good idea to fix it now (I run an audit through all of the files in the repo to see if
fetch
is imported by all them). I decided to usenode-fetch
(overundici
) as that's what is used more by this package (the old CLI)*didn't always work in node 18 or earlier