Repository navigation
feat: add tstransform native compiler command - #30
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Adds a
tstransformcommand to@3sixty/nameof-transformerwhich compiles projects with the native TypeScript compiler (typescript@7.1.0-beta), replacing thenameofcalls as source files are read through a virtual file system. All packages and apps now build withtstransforminstead oftspc, so ts-patch is no longer required.{ "scripts": { "build": "tstransform", "test:build": "tstransform -p ./tests/tsconfig.json" } }🔄 Type of Change
🛠️ Changes Made
tsTransformmethod andtstransformbin tonameof-transformer, accepting the same arguments astscand returning formatted diagnosticscreateBuildOrchestratorAPI, as it is the only native API route which supports incremental buildscompilerOptionsandoverrideCompilerOptions, as the current client only forwards nestedcompilerOptionswhile Add noEmit to BuildOrchestrator overrideCompilerOptions microsoft/TypeScript#64759 changes it to send onlyoverrideCompilerOptions, removecompilerOptionsonce that fix is releasedbuildandtest:buildscripts in all packages and apps totstransformincremental,tsBuildInfoFile, andnoEmitfor tests) from script arguments intotsconfig.json--no-cacheargument intovitest.config.tsascache: falsetypescript-native(npm:typescript@7.1.0-beta) tonameof-transformerand remove thets-patchdev dependency from all packages and appststransformcommand andtsTransformmethod innameof-transformer/docs/configuration.md🧪 Testing