Skip to content

Commit

Permalink
Merge pull request #50 from zMotivat0r/fix/build-cache-checker
Browse files Browse the repository at this point in the history
fix(build): cache checker
  • Loading branch information
michaelyali authored Oct 22, 2021
2 parents bfcae43 + e047bf3 commit 1ed2db1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Empty file modified lib/bin/mrepo.js
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion lib/helpers/hash-check.helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/helpers/hash-check.helper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/helpers/hash-check.helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isString } from '@nestled/util';
import { hashElement } from 'folder-hash';
import { ensureFile, readJson, writeJson } from 'fs-extra';
import { join } from 'path';
Expand All @@ -12,7 +13,7 @@ export async function hasCached(workspaceName: string, packageName: string): Pro
const paths = getPaths(workspaceName, packageName);
const hashes = await getHashes(paths);

return savedCache.src === hashes.src && savedCache.lib === hashes.lib;
return savedCache.src === hashes.src && savedCache.lib === hashes.lib && isString(hashes.lib);
}

export async function saveCache(workspaceName: string, packageName: string) {
Expand Down

0 comments on commit 1ed2db1

Please sign in to comment.