openai-openapi
openai-openapi copied to clipboard
chore(openapi): build script to setup ESM/CJS module exports + various fixes
1 PR to rule them all 😉 cc @schnerd @shun-shobon @ericlewis :
° Changelog
-
bugfix to deal with spaces in paths
-
enable support for CommonJS and ESModules in one package. The main features being :
-
replacing
require("../package.json").versionwith a prebuild script -
using tsc-multi to rewrite all import paths with .mjs extension
-
Related https://github.com/openai/openai-node/pull/45
Isomorphic __dirname is tricky but can be done, you have to make guarantees about the file structure but it can be achieved with a polyfill and added as a banner to Esbuild. See: https://github.com/tsmodule/tsmodule/blob/master/src/specification/shim.ts
Nice work on this also.
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?
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?
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
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!