Repository navigation
Optimize package.json loading for AmdModuleImportCheck - #334811
Merged
Merged
Conversation
Moved package.json reading outside of the rule module to reduce disk I/O and JSON parsing on each file scan.
Contributor
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Dmitriy Vasyura (dmitrivMS)
requested changes
Sep 22, 2026
Moved package.json reading and module list generation outside of the rule module to optimize performance.
Dmitriy Vasyura (dmitrivMS)
requested changes
Sep 22, 2026
Implement lazy initialization for cached modules and rethrow errors in catch block as suggested in review.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 22, 2026
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 22, 2026 10:15
Giuseppe Cianci (Giuspepe)
approved these changes
Sep 22, 2026
Martin Aeschlimann (aeschli)
approved these changes
Sep 22, 2026
Dmitriy Vasyura (dmitrivMS)
merged commit Sep 22, 2026
407c45e
into
microsoft:main
53 of 54 checks passed
Contributor
Author
|
Hi team, thanks for reviewing and merging I noticed my name wasn't included in the contributors list for this release version, unlike my previous contributions. Could this be checked when you have a moment? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Fixes #334810
Description
Moved
package.jsonreading and parsing logic outside of thecreate()method to module scope in the AMD import ESLint rule.Impact
Previously,
readFileSyncandJSON.parsewere executed on every file scan. Caching this at the module level eliminates unnecessary disk I/O and speeds up lint runs across the repository.