[autorest.typescript] Allow generating ESM-style imports#2925
Merged
maorleger merged 19 commits intoAzure:mainfrom Jan 7, 2025
Merged
[autorest.typescript] Allow generating ESM-style imports#2925maorleger merged 19 commits intoAzure:mainfrom
maorleger merged 19 commits intoAzure:mainfrom
Conversation
maorleger
commented
Nov 22, 2024
maorleger
commented
Nov 22, 2024
maorleger
commented
Nov 22, 2024
maorleger
commented
Nov 23, 2024
b2aa4b1 to
9dca685
Compare
7a67d2a to
290a914
Compare
Member
Author
|
@joheredi @sarangan12 @qiaozha @MaryGao friendly ping on this - could y'all review and provide your feedback and/or approval? 🙏 |
dgetu
approved these changes
Dec 12, 2024
Member
dgetu
left a comment
There was a problem hiding this comment.
LGTM, just some questions out of curiosity :)
290a914 to
186d3c9
Compare
Member
|
@kazrael2119 can you help verify if the generated code for this works fine? |
Member
Author
Hi @qiaozha - I plan to merge the PR this week, any concerns? |
50b0e36 to
02c68de
Compare
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
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.
This PR adds the
module-kindflag to autorest options, allowing the generated code to have ESM-style imports/exports. Those may be generated with.jsextension and/orindex.jsfor directory-style imports.The default remains CJS in autorest, but the idea is to then add this option to each HLC package that migrates to ESM in our repo.
The yaml would look like:
For any package that has already migrated
TODOs: