-
Notifications
You must be signed in to change notification settings - Fork 238
Upgrade autorest #2370
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
Merged
Merged
Upgrade autorest #2370
Conversation
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
velimir-jankovic
approved these changes
Aug 4, 2023
Priskorn
previously approved these changes
Aug 7, 2023
83a96c7 to
0b15a68
Compare
Contributor
|
All affected commands have been tested. Approved. |
AnatolyPristensky
approved these changes
Aug 11, 2023
Priskorn
approved these changes
Aug 15, 2023
Merged
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.
PR Summary
This PR presents a significant update to the codebase, primarily focusing on upgrading the
autorestpackage to version 3, phasing out the deprecated and security risk-ladenrequestdependency, and accommodating for the breaking changes including the shift from a callback-based API to a promise-based one.Changes Implemented:
request: All code has been updated to usefetchinstead ofrequest. I specifically chose to usenode-fetchover alternatives such asgotoraxiosprimarily to avoid introducing additional dependencies and their subsequent cascading dependencies. Notably,node-fetchwas already part of our existing dependencies.ms-resttoms-rest-js: As thems-restpackage listedrequestas a dependency, it has been migrated toms-rest-js.autorestto version 3: The earlier usedautorestversion 2 utilizedms-rest, hence it was upgraded to version 3.autorestversion.autorestand Swagger API file.create-clientclass: Adjustments were made to build and use the new service client effectively.Reviewing This PR
Note: All files within "src/util/apis/generated/src" were auto-generated by
autorestusing the "scripts/autorest.js" script and can be ignored during the review.create-clientclass: This class is the foundation as it instantiates and configures the App Center client service used for API calls.Optional: If you have additional time, you can fetch and test these changes in your local setup. If you do so, please comment on this PR about the commands you managed to test, to help others focus on untested parts.
Related Work Items:
This PR is related to the following work items: