-
Notifications
You must be signed in to change notification settings - Fork 229
[tsp-client] remove autorest dep #13818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
tools/tsp-client/src/commands.ts
Outdated
| } | ||
| } catch (err) { | ||
| Logger.error( | ||
| `An error occurred during convert command. Verify that you have autorest installed and accessible. Error: ${err}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a catch all for any error and point out that this command relies on autorest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes autorest as a bundled dependency from tsp-client, as autorest is reaching end-of-life. The changes replace the previous approach of resolving autorest from node_modules with a simpler npx-based invocation.
Changes:
- Removed autorest and related dependencies (@autorest/core, @autorest/openapi-to-typespec) from package.json and package-lock.json
- Renamed
nodeCommandtonpxCommandin npm.ts to use npx instead of node for running autorest - Simplified the convert command implementation by removing dependency path resolution logic and using npx to invoke autorest directly
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/tsp-client/package.json | Bumped version to 0.32.0 and removed autorest-related dependencies |
| tools/tsp-client/package-lock.json | Removed autorest and all transitive dependencies from the lockfile |
| tools/tsp-client/src/npm.ts | Renamed nodeCommand to npxCommand to invoke commands via npx |
| tools/tsp-client/src/commands.ts | Simplified convert command to use npx autorest, removed dependency resolution logic |
| tools/tsp-client/CHANGELOG.md | Added release notes for version 0.32.0 |
Files not reviewed (1)
- tools/tsp-client/package-lock.json: Language not supported
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Autorest is reaching eol, this pr removes the dependency from tsp-client.