constants.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. /**
  7. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  8. *
  9. * This source code is licensed under the MIT license found in the
  10. * LICENSE file in the root directory of this source tree.
  11. */
  12. /* eslint-disable sort-keys */
  13. /*
  14. * This file exports a set of constants that are used for Jest's haste map
  15. * serialization. On very large repositories, the haste map cache becomes very
  16. * large to the point where it is the largest overhead in starting up Jest.
  17. *
  18. * This constant key map allows to keep the map smaller without having to build
  19. * a custom serialization library.
  20. */
  21. const constants = {
  22. /* dependency serialization */
  23. DEPENDENCY_DELIM: '\0',
  24. /* file map attributes */
  25. ID: 0,
  26. MTIME: 1,
  27. SIZE: 2,
  28. VISITED: 3,
  29. DEPENDENCIES: 4,
  30. SHA1: 5,
  31. /* module map attributes */
  32. PATH: 0,
  33. TYPE: 1,
  34. /* module types */
  35. MODULE: 0,
  36. PACKAGE: 1,
  37. /* platforms */
  38. GENERIC_PLATFORM: 'g',
  39. NATIVE_PLATFORM: 'native'
  40. };
  41. var _default = constants;
  42. exports.default = _default;