Class FindModuleDependencies

java.lang.Object
com.google.javascript.jscomp.FindModuleDependencies
All Implemented Interfaces:
NodeTraversal.Callback, NodeTraversal.ScopedCallback

public class FindModuleDependencies extends Object implements NodeTraversal.ScopedCallback
Find and update any direct dependencies of an input. Used to walk the dependency graph and support a strict depth-first dependency ordering. Marks an input as providing its module name.

Discovers dependencies from:

  • goog.require calls
  • ES6 import statements
  • CommonJS require statements
  • goog.requireDynamic calls

The order of dependency references is preserved so that a deterministic depth-first ordering can be achieved.