Skip to content

feat: add tstransform native compiler command - #30

Merged
obany merged 1 commit into
nextfrom
feature/native-tstransform
Oct 23, 2026
Merged

obany merged 1 commit into
nextfrom
feature/native-tstransform

Conversation

@obany

@obany obany commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📝 Description

Adds a tstransform command to @3sixty/nameof-transformer which compiles projects with the native TypeScript compiler (typescript@7.1.0-beta), replacing the nameof calls as source files are read through a virtual file system. All packages and apps now build with tstransform instead of tspc, so ts-patch is no longer required.

{
  "scripts": {
    "build": "tstransform",
    "test:build": "tstransform -p ./tests/tsconfig.json"
  }
}

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • ⚡ Performance improvement
  • ♻️ Code refactoring
  • 📦 Dependencies update

🛠️ Changes Made

  • Add the tsTransform method and tstransform bin to nameof-transformer, accepting the same arguments as tsc and returning formatted diagnostics
  • Use the internal createBuildOrchestrator API, as it is the only native API route which supports incremental builds
  • Send build orchestrator overrides as both compilerOptions and overrideCompilerOptions, as the current client only forwards nested compilerOptions while Add noEmit to BuildOrchestrator overrideCompilerOptions microsoft/TypeScript#64759 changes it to send only overrideCompilerOptions, remove compilerOptions once that fix is released
  • Switch the build and test:build scripts in all packages and apps to tstransform
  • Move incremental build settings (incremental, tsBuildInfoFile, and noEmit for tests) from script arguments into tsconfig.json
  • Move the vitest --no-cache argument into vitest.config.ts as cache: false
  • Add typescript-native (npm:typescript@7.1.0-beta) to nameof-transformer and remove the ts-patch dev dependency from all packages and apps
  • Document the tstransform command and tsTransform method in nameof-transformer/docs/configuration.md

🧪 Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this change manually
  • Testing not required for changes

Add a `tstransform` command and `tsTransform` method to nameof-transformer which
compile projects with the native TypeScript compiler, replacing the `nameof` calls
as source files are read through a virtual file system.

Switch all packages and apps from `tspc` to `tstransform`, move incremental build
settings into tsconfig, move vitest cache settings into vitest config, and remove
ts-patch.

Build orchestrator overrides are sent as both `compilerOptions` and
`overrideCompilerOptions` so they apply before and after
microsoft/TypeScript#64759 is released.
@obany
obany merged commit eacf591 into next Oct 23, 2026
3 checks passed
@obany
obany deleted the feature/native-tstransform branch October 23, 2026 00:44
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.

1 participant