-
Notifications
You must be signed in to change notification settings - Fork 163
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(typescript): Remove node-fetch in TypeScript SDK #5476
Open
remorses
wants to merge
11
commits into
fern-api:main
Choose a base branch
from
remorses:modernize-node-18
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5f72488
remove node-fetch
remorses 99acdb9
remove more fetch
remorses bff9da1
Merge branch 'main' into modernize-node-18
remorses 9ca4788
generate seed again
remorses d28f3c3
remove node-fetch from docker
remorses a29567c
Merge branch 'main' into modernize-node-18
dannysheridan abbb170
merge main
remorses 45cce0a
changelog
remorses 7e94c8f
seed ts
remorses 29b119a
seed express
remorses 83ab102
Merge remote-tracking branch 'upstream/main' into modernize-node-18
remorses File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,12 @@ RUN yarn add \ | |
# jest | ||
[email protected] \ | ||
@types/[email protected] \ | ||
# node fetch | ||
[email protected] \ | ||
@types/[email protected] \ | ||
# node | ||
@types/[email protected] \ | ||
# qs | ||
[email protected] \ | ||
@types/[email protected] \ | ||
# url join | ||
# url join | ||
[email protected] \ | ||
@types/[email protected] \ | ||
# readable stream | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.45.1 | ||
0.46.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
generators/typescript/utils/core-utilities/fetcher/src/fetcher/__test__/getFetchFn.test.ts
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
generators/typescript/utils/core-utilities/fetcher/src/fetcher/getFetchFn.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import fs from "fs"; | |
import { Server } from "http"; | ||
import multer from "multer"; | ||
import { newFormData } from "../.."; | ||
import { getFetchFn } from "../../fetcher/getFetchFn"; | ||
import { RUNTIME } from "../../runtime"; | ||
|
||
describe("Multipart Form Data Tests", () => { | ||
|
@@ -48,7 +47,6 @@ describe("Multipart Form Data Tests", () => { | |
|
||
await fdw.appendFile("file", new Blob([new Uint8Array(y)]), "asda"); | ||
|
||
const fetch = await getFetchFn(); | ||
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 is the main change |
||
const response = await fetch("http://localhost:4567/upload", { | ||
method: "POST", | ||
...(await fdw.getRequest()), | ||
|
@@ -66,8 +64,6 @@ describe("Multipart Form Data Tests", () => { | |
const y = fs.readFileSync("package.json"); | ||
await fdw.appendFile("file", new File([y], "package.json")); | ||
|
||
const fetch = await getFetchFn(); | ||
|
||
const response = await fetch("http://localhost:4567/upload", { | ||
method: "POST", | ||
...(await fdw.getRequest()), | ||
|
@@ -85,8 +81,6 @@ describe("Multipart Form Data Tests", () => { | |
const y = fs.createReadStream("package.json"); | ||
await fdw.appendFile("file", y); | ||
|
||
const fetch = await getFetchFn(); | ||
|
||
const response = await fetch("http://localhost:4567/upload", { | ||
method: "POST", | ||
...(await fdw.getRequest()), | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We usually use
unknown
instead ofany
. Any reason why this was changed here?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.
yes, now fetch type is more strict and no longer accepts a
RequestInit<unknown>
so many type checks in tests for example failThat unknown has no reason to exist because there is no way to override it with a generic