[tsp-client] Support emitter-output-dir#11626
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the tsp-client tool to support the emitter-output-dir configuration option as an alternative to the legacy package-dir approach for determining client library output paths. The changes consolidate initialization logic into a shared function and add comprehensive test coverage for both new and legacy path resolution scenarios.
Key changes:
- Introduces support for
emitter-output-dirwith preference overpackage-dirfor path resolution - Refactors initialization code into a shared
initProcessDataAndWriteTspLocationfunction - Adds deprecation warnings for
package-dirusage to encourage migration - Updates test configurations and adds new test cases for legacy package directory resolution
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tools/tsp-client/src/commands.ts |
Major refactoring to support emitter-output-dir, consolidates init logic into shared function, adds deprecation warnings |
tools/tsp-client/src/typespec.ts |
Updates compilation function to handle new output directory configuration and return structured result object |
tools/tsp-client/test/commands.spec.ts |
Adds new test cases for legacy package directory resolution and updates existing tests |
tools/tsp-client/test/examples/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml |
Updates configuration to use emitter-output-dir instead of package-dir |
tools/tsp-client/test/examples/specification/contosowidgetmanager-legacy-package-dir/ |
Adds new test specification files demonstrating legacy package-dir usage |
tools/tsp-client/src/utils.ts |
Minor comment improvement for clarity |
tools/tsp-client/package.json |
Version bump to 0.28.0 |
tools/tsp-client/CHANGELOG.md |
Documents new features and deprecation notice |
Files not reviewed (1)
- tools/tsp-client/package-lock.json: Language not supported
...client/test/examples/specification/contosowidgetmanager/Contoso.WidgetManager/tspconfig.yaml
Show resolved
Hide resolved
JoshLove-msft
approved these changes
Aug 13, 2025
Member
Author
|
/check-enforcer override |
jsquire
approved these changes
Aug 14, 2025
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.
emitter-output-dirand use a function for shared processing between the url and local spec scenarioFixes #10823