constants.js 386 B

1234567891011121314
  1. const { createHash } = require('crypto');
  2. const { name } = require('../package.json');
  3. // TODO: increment this version if there are schema changes
  4. // that are not backwards compatible:
  5. const VERSION = '4';
  6. const SHA = 'sha1';
  7. module.exports = {
  8. SHA,
  9. MAGIC_KEY: '_coverageSchema',
  10. MAGIC_VALUE: createHash(SHA)
  11. .update(name + '@' + VERSION)
  12. .digest('hex')
  13. };