Add Robot_JoyIt driver
This commit is contained in:
1
node_modules/@jest/transform/LICENSE
generated
vendored
1
node_modules/@jest/transform/LICENSE
generated
vendored
@@ -1,6 +1,7 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
Copyright Contributors to the Jest project.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
1000
node_modules/@jest/transform/build/ScriptTransformer.js
generated
vendored
1000
node_modules/@jest/transform/build/ScriptTransformer.js
generated
vendored
File diff suppressed because it is too large
Load Diff
76
node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js
generated
vendored
76
node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js
generated
vendored
@@ -1,76 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = handlePotentialSyntaxError;
|
||||
exports.enhanceUnexpectedTokenMessage = enhanceUnexpectedTokenMessage;
|
||||
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) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const DOT = ' \u2022 ';
|
||||
function handlePotentialSyntaxError(e) {
|
||||
if (e.codeFrame != null) {
|
||||
e.stack = `${e.message}\n${e.codeFrame}`;
|
||||
}
|
||||
if (
|
||||
// `instanceof` might come from the wrong context
|
||||
e.name === 'SyntaxError' &&
|
||||
!e.message.includes(' expected')
|
||||
) {
|
||||
throw enhanceUnexpectedTokenMessage(e);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
function enhanceUnexpectedTokenMessage(e) {
|
||||
e.stack = `${_chalk().default.bold.red(
|
||||
'Jest encountered an unexpected token'
|
||||
)}
|
||||
|
||||
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
|
||||
|
||||
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
|
||||
|
||||
By default "node_modules" folder is ignored by transformers.
|
||||
|
||||
Here's what you can do:
|
||||
${DOT}If you are trying to use ECMAScript Modules, see ${_chalk().default.underline(
|
||||
'https://jestjs.io/docs/ecmascript-modules'
|
||||
)} for how to enable it.
|
||||
${DOT}If you are trying to use TypeScript, see ${_chalk().default.underline(
|
||||
'https://jestjs.io/docs/getting-started#using-typescript'
|
||||
)}
|
||||
${DOT}To have some of your "node_modules" files transformed, you can specify a custom ${_chalk().default.bold(
|
||||
'"transformIgnorePatterns"'
|
||||
)} in your config.
|
||||
${DOT}If you need a custom transformation specify a ${_chalk().default.bold(
|
||||
'"transform"'
|
||||
)} option in your config.
|
||||
${DOT}If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the ${_chalk().default.bold(
|
||||
'"moduleNameMapper"'
|
||||
)} config option.
|
||||
|
||||
You'll find more details and examples of these config options in the docs:
|
||||
${_chalk().default.cyan('https://jestjs.io/docs/configuration')}
|
||||
For information about custom transformations, see:
|
||||
${_chalk().default.cyan('https://jestjs.io/docs/code-transformation')}
|
||||
|
||||
${_chalk().default.bold.red('Details:')}
|
||||
|
||||
${e.stack ?? ''}`.trimRight();
|
||||
return e;
|
||||
}
|
||||
139
node_modules/@jest/transform/build/index.d.mts
generated
vendored
Normal file
139
node_modules/@jest/transform/build/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
import { Config, TransformTypes } from "@jest/types";
|
||||
import { EncodedSourceMap } from "@jridgewell/trace-mapping";
|
||||
|
||||
//#region src/types.d.ts
|
||||
|
||||
interface ShouldInstrumentOptions extends Pick<Config.GlobalConfig, 'collectCoverage' | 'collectCoverageFrom' | 'coverageProvider'> {
|
||||
changedFiles?: Set<string>;
|
||||
sourcesRelatedToTestsInChangedFiles?: Set<string>;
|
||||
}
|
||||
interface Options extends ShouldInstrumentOptions, CallerTransformOptions {
|
||||
isInternalModule?: boolean;
|
||||
}
|
||||
interface FixedRawSourceMap extends Omit<EncodedSourceMap, 'version'> {
|
||||
version: number;
|
||||
}
|
||||
type TransformedSource = {
|
||||
code: string;
|
||||
map?: FixedRawSourceMap | string | null;
|
||||
};
|
||||
type TransformResult = TransformTypes.TransformResult;
|
||||
interface CallerTransformOptions {
|
||||
supportsDynamicImport: boolean;
|
||||
supportsExportNamespaceFrom: boolean;
|
||||
supportsStaticESM: boolean;
|
||||
supportsTopLevelAwait: boolean;
|
||||
}
|
||||
interface ReducedTransformOptions extends CallerTransformOptions {
|
||||
instrument: boolean;
|
||||
}
|
||||
interface RequireAndTranspileModuleOptions extends ReducedTransformOptions {
|
||||
applyInteropRequireDefault: boolean;
|
||||
}
|
||||
type StringMap = Map<string, string>;
|
||||
interface TransformOptions<TransformerConfig = unknown> extends ReducedTransformOptions {
|
||||
/** Cached file system which is used by `jest-runtime` to improve performance. */
|
||||
cacheFS: StringMap;
|
||||
/** Jest configuration of currently running project. */
|
||||
config: Config.ProjectConfig;
|
||||
/** Stringified version of the `config` - useful in cache busting. */
|
||||
configString: string;
|
||||
/** Transformer configuration passed through `transform` option by the user. */
|
||||
transformerConfig: TransformerConfig;
|
||||
}
|
||||
interface SyncTransformer<TransformerConfig = unknown> {
|
||||
/**
|
||||
* Indicates if the transformer is capable of instrumenting the code for code coverage.
|
||||
*
|
||||
* If V8 coverage is _not_ active, and this is `true`, Jest will assume the code is instrumented.
|
||||
* If V8 coverage is _not_ active, and this is `false`. Jest will instrument the code returned by this transformer using Babel.
|
||||
*/
|
||||
canInstrument?: boolean;
|
||||
getCacheKey?: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => string;
|
||||
getCacheKeyAsync?: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => Promise<string>;
|
||||
process: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => TransformedSource;
|
||||
processAsync?: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => Promise<TransformedSource>;
|
||||
}
|
||||
interface AsyncTransformer<TransformerConfig = unknown> {
|
||||
/**
|
||||
* Indicates if the transformer is capable of instrumenting the code for code coverage.
|
||||
*
|
||||
* If V8 coverage is _not_ active, and this is `true`, Jest will assume the code is instrumented.
|
||||
* If V8 coverage is _not_ active, and this is `false`. Jest will instrument the code returned by this transformer using Babel.
|
||||
*/
|
||||
canInstrument?: boolean;
|
||||
getCacheKey?: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => string;
|
||||
getCacheKeyAsync?: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => Promise<string>;
|
||||
process?: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => TransformedSource;
|
||||
processAsync: (sourceText: string, sourcePath: string, options: TransformOptions<TransformerConfig>) => Promise<TransformedSource>;
|
||||
}
|
||||
/**
|
||||
* We have both sync (`process`) and async (`processAsync`) code transformation, which both can be provided.
|
||||
* `require` will always use `process`, and `import` will use `processAsync` if it exists, otherwise fall back to `process`.
|
||||
* Meaning, if you use `import` exclusively you do not need `process`, but in most cases supplying both makes sense:
|
||||
* Jest transpiles on demand rather than ahead of time, so the sync one needs to exist.
|
||||
*
|
||||
* For more info on the sync vs async model, see https://jestjs.io/docs/code-transformation#writing-custom-transformers
|
||||
*/
|
||||
type Transformer<TransformerConfig = unknown> = SyncTransformer<TransformerConfig> | AsyncTransformer<TransformerConfig>;
|
||||
type TransformerCreator<X extends Transformer<TransformerConfig>, TransformerConfig = unknown> = (transformerConfig?: TransformerConfig) => X | Promise<X>;
|
||||
/**
|
||||
* Instead of having your custom transformer implement the Transformer interface
|
||||
* directly, you can choose to export a factory function to dynamically create
|
||||
* transformers. This is to allow having a transformer config in your jest config.
|
||||
*/
|
||||
type TransformerFactory<X extends Transformer> = {
|
||||
createTransformer: TransformerCreator<X>;
|
||||
};
|
||||
//#endregion
|
||||
//#region src/ScriptTransformer.d.ts
|
||||
declare class ScriptTransformer {
|
||||
private readonly _config;
|
||||
private readonly _cacheFS;
|
||||
private readonly _cache;
|
||||
private readonly _transformCache;
|
||||
private _transformsAreLoaded;
|
||||
constructor(_config: Config.ProjectConfig, _cacheFS: StringMap);
|
||||
private _buildCacheKeyFromFileInfo;
|
||||
private _buildTransformCacheKey;
|
||||
private _getCacheKey;
|
||||
private _getCacheKeyAsync;
|
||||
private _createCachedFilename;
|
||||
private _getFileCachePath;
|
||||
private _getFileCachePathAsync;
|
||||
private _getTransformPatternAndPath;
|
||||
private _getTransformPath;
|
||||
loadTransformers(): Promise<void>;
|
||||
private _getTransformer;
|
||||
private _instrumentFile;
|
||||
private _buildTransformResult;
|
||||
transformSource(filepath: string, content: string, options: ReducedTransformOptions): TransformResult;
|
||||
transformSourceAsync(filepath: string, content: string, options: ReducedTransformOptions): Promise<TransformResult>;
|
||||
private _transformAndBuildScriptAsync;
|
||||
private _transformAndBuildScript;
|
||||
transformAsync(filename: string, options: Options, fileSource?: string): Promise<TransformResult>;
|
||||
transform(filename: string, options: Options, fileSource?: string): TransformResult;
|
||||
transformJson(filename: string, options: Options, fileSource: string): string;
|
||||
requireAndTranspileModule<ModuleType = unknown>(moduleName: string, callback?: (module: ModuleType) => void | Promise<void>, options?: RequireAndTranspileModuleOptions): Promise<ModuleType>;
|
||||
shouldTransform(filename: string): boolean;
|
||||
}
|
||||
declare function createTranspilingRequire(config: Config.ProjectConfig): Promise<(<TModuleType = unknown>(resolverPath: string, applyInteropRequireDefault?: boolean) => Promise<TModuleType>)>;
|
||||
type TransformerType = ScriptTransformer;
|
||||
declare function createScriptTransformer(config: Config.ProjectConfig, cacheFS?: StringMap): Promise<TransformerType>;
|
||||
//#endregion
|
||||
//#region src/shouldInstrument.d.ts
|
||||
declare function shouldInstrument(filename: string, options: ShouldInstrumentOptions, config: Config.ProjectConfig, loadedFilenames?: Array<string>): boolean;
|
||||
//#endregion
|
||||
//#region src/enhanceUnexpectedTokenMessage.d.ts
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
interface ErrorWithCodeFrame extends Error {
|
||||
codeFrame?: string;
|
||||
}
|
||||
declare function handlePotentialSyntaxError(e: ErrorWithCodeFrame): ErrorWithCodeFrame;
|
||||
//#endregion
|
||||
export { AsyncTransformer, CallerTransformOptions, TransformerType as ScriptTransformer, ShouldInstrumentOptions, SyncTransformer, TransformOptions, TransformResult, Options as TransformationOptions, TransformedSource, Transformer, TransformerCreator, TransformerFactory, createScriptTransformer, createTranspilingRequire, handlePotentialSyntaxError, shouldInstrument };
|
||||
6
node_modules/@jest/transform/build/index.d.ts
generated
vendored
6
node_modules/@jest/transform/build/index.d.ts
generated
vendored
@@ -4,9 +4,9 @@
|
||||
* 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 {EncodedSourceMap} from '@jridgewell/trace-mapping';
|
||||
import type {TransformTypes} from '@jest/types';
|
||||
|
||||
import {EncodedSourceMap} from '@jridgewell/trace-mapping';
|
||||
import {Config, TransformTypes} from '@jest/types';
|
||||
|
||||
export declare interface AsyncTransformer<TransformerConfig = unknown> {
|
||||
/**
|
||||
|
||||
1095
node_modules/@jest/transform/build/index.js
generated
vendored
1095
node_modules/@jest/transform/build/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
6
node_modules/@jest/transform/build/index.mjs
generated
vendored
Normal file
6
node_modules/@jest/transform/build/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import cjsModule from './index.js';
|
||||
|
||||
export const createScriptTransformer = cjsModule.createScriptTransformer;
|
||||
export const createTranspilingRequire = cjsModule.createTranspilingRequire;
|
||||
export const handlePotentialSyntaxError = cjsModule.handlePotentialSyntaxError;
|
||||
export const shouldInstrument = cjsModule.shouldInstrument;
|
||||
94
node_modules/@jest/transform/build/runtimeErrorsAndWarnings.js
generated
vendored
94
node_modules/@jest/transform/build/runtimeErrorsAndWarnings.js
generated
vendored
@@ -1,94 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.makeInvalidTransformerError =
|
||||
exports.makeInvalidSyncTransformerError =
|
||||
exports.makeInvalidSourceMapWarning =
|
||||
exports.makeInvalidReturnValueError =
|
||||
void 0;
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _slash() {
|
||||
const data = _interopRequireDefault(require('slash'));
|
||||
_slash = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const BULLET = '\u25cf ';
|
||||
const DOCUMENTATION_NOTE = ` ${_chalk().default.bold(
|
||||
'Code Transformation Documentation:'
|
||||
)}
|
||||
https://jestjs.io/docs/code-transformation
|
||||
`;
|
||||
const UPGRADE_NOTE = ` ${_chalk().default.bold(
|
||||
'This error may be caused by a breaking change in Jest 28:'
|
||||
)}
|
||||
https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer
|
||||
`;
|
||||
const makeInvalidReturnValueError = transformPath =>
|
||||
_chalk().default.red(
|
||||
[
|
||||
_chalk().default.bold(`${BULLET}Invalid return value:`),
|
||||
' `process()` or/and `processAsync()` method of code transformer found at ',
|
||||
` "${(0, _slash().default)(transformPath)}" `,
|
||||
' should return an object or a Promise resolving to an object. The object ',
|
||||
' must have `code` property with a string of processed code.',
|
||||
''
|
||||
].join('\n') +
|
||||
UPGRADE_NOTE +
|
||||
DOCUMENTATION_NOTE
|
||||
);
|
||||
exports.makeInvalidReturnValueError = makeInvalidReturnValueError;
|
||||
const makeInvalidSourceMapWarning = (filename, transformPath) =>
|
||||
_chalk().default.yellow(
|
||||
[
|
||||
_chalk().default.bold(`${BULLET}Invalid source map:`),
|
||||
` The source map for "${(0, _slash().default)(
|
||||
filename
|
||||
)}" returned by "${(0, _slash().default)(transformPath)}" is invalid.`,
|
||||
' Proceeding without source mapping for that file.'
|
||||
].join('\n')
|
||||
);
|
||||
exports.makeInvalidSourceMapWarning = makeInvalidSourceMapWarning;
|
||||
const makeInvalidSyncTransformerError = transformPath =>
|
||||
_chalk().default.red(
|
||||
[
|
||||
_chalk().default.bold(`${BULLET}Invalid synchronous transformer module:`),
|
||||
` "${(0, _slash().default)(
|
||||
transformPath
|
||||
)}" specified in the "transform" object of Jest configuration`,
|
||||
' must export a `process` function.',
|
||||
''
|
||||
].join('\n') + DOCUMENTATION_NOTE
|
||||
);
|
||||
exports.makeInvalidSyncTransformerError = makeInvalidSyncTransformerError;
|
||||
const makeInvalidTransformerError = transformPath =>
|
||||
_chalk().default.red(
|
||||
[
|
||||
_chalk().default.bold(`${BULLET}Invalid transformer module:`),
|
||||
` "${(0, _slash().default)(
|
||||
transformPath
|
||||
)}" specified in the "transform" object of Jest configuration`,
|
||||
' must export a `process` or `processAsync` or `createTransformer` function.',
|
||||
''
|
||||
].join('\n') + DOCUMENTATION_NOTE
|
||||
);
|
||||
exports.makeInvalidTransformerError = makeInvalidTransformerError;
|
||||
177
node_modules/@jest/transform/build/shouldInstrument.js
generated
vendored
177
node_modules/@jest/transform/build/shouldInstrument.js
generated
vendored
@@ -1,177 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = shouldInstrument;
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _micromatch() {
|
||||
const data = _interopRequireDefault(require('micromatch'));
|
||||
_micromatch = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _jestRegexUtil() {
|
||||
const data = require('jest-regex-util');
|
||||
_jestRegexUtil = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
_jestUtil = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
function _getRequireWildcardCache(nodeInterop) {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cacheBabelInterop = new WeakMap();
|
||||
var cacheNodeInterop = new WeakMap();
|
||||
return (_getRequireWildcardCache = function (nodeInterop) {
|
||||
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
||||
})(nodeInterop);
|
||||
}
|
||||
function _interopRequireWildcard(obj, nodeInterop) {
|
||||
if (!nodeInterop && obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache(nodeInterop);
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const MOCKS_PATTERN = new RegExp(
|
||||
(0, _jestRegexUtil().escapePathForRegex)(
|
||||
`${path().sep}__mocks__${path().sep}`
|
||||
)
|
||||
);
|
||||
const cachedRegexes = new Map();
|
||||
const getRegex = regexStr => {
|
||||
if (!cachedRegexes.has(regexStr)) {
|
||||
cachedRegexes.set(regexStr, new RegExp(regexStr));
|
||||
}
|
||||
const regex = cachedRegexes.get(regexStr);
|
||||
|
||||
// prevent stateful regexes from breaking, just in case
|
||||
regex.lastIndex = 0;
|
||||
return regex;
|
||||
};
|
||||
function shouldInstrument(filename, options, config, loadedFilenames) {
|
||||
if (!options.collectCoverage) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
config.forceCoverageMatch.length &&
|
||||
_micromatch().default.any(filename, config.forceCoverageMatch)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
!config.testPathIgnorePatterns.some(pattern =>
|
||||
getRegex(pattern).test(filename)
|
||||
)
|
||||
) {
|
||||
if (config.testRegex.some(regex => new RegExp(regex).test(filename))) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
(0, _jestUtil().globsToMatcher)(config.testMatch)(
|
||||
(0, _jestUtil().replacePathSepForGlob)(filename)
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (
|
||||
options.collectCoverageFrom.length === 0 &&
|
||||
loadedFilenames != null &&
|
||||
!loadedFilenames.includes(filename)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
// still cover if `only` is specified
|
||||
options.collectCoverageFrom.length &&
|
||||
!(0, _jestUtil().globsToMatcher)(options.collectCoverageFrom)(
|
||||
(0, _jestUtil().replacePathSepForGlob)(
|
||||
path().relative(config.rootDir, filename)
|
||||
)
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
config.coveragePathIgnorePatterns.some(pattern => !!filename.match(pattern))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (config.globalSetup === filename) {
|
||||
return false;
|
||||
}
|
||||
if (config.globalTeardown === filename) {
|
||||
return false;
|
||||
}
|
||||
if (config.setupFiles.includes(filename)) {
|
||||
return false;
|
||||
}
|
||||
if (config.setupFilesAfterEnv.includes(filename)) {
|
||||
return false;
|
||||
}
|
||||
if (MOCKS_PATTERN.test(filename)) {
|
||||
return false;
|
||||
}
|
||||
if (options.changedFiles && !options.changedFiles.has(filename)) {
|
||||
if (!options.sourcesRelatedToTestsInChangedFiles) {
|
||||
return false;
|
||||
}
|
||||
if (!options.sourcesRelatedToTestsInChangedFiles.has(filename)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (filename.endsWith('.json')) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
1
node_modules/@jest/transform/build/types.js
generated
vendored
1
node_modules/@jest/transform/build/types.js
generated
vendored
@@ -1 +0,0 @@
|
||||
'use strict';
|
||||
46
node_modules/@jest/transform/package.json
generated
vendored
46
node_modules/@jest/transform/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jest/transform",
|
||||
"version": "29.7.0",
|
||||
"version": "30.2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jestjs/jest.git",
|
||||
@@ -12,41 +12,43 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./build/index.d.ts",
|
||||
"require": "./build/index.js",
|
||||
"import": "./build/index.mjs",
|
||||
"default": "./build/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.11.6",
|
||||
"@jest/types": "^29.6.3",
|
||||
"@jridgewell/trace-mapping": "^0.3.18",
|
||||
"babel-plugin-istanbul": "^6.1.1",
|
||||
"chalk": "^4.0.0",
|
||||
"@babel/core": "^7.27.4",
|
||||
"@jest/types": "30.2.0",
|
||||
"@jridgewell/trace-mapping": "^0.3.25",
|
||||
"babel-plugin-istanbul": "^7.0.1",
|
||||
"chalk": "^4.1.2",
|
||||
"convert-source-map": "^2.0.0",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"graceful-fs": "^4.2.9",
|
||||
"jest-haste-map": "^29.7.0",
|
||||
"jest-regex-util": "^29.6.3",
|
||||
"jest-util": "^29.7.0",
|
||||
"micromatch": "^4.0.4",
|
||||
"pirates": "^4.0.4",
|
||||
"graceful-fs": "^4.2.11",
|
||||
"jest-haste-map": "30.2.0",
|
||||
"jest-regex-util": "30.0.1",
|
||||
"jest-util": "30.2.0",
|
||||
"micromatch": "^4.0.8",
|
||||
"pirates": "^4.0.7",
|
||||
"slash": "^3.0.0",
|
||||
"write-file-atomic": "^4.0.2"
|
||||
"write-file-atomic": "^5.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/test-utils": "^29.7.0",
|
||||
"@types/babel__core": "^7.1.14",
|
||||
"@types/convert-source-map": "^2.0.0",
|
||||
"@types/graceful-fs": "^4.1.3",
|
||||
"@types/micromatch": "^4.0.1",
|
||||
"@types/write-file-atomic": "^4.0.0",
|
||||
"dedent": "^1.0.0"
|
||||
"@jest/test-utils": "30.2.0",
|
||||
"@types/babel__core": "^7.20.5",
|
||||
"@types/convert-source-map": "^2.0.3",
|
||||
"@types/graceful-fs": "^4.1.9",
|
||||
"@types/micromatch": "^4.0.9",
|
||||
"@types/write-file-atomic": "^4.0.3",
|
||||
"dedent": "^1.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "4e56991693da7cd4c3730dc3579a1dd1403ee630"
|
||||
"gitHead": "855864e3f9751366455246790be2bf912d4d0dac"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user