Skip to content

Commit

Permalink
Add salt to File#hash in bundler.js.
Browse files Browse the repository at this point in the history
This is what determines, among other things, source map URL names of the
form <hash>.map, so this may help to avoid meteor#7977.
  • Loading branch information
Ben Newman committed Nov 8, 2016
1 parent a43d669 commit 940cc4f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/isobuild/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,17 @@ class File {
return `File: [info=${this.info}]`;
}

static _salt() {
// Increment this number to force rehashing.
return 1;
}

hash() {
if (! this._hash) {
this._hash = watch.sha1(this.contents());
this._hash = watch.sha1(
String(File._salt()),
this.contents(),
);
}
return this._hash;
}
Expand Down

0 comments on commit 940cc4f

Please sign in to comment.