diff --git a/src/type-hash.js b/src/type-hash.js index 0aaf62c..c132d0a 100644 --- a/src/type-hash.js +++ b/src/type-hash.js @@ -5,6 +5,7 @@ const mapObj = require("map-obj"); const objectHash = require("object-hash"); +const util = require("util"); const filterTypeRules = require("./util/filter-type-rules"); @@ -116,7 +117,7 @@ function hashType(type, level = 0, seenTypes = new Map()) { }; } } else { - throw new Error("Foo"); + throw new Error(`Unrecognized rule type: ${util.inspect(rule)}`); } for (let [seenRule, seenLevel] of seenTypes) { @@ -159,7 +160,7 @@ function hashType(type, level = 0, seenTypes = new Map()) { module.exports = function generateTypeHash(type) { return objectHash(hashType(type), { - algorithm: "sha256", + algorithm: "sha1", /* FIXME: Switch to SHA256, after figuring out how to make this work in Webpack */ respectFunctionNames: false, respectFunctionProperties: false }).slice(0, 6);