Skip to content

Commit

Permalink
fix(build): cache checker
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelyali committed Oct 22, 2021
1 parent bfcae43 commit e047bf3
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 e047bf3

Please sign in to comment.