diff options
| author | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:02:27 +0200 | 
|---|---|---|
| committer | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:02:27 +0200 | 
| commit | 5d309ff52cd399a6b71968a6b9a70c8ac0b98981 (patch) | |
| tree | 360f7eb50f956e2367ef38fa1fc6ac7ac5258042 /node_modules/@jest/core/build/lib | |
| parent | b500a50f1b97d93c98b36ed9a980f8188d648147 (diff) | |
| download | LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.tar.gz LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.zip  | |
Added node_modules for the updating to work properly.
Diffstat (limited to 'node_modules/@jest/core/build/lib')
14 files changed, 461 insertions, 0 deletions
diff --git a/node_modules/@jest/core/build/lib/activeFiltersMessage.d.ts b/node_modules/@jest/core/build/lib/activeFiltersMessage.d.ts new file mode 100644 index 0000000..15f595a --- /dev/null +++ b/node_modules/@jest/core/build/lib/activeFiltersMessage.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +declare const activeFilters: (globalConfig: Config.GlobalConfig, delimiter?: string) => string; +export default activeFilters; diff --git a/node_modules/@jest/core/build/lib/activeFiltersMessage.js b/node_modules/@jest/core/build/lib/activeFiltersMessage.js new file mode 100644 index 0000000..ff63332 --- /dev/null +++ b/node_modules/@jest/core/build/lib/activeFiltersMessage.js @@ -0,0 +1,54 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.default = void 0; + +function _chalk() { +  const data = _interopRequireDefault(require('chalk')); + +  _chalk = function () { +    return data; +  }; + +  return data; +} + +function _interopRequireDefault(obj) { +  return obj && obj.__esModule ? obj : {default: obj}; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +const activeFilters = (globalConfig, delimiter = '\n') => { +  const {testNamePattern, testPathPattern} = globalConfig; + +  if (testNamePattern || testPathPattern) { +    const filters = [ +      testPathPattern +        ? _chalk().default.dim('filename ') + +          _chalk().default.yellow('/' + testPathPattern + '/') +        : null, +      testNamePattern +        ? _chalk().default.dim('test name ') + +          _chalk().default.yellow('/' + testNamePattern + '/') +        : null +    ] +      .filter(f => f) +      .join(', '); +    const messages = [ +      '\n' + _chalk().default.bold('Active Filters: ') + filters +    ]; +    return messages.filter(message => !!message).join(delimiter); +  } + +  return ''; +}; + +var _default = activeFilters; +exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/createContext.d.ts b/node_modules/@jest/core/build/lib/createContext.d.ts new file mode 100644 index 0000000..c98a3ef --- /dev/null +++ b/node_modules/@jest/core/build/lib/createContext.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +import type { HasteMapObject } from 'jest-haste-map'; +import { Context } from 'jest-runtime'; +export default function createContext(config: Config.ProjectConfig, { hasteFS, moduleMap }: HasteMapObject): Context; diff --git a/node_modules/@jest/core/build/lib/createContext.js b/node_modules/@jest/core/build/lib/createContext.js new file mode 100644 index 0000000..b360e9c --- /dev/null +++ b/node_modules/@jest/core/build/lib/createContext.js @@ -0,0 +1,35 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.default = createContext; + +function _jestRuntime() { +  const data = _interopRequireDefault(require('jest-runtime')); + +  _jestRuntime = function () { +    return data; +  }; + +  return data; +} + +function _interopRequireDefault(obj) { +  return obj && obj.__esModule ? obj : {default: obj}; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +function createContext(config, {hasteFS, moduleMap}) { +  return { +    config, +    hasteFS, +    moduleMap, +    resolver: _jestRuntime().default.createResolver(config, moduleMap) +  }; +} diff --git a/node_modules/@jest/core/build/lib/handleDeprecationWarnings.d.ts b/node_modules/@jest/core/build/lib/handleDeprecationWarnings.d.ts new file mode 100644 index 0000000..8d2151e --- /dev/null +++ b/node_modules/@jest/core/build/lib/handleDeprecationWarnings.d.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// <reference types="node" /> +export default function handleDeprecationWarnings(pipe: NodeJS.WriteStream, stdin?: NodeJS.ReadStream): Promise<void>; diff --git a/node_modules/@jest/core/build/lib/handleDeprecationWarnings.js b/node_modules/@jest/core/build/lib/handleDeprecationWarnings.js new file mode 100644 index 0000000..f0a15d6 --- /dev/null +++ b/node_modules/@jest/core/build/lib/handleDeprecationWarnings.js @@ -0,0 +1,72 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.default = handleDeprecationWarnings; + +function _chalk() { +  const data = _interopRequireDefault(require('chalk')); + +  _chalk = function () { +    return data; +  }; + +  return data; +} + +function _jestWatcher() { +  const data = require('jest-watcher'); + +  _jestWatcher = function () { +    return data; +  }; + +  return data; +} + +function _interopRequireDefault(obj) { +  return obj && obj.__esModule ? obj : {default: obj}; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +function handleDeprecationWarnings(pipe, stdin = process.stdin) { +  return new Promise((resolve, reject) => { +    if (typeof stdin.setRawMode === 'function') { +      const messages = [ +        _chalk().default.red('There are deprecation warnings.\n'), +        _chalk().default.dim(' \u203A Press ') + +          'Enter' + +          _chalk().default.dim(' to continue.'), +        _chalk().default.dim(' \u203A Press ') + +          'Esc' + +          _chalk().default.dim(' to exit.') +      ]; +      pipe.write(messages.join('\n')); +      stdin.setRawMode(true); +      stdin.resume(); +      stdin.setEncoding('utf8'); // this is a string since we set encoding above + +      stdin.on('data', key => { +        if (key === _jestWatcher().KEYS.ENTER) { +          resolve(); +        } else if ( +          [ +            _jestWatcher().KEYS.ESCAPE, +            _jestWatcher().KEYS.CONTROL_C, +            _jestWatcher().KEYS.CONTROL_D +          ].indexOf(key) !== -1 +        ) { +          reject(); +        } +      }); +    } else { +      resolve(); +    } +  }); +} diff --git a/node_modules/@jest/core/build/lib/isValidPath.d.ts b/node_modules/@jest/core/build/lib/isValidPath.d.ts new file mode 100644 index 0000000..d81880a --- /dev/null +++ b/node_modules/@jest/core/build/lib/isValidPath.d.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +export default function isValidPath(globalConfig: Config.GlobalConfig, filePath: Config.Path): boolean; diff --git a/node_modules/@jest/core/build/lib/isValidPath.js b/node_modules/@jest/core/build/lib/isValidPath.js new file mode 100644 index 0000000..10971d3 --- /dev/null +++ b/node_modules/@jest/core/build/lib/isValidPath.js @@ -0,0 +1,29 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.default = isValidPath; + +function _jestSnapshot() { +  const data = require('jest-snapshot'); + +  _jestSnapshot = function () { +    return data; +  }; + +  return data; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +function isValidPath(globalConfig, filePath) { +  return ( +    !filePath.includes(globalConfig.coverageDirectory) && +    !(0, _jestSnapshot().isSnapshotPath)(filePath) +  ); +} diff --git a/node_modules/@jest/core/build/lib/logDebugMessages.d.ts b/node_modules/@jest/core/build/lib/logDebugMessages.d.ts new file mode 100644 index 0000000..b312cd9 --- /dev/null +++ b/node_modules/@jest/core/build/lib/logDebugMessages.d.ts @@ -0,0 +1,9 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/// <reference types="node" /> +import type { Config } from '@jest/types'; +export default function logDebugMessages(globalConfig: Config.GlobalConfig, configs: Array<Config.ProjectConfig> | Config.ProjectConfig, outputStream: NodeJS.WriteStream): void; diff --git a/node_modules/@jest/core/build/lib/logDebugMessages.js b/node_modules/@jest/core/build/lib/logDebugMessages.js new file mode 100644 index 0000000..9c1f2f5 --- /dev/null +++ b/node_modules/@jest/core/build/lib/logDebugMessages.js @@ -0,0 +1,23 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.default = logDebugMessages; + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +const VERSION = require('../../package.json').version; // if the output here changes, update `getConfig` in e2e/runJest.ts + +function logDebugMessages(globalConfig, configs, outputStream) { +  const output = { +    configs, +    globalConfig, +    version: VERSION +  }; +  outputStream.write(JSON.stringify(output, null, '  ') + '\n'); +} diff --git a/node_modules/@jest/core/build/lib/updateGlobalConfig.d.ts b/node_modules/@jest/core/build/lib/updateGlobalConfig.d.ts new file mode 100644 index 0000000..8282936 --- /dev/null +++ b/node_modules/@jest/core/build/lib/updateGlobalConfig.d.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +import type { AllowedConfigOptions } from 'jest-watcher'; +declare type ExtraConfigOptions = Partial<Pick<Config.GlobalConfig, 'noSCM' | 'passWithNoTests'>>; +export default function updateGlobalConfig(globalConfig: Config.GlobalConfig, options?: AllowedConfigOptions & ExtraConfigOptions): Config.GlobalConfig; +export {}; diff --git a/node_modules/@jest/core/build/lib/updateGlobalConfig.js b/node_modules/@jest/core/build/lib/updateGlobalConfig.js new file mode 100644 index 0000000..5c49586 --- /dev/null +++ b/node_modules/@jest/core/build/lib/updateGlobalConfig.js @@ -0,0 +1,121 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.default = updateGlobalConfig; + +function _jestRegexUtil() { +  const data = require('jest-regex-util'); + +  _jestRegexUtil = function () { +    return data; +  }; + +  return data; +} + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +function updateGlobalConfig(globalConfig, options = {}) { +  const newConfig = {...globalConfig}; + +  if (options.mode === 'watch') { +    newConfig.watch = true; +    newConfig.watchAll = false; +  } else if (options.mode === 'watchAll') { +    newConfig.watch = false; +    newConfig.watchAll = true; +  } + +  if (options.testNamePattern !== undefined) { +    newConfig.testNamePattern = options.testNamePattern || ''; +  } + +  if (options.testPathPattern !== undefined) { +    newConfig.testPathPattern = +      (0, _jestRegexUtil().replacePathSepForRegex)(options.testPathPattern) || +      ''; +  } + +  newConfig.onlyChanged = +    !newConfig.watchAll && +    !newConfig.testNamePattern && +    !newConfig.testPathPattern; + +  if (typeof options.bail === 'boolean') { +    newConfig.bail = options.bail ? 1 : 0; +  } else if (options.bail !== undefined) { +    newConfig.bail = options.bail; +  } + +  if (options.changedSince !== undefined) { +    newConfig.changedSince = options.changedSince; +  } + +  if (options.collectCoverage !== undefined) { +    newConfig.collectCoverage = options.collectCoverage || false; +  } + +  if (options.collectCoverageFrom !== undefined) { +    newConfig.collectCoverageFrom = options.collectCoverageFrom; +  } + +  if (options.collectCoverageOnlyFrom !== undefined) { +    newConfig.collectCoverageOnlyFrom = options.collectCoverageOnlyFrom; +  } + +  if (options.coverageDirectory !== undefined) { +    newConfig.coverageDirectory = options.coverageDirectory; +  } + +  if (options.coverageReporters !== undefined) { +    newConfig.coverageReporters = options.coverageReporters; +  } + +  if (options.findRelatedTests !== undefined) { +    newConfig.findRelatedTests = options.findRelatedTests; +  } + +  if (options.nonFlagArgs !== undefined) { +    newConfig.nonFlagArgs = options.nonFlagArgs; +  } + +  if (options.noSCM) { +    newConfig.noSCM = true; +  } + +  if (options.notify !== undefined) { +    newConfig.notify = options.notify || false; +  } + +  if (options.notifyMode !== undefined) { +    newConfig.notifyMode = options.notifyMode; +  } + +  if (options.onlyFailures !== undefined) { +    newConfig.onlyFailures = options.onlyFailures || false; +  } + +  if (options.passWithNoTests !== undefined) { +    newConfig.passWithNoTests = true; +  } + +  if (options.reporters !== undefined) { +    newConfig.reporters = options.reporters; +  } + +  if (options.updateSnapshot !== undefined) { +    newConfig.updateSnapshot = options.updateSnapshot; +  } + +  if (options.verbose !== undefined) { +    newConfig.verbose = options.verbose || false; +  } + +  return Object.freeze(newConfig); +} diff --git a/node_modules/@jest/core/build/lib/watchPluginsHelpers.d.ts b/node_modules/@jest/core/build/lib/watchPluginsHelpers.d.ts new file mode 100644 index 0000000..99e8d7f --- /dev/null +++ b/node_modules/@jest/core/build/lib/watchPluginsHelpers.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +import type { Config } from '@jest/types'; +import type { UsageData, WatchPlugin } from 'jest-watcher'; +export declare const filterInteractivePlugins: (watchPlugins: Array<WatchPlugin>, globalConfig: Config.GlobalConfig) => Array<WatchPlugin>; +export declare const getSortedUsageRows: (watchPlugins: Array<WatchPlugin>, globalConfig: Config.GlobalConfig) => Array<UsageData>; diff --git a/node_modules/@jest/core/build/lib/watchPluginsHelpers.js b/node_modules/@jest/core/build/lib/watchPluginsHelpers.js new file mode 100644 index 0000000..9f595ce --- /dev/null +++ b/node_modules/@jest/core/build/lib/watchPluginsHelpers.js @@ -0,0 +1,62 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { +  value: true +}); +exports.getSortedUsageRows = exports.filterInteractivePlugins = void 0; + +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +const filterInteractivePlugins = (watchPlugins, globalConfig) => { +  const usageInfos = watchPlugins.map( +    p => p.getUsageInfo && p.getUsageInfo(globalConfig) +  ); +  return watchPlugins.filter((_plugin, i) => { +    const usageInfo = usageInfos[i]; + +    if (usageInfo) { +      const {key} = usageInfo; +      return !usageInfos.slice(i + 1).some(u => !!u && key === u.key); +    } + +    return false; +  }); +}; + +exports.filterInteractivePlugins = filterInteractivePlugins; + +function notEmpty(value) { +  return value != null; +} + +const getSortedUsageRows = (watchPlugins, globalConfig) => +  filterInteractivePlugins(watchPlugins, globalConfig) +    .sort((a, b) => { +      if (a.isInternal && b.isInternal) { +        // internal plugins in the order we specify them +        return 0; +      } + +      if (a.isInternal !== b.isInternal) { +        // external plugins afterwards +        return a.isInternal ? -1 : 1; +      } + +      const usageInfoA = a.getUsageInfo && a.getUsageInfo(globalConfig); +      const usageInfoB = b.getUsageInfo && b.getUsageInfo(globalConfig); + +      if (usageInfoA && usageInfoB) { +        // external plugins in alphabetical order +        return usageInfoA.key.localeCompare(usageInfoB.key); +      } + +      return 0; +    }) +    .map(p => p.getUsageInfo && p.getUsageInfo(globalConfig)) +    .filter(notEmpty); + +exports.getSortedUsageRows = getSortedUsageRows;  | 
