code: function getInfoFromPackageLock (presetName) {
    debug('get preset info from package-lock.json')
  
    const baseDir = getBaseDir()
    const lockPath = path.join(baseDir, 'package-lock.json')
  
    if (!fs.existsSync(lockPath)) {
      debug('package-lock.json not exist')
      return null
    }
  
    debug(`package-lock.json path: ${lockPath}`)
  
    const lockInfo = _.get(require(lockPath), `dependencies.${presetName}`)
  
    debug('lock info: %o', lockInfo)
  
    if (!lockInfo) {
      return null
    }
  
    return {
      name: presetName,
      version: lockInfo.version,
      registryUrl: getRegistryUrl(lockInfo.resolved)
    }
  }
docs: 从 package-lock.json 中获取 preset 信息
  
  @param {string} presetName preset name
  @returns {null|PresetInfo} 结果