Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Disabe staleBuildContract function
Browse files Browse the repository at this point in the history
  • Loading branch information
daniyarchambylov authored and rocky committed Mar 3, 2019
1 parent a7398f1 commit deb0eb7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/trufstuf.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ const staleBuildContract = async (directory, file) => {
const getTruffleBuildJsonFiles = async function(directory) {
const files = await readdir(directory);
const filtered1 = files.filter(f => f !== 'Migrations.json');
const promisified = await Promise.all(filtered1.map(async f => {
const isStale = await staleBuildContract(directory, f);
return isStale ? null : f;
}));
const filtered2 = promisified.filter(f => !!f);
const filePaths = filtered2.map(f => path.join(directory, f));

// FIXME: Broken with new artifact structure. Probably should be moved to profiler?
// const promisified = await Promise.all(filtered1.map(async f => {
// const isStale = await staleBuildContract(directory, f);
// return isStale ? null : f;
// }));
// const filtered2 = promisified.filter(f => !!f);
const filePaths = filtered1.map(f => path.join(directory, f));
return filePaths;
};

Expand Down

0 comments on commit deb0eb7

Please sign in to comment.