Skip to content

feat: replace node-fetch with builtin #834

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

Merged
merged 1 commit into from
Nov 24, 2021
Merged

Conversation

ascorbic
Copy link
Contributor

Summary

Removes the runtime requirement for node-fetch with a helper that uses Node builtins

Test plan

  1. See unit tests

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

image

@ascorbic ascorbic requested a review from tiffafoo November 24, 2021 10:32
@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Nov 24, 2021
await new Promise((resolve, reject) => {
const req = httpx.get(url, { timeout: 10000 }, (response) => {
if (response.statusCode < 200 || response.statusCode > 299) {
reject(new Error(`Failed to download ${url}: ${response.statusCode} ${response.statusMessage || ''}`))
Copy link
Member

Choose a reason for hiding this comment

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

Should we return here?

@kodiakhq kodiakhq bot merged commit 6ff3100 into main Nov 24, 2021
@kodiakhq kodiakhq bot deleted the mk/remove-node-fetch branch November 24, 2021 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants