-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Resolve the modue names with "modulename.json" to json files when doing node module resolution #22167
Merged
Merged
Resolve the modue names with "modulename.json" to json files when doing node module resolution #22167
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5771adb
Resolve Json file when module resolution strategy is node
sheetalkamat ee2e267
Replace usage of jsonObject on JsonSourceFile
sheetalkamat 3572fad
Bind and resolve the module for json file
sheetalkamat 00b6c32
Fix emit for json file
sheetalkamat a1922fd
More tests and also do not add index signature for json module
sheetalkamat ca590d6
Need allowJs to be true to use the json module resolution
sheetalkamat a790a92
Parse all json values at root
sheetalkamat 4257c2f
Resolve the .json file only if module name contains the extension
sheetalkamat 23a7e2f
Report errors about correctness of the json file
sheetalkamat 4f1640d
Verify the output file paths for the json module emit
sheetalkamat c154b81
Ensure our readonly emptyArray stays non modified.
sheetalkamat 2071466
Merge branch 'master' into requireJson
sheetalkamat 2d9af0b
Merge branch 'master' into requireJson
sheetalkamat 28a988d
Merge branch 'master' into requireJson
sheetalkamat b4e0062
Merge branch 'master' into requireJson
sheetalkamat 9f72415
Merge branch 'master' into requireJson
sheetalkamat a143963
Resolve json modules only when --resolveJsonModule is specified
sheetalkamat 9d3ad54
Reverted unintentional formatting changes
sheetalkamat ce08af4
Merge branch 'master' into requireJson
sheetalkamat 579748b
Merge branch 'master' into requireJson
sheetalkamat c7b2d92
PR feedback
sheetalkamat 97df079
PR feedback
sheetalkamat 15f9ea3
Merge branch 'master' into requireJson
sheetalkamat 4e6586d
PR feedback
sheetalkamat c4143ae
Update the message for resolveJsonModule as per PR feedback
sheetalkamat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this returnValue check just for efficiency, to avoid building up a value that's not needed.
Actually, why isn't it needed, when existing callers needed it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need value when we are importing modules: We just want the error reporting on valid json syntax. So creating (potentially large) json object isnt needed hence the flag. In case of config file, we do need json object as well as checks which can be done simultaneously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment on the function header?