Skip to content

Commit 7435202

Browse files
authoredSep 25, 2024··
[tsp-client] Add @autorest/core as dependency (#9043)

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
 

‎tools/tsp-client/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release
22

3+
## Unreleased - 0.13.1
4+
5+
- Add `@autorest/core` as a dependency, and run the package from its install folder, to guarantee the versions don't change after install.
6+
37
## 2024-09-10 - 0.13.0
48

59
- Bumped `@autorest/openapi-to-typespec` version to `0.10.0`.

‎tools/tsp-client/package-lock.json

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/tsp-client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"typescript": "^5.1.6"
5252
},
5353
"dependencies": {
54+
"@autorest/core": "^3.10.2",
5455
"@autorest/openapi-to-typespec": "0.10.0",
5556
"@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0",
5657
"@azure/core-rest-pipeline": "^1.12.0",

‎tools/tsp-client/src/commands.ts

+5
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,16 @@ export async function convertCommand(argv: any): Promise<void> {
348348
);
349349
const autorestBinPath = joinPaths(autorestPath, autorestPackageJson["bin"]["autorest"]);
350350

351+
// Resolve core dependency
352+
const autorestCorePath = await getPathToDependency("@autorest/core");
353+
354+
// Resolve extension dependencies
351355
const autorestOpenApiToTypeSpecPath = await getPathToDependency("@autorest/openapi-to-typespec");
352356

353357
// Build the command to convert swagger to typespec
354358
const args = [
355359
autorestBinPath,
360+
`--version="${autorestCorePath}"`,
356361
"--openapi-to-typespec",
357362
"--csharp=false",
358363
`--output-folder="${outputDir}"`,

0 commit comments

Comments
 (0)
Please sign in to comment.