Skip to content

Commit

Permalink
[tsp-client] Add @autorest/core as dependency (#9043)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeharder authored Sep 25, 2024
1 parent 31a8583 commit 7435202
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/tsp-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release

## Unreleased - 0.13.1

- Add `@autorest/core` as a dependency, and run the package from its install folder, to guarantee the versions don't change after install.

## 2024-09-10 - 0.13.0

- Bumped `@autorest/openapi-to-typespec` version to `0.10.0`.
Expand Down
14 changes: 14 additions & 0 deletions tools/tsp-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tools/tsp-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"typescript": "^5.1.6"
},
"dependencies": {
"@autorest/core": "^3.10.2",
"@autorest/openapi-to-typespec": "0.10.0",
"@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0",
"@azure/core-rest-pipeline": "^1.12.0",
Expand Down
5 changes: 5 additions & 0 deletions tools/tsp-client/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,16 @@ export async function convertCommand(argv: any): Promise<void> {
);
const autorestBinPath = joinPaths(autorestPath, autorestPackageJson["bin"]["autorest"]);

// Resolve core dependency
const autorestCorePath = await getPathToDependency("@autorest/core");

// Resolve extension dependencies
const autorestOpenApiToTypeSpecPath = await getPathToDependency("@autorest/openapi-to-typespec");

// Build the command to convert swagger to typespec
const args = [
autorestBinPath,
`--version="${autorestCorePath}"`,
"--openapi-to-typespec",
"--csharp=false",
`--output-folder="${outputDir}"`,
Expand Down

0 comments on commit 7435202

Please sign in to comment.