Get the dependencies of a CommonJS module by traversing its AST