UNPKG

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