-
Notifications
You must be signed in to change notification settings - Fork 379
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
chore(openapi): build script to setup ESM/CJS module exports + various fixes #10
Conversation
Related openai/openai-node#45 |
Isomorphic Nice work on this also. |
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.
Really liking this change overall. Left a few comments and still need to do some testing on the final package before proceeding, but overall this is looking promising.
"prepublishOnly": "npm run prepare" | ||
}, | ||
"dependencies": { | ||
"@fortaine/fetch": "^6.2.2", |
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.
How is this different than @vercel/fetch? Would prefer not to use this fork if we can avoid it.
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.
@vercel/fetch doesn't work with nodejs native fetch at the time of writing. A PR has been made : vercel/fetch#76
This new typescript generator is also listed as "Experimental" – do you know what's experimental about it? I'm a little hesitant to fully switch our production SDK over to something that is still marked as experimental. Have other well-known projects started using this generator? |
|
By the way, we tried with typescript-fetch in the first place. However, it seems that there is a nasty bug when using oneOf |
efed3b4
to
9a89478
Compare
02d3cec
to
7d1c02f
Compare
• chore(upgrade): get the version from the package.json w/o using require (prebuild script)
Now that we have the updated NodeSDK, I am going to close this PR. Please let me know if there's further discussion needed here and thanks for diving in on this originally! |
1 PR to rule them all 😉 cc @schnerd @shun-shobon @ericlewis :
° Changelog
bugfix to deal with spaces in paths
fix: Add auth scheme
enable support for CommonJS and ESModules in one package. The main features being :
replacing
require("../package.json").version
with a prebuild scriptusing tsc-multi to rewrite all import paths with .mjs extension