Skip to content

Conversation

@jsklan
Copy link
Contributor

@jsklan jsklan commented Oct 14, 2025

Description

Linear ticket: FER-6784

This PR fixes TypeScript SDK generation to achieve parity between local (--local) and remote generation modes. Previously, local generation would produce different outputs than remote generation, particularly around package.json metadata, GitHub workflows, license files, and User-Agent headers.

Changes Made

  • Added automatic semantic version computation for local generation by checking package registries (npm, PyPI) and GitHub tags
  • Implemented computeSemanticVersion() function that mirrors FDR's version computation logic locally
  • Fixed GitHub config normalization to handle both full URLs and owner/repo short
    format
  • Added LICENSE file writing for custom license configurations
  • Fixed User-Agent header generation to use npm package info when platform headers not available
  • Added dynamic generator config propagation to local generation path
  • Fixed npm package construction for self-hosted IR with publishing config
  • Normalized repo URL handling to consistently produce GitHub URLs for README links
  • Added dependencies: semver, latest-version, octokit for version checking
  • Updated generators/typescript/sdk/versions.yml to version 3.9.1
  • Updated packages/cli/cli/versions.yml to version 0.92.1

Testing

  • Manually tested against remote generation of sample repo

@jsklan jsklan changed the title Jsklan/ts remote local parity manual fix(cli, typescript): Fix ts local github generation to match remote generation Oct 16, 2025
@jsklan jsklan marked this pull request as ready for review October 16, 2025 16:38
@jsklan jsklan enabled auto-merge (squash) October 17, 2025 14:10
@jsklan jsklan disabled auto-merge October 17, 2025 14:54
Comment on lines +268 to +271
const licenseContent = await this.readLicenseFileContent(licenseFileName);

const licenseFilePath = path.join(rootDirectory, "LICENSE");
await fs.writeFile(licenseFilePath, licenseContent, "utf-8");
Copy link
Member

Choose a reason for hiding this comment

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

Can we use a readstream here?

# yaml-language-server: $schema=../../../fern-versions-yml.schema.json
- changelogEntry:
- summary: |
Fix ts local github generation to match remote generation.
Copy link
Member

Choose a reason for hiding this comment

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

=> Fix TypeScript SDK generator's local GitHub generation to match remote generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants