Merged
Conversation
Add ts-rs based TypeScript type generation for UserConfigTasks under a new 'ts-types' feature flag. This enables generating TypeScript definitions for the vite.config.json task configuration schema. - Add ts-rs dependency to workspace - Implement TS trait for Str and RelativePathBuf (map to 'string') - Add TS derives to all user config types with MustBe! overrides - Convert UserConfigTasks to newtype for TS derive support - Add 'config-types' CLI subcommand to print generated types Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…k_graph Move TypeScript type generation support behind feature flags to reduce compile-time dependencies for production builds. The ts-rs dependency is now only needed when running tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the Rust dprint-plugin-typescript crate with oxfmt CLI for formatting generated TypeScript types. This removes a heavy Rust dependency and uses the faster oxfmt formatter via subprocess. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace `#[serde(default)]` with `Option<T>` for config fields so they generate as optional (`?:`) in TypeScript. This allows users to omit fields like `cwd`, `dependsOn`, `envs`, and `passThroughEnvs` in their config files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Separates each lint command into its own step for better visibility in CI logs when a specific check fails. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

Add TypeScript type definitions for task configuration
This PR adds TypeScript type definitions for the task configuration schema used in
vite.config.*files. The types are generated using thets-rscrate and are included as a static file in the repository.Key changes:
ts-rsdependency with feature flags to make it optionalTStrait forStrandRelativePathBuf(both map to TypeScript'sstring)UserConfigTasksto a newtype pattern for better TS supportcrates/vite_task_graph/task-config.tsThe TypeScript definitions provide better editor support when users are editing their task configurations in TypeScript/JavaScript-based config files.