async analyzeSourceDependencies() {
    const globPath = path.resolve(this.root, this.source)
    const globOpts = {
      ignore: this.ignore,
      nodir: true,
    }
    const files = await glob.please(globPath, globOpts);
    const deps = {};
    this.log('analyzeSourceDependencies', {
      globPath,
      globOpts,
      files
    })

    await Promise.all(files.map(async (file) => {
      const src = await fs.readFilePlease(file, 'utf8');
      this.log('findDependencies', {
        src,
        file
      })
      // const dependencies = nodeDetective(src, this.detective);
      const dependencies = this.findDependencies(src, file)
      const relFile = path.relative(this.root, file);

      this.log(relFile)

      for (let dep of dependencies) {
        if (dep = this.resolveDependency(dep)) {
          this.log('resolved dependency', {
            dep
          })
          deps[dep] = deps[dep] || {
            files: []
          };
          this.log('add dependency to map', relFile)
          deps[dep].files.push(relFile);
        }
      }
      this.log('dependency map', JSON.stringify(deps, null, 2))
    }));
    return deps;
  }
/**
   * Analyzes the package's source files and returns all of the invoked
   * dependencies mapped to the files invoking them.
   * @return {Map<string, object>} - A map with the dependency names as keys
   * and the dependency metadata as values.
   */
Analyzes the package's source files and returns all of the invoked
dependencies mapped to the files invoking them.
@return {Map} - A map with the dependency names as keys
and the dependency metadata as values.
Analyzes the package ' s source files and returns all of the invoked dependencies mapped to the files invoking them . @return { Map } - A map with the dependency names as keys and the dependency metadata as values .
async analyzeSourceDependencies() {
    const globPath = path.resolve(this.root, this.source)
    const globOpts = {
      ignore: this.ignore,
      nodir: true,
    }
    const files = await glob.please(globPath, globOpts);
    const deps = {};
    this.log('analyzeSourceDependencies', {
      globPath,
      globOpts,
      files
    })
    await Promise.all(files.map(async (file) => {
      const src = await fs.readFilePlease(file, 'utf8');
      this.log('findDependencies', {
        src,
        file
      })
      const dependencies = this.findDependencies(src, file)
      const relFile = path.relative(this.root, file);
      this.log(relFile)
      for (let dep of dependencies) {
        if (dep = this.resolveDependency(dep)) {
          this.log('resolved dependency', {
            dep
          })
          deps[dep] = deps[dep] || {
            files: []
          };
          this.log('add dependency to map', relFile)
          deps[dep].files.push(relFile);
        }
      }
      this.log('dependency map', JSON.stringify(deps, null, 2))
    }));
    return deps;
  }
async analyzeSourceDependencies ( ) { const globPath = path . resolve ( this . root , this . source ) const globOpts = { ignore : this . ignore , nodir : true , } const files = await glob . please ( globPath , globOpts ) ; const deps = { } ; this . log ( 'analyzeSourceDependencies' , { globPath , globOpts , files } ) await Promise . all ( files . map ( async ( file ) => { const src = await fs . readFilePlease ( file , 'utf8' ) ; this . log ( 'findDependencies' , { src , file } ) const dependencies = this . findDependencies ( src , file ) const relFile = path . relative ( this . root , file ) ; this . log ( relFile ) for ( let dep of dependencies ) { if ( dep = this . resolveDependency ( dep ) ) { this . log ( 'resolved dependency' , { dep } ) deps [ dep ] = deps [ dep ] || { files : [ ] } ; this . log ( 'add dependency to map' , relFile ) deps [ dep ] . files . push ( relFile ) ; } } this . log ( 'dependency map' , JSON . stringify ( deps , null , 2 ) ) } ) ) ; return deps ; }
Analyzes the package's source files and returns all of the invoked
 dependencies mapped to the files invoking them.
Analyzes the package ' s source files and returns all of the invoked dependencies mapped to the files invoking them .
// const dependencies = nodeDetective(src, this.detective);