Skip to content

Commit

Permalink
perf(index): switch to md4 for content hashing (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored and michael-ciniawsky committed Mar 9, 2018
1 parent c097601 commit 2be8191
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/writeFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import serialize from 'serialize-javascript';
import { name, version } from '../package.json';
import findCacheDir from 'find-cache-dir';
import { stat, readFile } from './utils/promisify';
import crypto from 'crypto';

export default function writeFile(globalRef, pattern, file) {
const {info, debug, compilation, fileDependencies, written, inputFileSystem, copyUnmodified} = globalRef;
Expand Down Expand Up @@ -40,7 +41,7 @@ export default function writeFile(globalRef, pattern, file) {
name,
version,
pattern,
content
hash: crypto.createHash('md4').update(content).digest('hex')
});

return cacache
Expand Down

0 comments on commit 2be8191

Please sign in to comment.