Skip to content

package.json isn't correctly updated when moving from swagger -> TSP #3783

@xirzec

Description

@xirzec

I noticed this when running a tsp-client locally for an existing package, specifically the package.json had

"@azure/core-client": "^1.9.3",

which caused compile time issues because it was looking for @azure-rest/core-client in the newly generated code. I was able to resolve this by manually replacing the above with:

"@azure-rest/core-client": "^2.3.1",

We have dependencies and devdependencies diffs between autorest-packageJson generator and modular-packageJson generator.
This issue is because tsp-client will not clean-up metadata files, so the option generateMetadata will be false as packageJson exists. So our emitter will not update metadata files.
We need to add an additional step to update these dependencies when @azure/core-client is detected in packageJson in modular generation.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions