fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.6k stars 139 forks source link

chore(typescript): generate a `version.ts` file #4599

Closed dsinghvi closed 3 weeks ago

dsinghvi commented 3 weeks ago

This PR bootstraps a typescript-codegen package with a lightweight AST that we can grow overtime. Additionally, we now generate a version.ts that looks something like:

export SDK_VERSION = "0.0.12";

AI Description

This pull request introduces a new feature to the TypeScript SDK, enabling the generation of a version.ts file that exports a constant SDK_VERSION. This constant can be used by various utilities to dynamically import the version, allowing for customisation of the user agent.

Changes