This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Modify require feature response to return an array of ModuleMetadata instead of toplevel match_route, graphql etc. The Require feature now returns a list of ModuleMetadata found when parsing a file. Each module import is distinguished by type ModuletType which is added in this diff. The ModuleType describes the way in which a module is required. The enum values are fairly self-explanatory. The new ModuleMetadata class contains a list of references where the module was required/imported/etc. These refs contain the call_range and the args_range of the statement. The args_range represents the range of the import/require/reexport source ie: const a = require(|'b'|); The args_range represents the range of the import/require/reexport source. This is in keeping with what what the general require feature expects. ie: const a = require(|'b'|); In addition, this diff adds reexported modules to the require feature. Reexported modules are referenced in an es6 reexport statement ie `export foo from 'bar'`. Reviewed By: avp Differential Revision: D24700998 fbshipit-source-id: f43a128454f0e131987ebf2dd05a914557bc9a49
- Loading branch information