code: async function getDependencyFiles (options, filePath, cache) {
    if (cache && cache[filePath]) return cache[filePath]
  
    let filePaths = []
  
    try {
      const contents = await readFile(filePath, 'utf-8')
      const dir = dirname(filePath)
      const lex = pugLexer(contents, { filename: filePath })
      const parsed = pugParser(lex)
  
      pugWalk(parsed, node => {
        if (DEPENDENCY_NODE_TYPES.includes(node.type)) {
          const filePath = node.file.path
          let dependencyPath
  
          if (isAbsolute(filePath)) {
            const { basedir } = options || {}
            if (basedir) {
              dependencyPath = join(basedir, filePath)
            } else {
              // mimic pug when receiving an absolute path and basedir is not set
              throw new Error('the "basedir" option is required to use includes and extends with "absolute" paths')
            }
          } else {
            dependencyPath = resolve(dir, filePath)
          }
  
          // as globby/fast-glob use unixified file paths we convert our path here
          // https://github.com/mrmlnc/fast-glob/pull/56/commits/cc702eab74c1013061001bccb9d5b408f29abd96
          dependencyPath = crossPlatformPath(dependencyPath)
  
          if (filePaths.indexOf(dependencyPath) === -1) {
            filePaths.push(dependencyPath)
          }
        }
      })
    } catch (err) {
      // console.warn(`Could not parse file "${filePath}"`, err)
    }
  
    if (cache) cache[filePath] = filePaths
  
    return filePaths
  }
docs: based on a pull request I proposed for pug-dependencies, see: https://github.com/pure180/pug-dependencies/pull/2