nl_tokens: legacy repoDocs have only true / false set at repository . files [ yarn . lock ] ect newer repoDocs have an array ( empty or with the paths ) packageFilename : path of pckage . json
pl_tokens: function ( files , packageFilename ) { const convertedFiles = _ . flatten ( Object . keys ( files ) . map ( key => { if ( <mask> [ key ] === true ) return key else return files [ key ] } ) ) const hasPackageLock = _ . includes ( convertedFiles , packageFilename . replace ( 'package.json' , 'package-lock.json' ) ) if ( hasPackageLock ) return packageFilename . replace ( 'package.json' , 'package-lock.json' ) const hasYarnLock = _ . includes ( convertedFiles , packageFilename . replace ( 'package.json' , 'yarn.lock' ) ) if ( hasYarnLock ) return packageFilename . replace ( 'package.json' , 'yarn.lock' ) return null }