fileListStream.on('end', async () => { fileListStream.removeAllListeners(); let fileChecksums = await promiseProps(fileChecksumPromises); // Compute a stable hash of the hashes let hashStream = crypto.createHash('sha1'); for (let checksum of sortBy(fileChecksums)) { hashStream.update(checksum, 'utf8'); } resolve(hashStream.digest('hex')); });
async readUnversionedDepChecksumsAsync(name, deps) { let packagePath = path.resolve(this.root, name); let unversionedDeps = this.filterLocalDeps(name, deps); let promises = {}; for (let [dep, depPath] of toPairsIn(unversionedDeps)) { let absoluteDepPath = path.resolve(packagePath, depPath); promises[dep] = this.readPackageChecksumAsync(absoluteDepPath); } return await promiseProps(promises); }