Skip to content

Document esmOnly option for the TypeScript SDK generator - #6942

Merged
nerminamiller-postman merged 2 commits into
mainfrom
devin/1789319077-ts-esm-only
Sep 16, 2026
Merged

nerminamiller-postman merged 2 commits into
mainfrom
devin/1789319077-ts-esm-only

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

The TypeScript SDK generator gained an opt-in esmOnly config option that makes the generated package ship only an ESM build instead of the default dual CommonJS + ESM output. This matters for customers whose consumers are ESM-only: it avoids the dual package hazard (two copies of the same module loaded via require and import) and yields a smaller, single-format package. Default behavior is unchanged when the flag is omitted.

Implements docs for: feat(typescript): add opt-in esmOnly flag for ESM-only SDK output (fern-api/fern#17503) — fern-api/fern#17503

Details

  • fern/products/sdks/generators/typescript/configuration.mdx: new <ParamField path="esmOnly" type="boolean" default="false"> entry, placed alphabetically between enableInlineTypes and extraDependencies. Covers the package.json / exports / build-script effects, the dual package hazard motivation, the incompatibility with useLegacyExports: true and bundle: true, and a generators.yml example. The page has no outputEsm entry, so no contrast was added.
  • No changelog entry (SDK changelogs are auto-generated).

Vale: the only remaining findings in the new block are FernStyles.Acronyms suggestions for ESM, which is defined on first use. fern check --warnings passes with 0 errors.

Link to Devin session: https://app.devin.ai/sessions/9854c806214d470da26ea53336829309
Open in Devin Desktop: https://app.devin.ai/desktop/session/9854c806214d470da26ea53336829309?variant=devin

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Comment thread fern/products/sdks/generators/typescript/configuration.mdx
Comment thread fern/products/sdks/generators/typescript/configuration.mdx
@github-actions

Copy link
Copy Markdown
Contributor

🌿 Preview your docs: https://fern-preview-devin-1789319077-ts-esm-only.docs.buildwithfern.com/learn

Here are the markdown pages you've updated:

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@nerminamiller-postman
nerminamiller-postman merged commit 24be28c into main Sep 16, 2026
4 checks passed
@nerminamiller-postman
nerminamiller-postman deleted the devin/1789319077-ts-esm-only branch September 16, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants