Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
35
node_modules/@jest/transform/build/ts3.4/ScriptTransformer.d.ts
generated
vendored
Normal file
35
node_modules/@jest/transform/build/ts3.4/ScriptTransformer.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* 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 { Config } from '@jest/types';
|
||||
import { Options, TransformResult } from './types';
|
||||
export default class ScriptTransformer {
|
||||
private _cache;
|
||||
private _config;
|
||||
private _transformCache;
|
||||
private _transformConfigCache;
|
||||
constructor(config: Config.ProjectConfig);
|
||||
private _getCacheKey;
|
||||
private _getFileCachePath;
|
||||
private _getTransformPath;
|
||||
private _getTransformer;
|
||||
private _instrumentFile;
|
||||
private _getRealPath;
|
||||
preloadTransformer(filepath: Config.Path): void;
|
||||
transformSource(filepath: Config.Path, content: string, instrument: boolean): TransformResult;
|
||||
private _transformAndBuildScript;
|
||||
transform(filename: Config.Path, options: Options, fileSource?: string): TransformResult;
|
||||
transformJson(filename: Config.Path, options: Options, fileSource: string): string;
|
||||
requireAndTranspileModule<ModuleType = unknown>(moduleName: string, callback?: (module: ModuleType) => void): ModuleType;
|
||||
requireAndTranspileModule<ModuleType = unknown>(moduleName: string, callback?: (module: ModuleType) => Promise<void>): Promise<ModuleType>;
|
||||
/**
|
||||
* @deprecated use `this.shouldTransform` instead
|
||||
*/
|
||||
private _shouldTransform;
|
||||
shouldTransform(filename: Config.Path): boolean;
|
||||
}
|
||||
export declare function createTranspilingRequire(config: Config.ProjectConfig): <TModuleType = unknown>(resolverPath: string, applyInteropRequireDefault?: boolean) => TModuleType;
|
||||
//# sourceMappingURL=ScriptTransformer.d.ts.map
|
||||
13
node_modules/@jest/transform/build/ts3.4/enhanceUnexpectedTokenMessage.d.ts
generated
vendored
Normal file
13
node_modules/@jest/transform/build/ts3.4/enhanceUnexpectedTokenMessage.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
interface ErrorWithCodeFrame extends Error {
|
||||
codeFrame?: string;
|
||||
}
|
||||
export default function handlePotentialSyntaxError(e: ErrorWithCodeFrame): ErrorWithCodeFrame;
|
||||
export declare function enhanceUnexpectedTokenMessage(e: Error): Error;
|
||||
export {};
|
||||
//# sourceMappingURL=enhanceUnexpectedTokenMessage.d.ts.map
|
||||
11
node_modules/@jest/transform/build/ts3.4/index.d.ts
generated
vendored
Normal file
11
node_modules/@jest/transform/build/ts3.4/index.d.ts
generated
vendored
Normal file
|
|
@ -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.
|
||||
*/
|
||||
export { default as ScriptTransformer, createTranspilingRequire, } from './ScriptTransformer';
|
||||
export { default as shouldInstrument } from './shouldInstrument';
|
||||
export { Transformer, ShouldInstrumentOptions, Options as TransformationOptions, TransformResult, } from './types';
|
||||
export { default as handlePotentialSyntaxError } from './enhanceUnexpectedTokenMessage';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
10
node_modules/@jest/transform/build/ts3.4/shouldInstrument.d.ts
generated
vendored
Normal file
10
node_modules/@jest/transform/build/ts3.4/shouldInstrument.d.ts
generated
vendored
Normal file
|
|
@ -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 { Config } from '@jest/types';
|
||||
import { ShouldInstrumentOptions } from './types';
|
||||
export default function shouldInstrument(filename: Config.Path, options: ShouldInstrumentOptions, config: Config.ProjectConfig): boolean;
|
||||
//# sourceMappingURL=shouldInstrument.d.ts.map
|
||||
45
node_modules/@jest/transform/build/ts3.4/types.d.ts
generated
vendored
Normal file
45
node_modules/@jest/transform/build/ts3.4/types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* 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 { RawSourceMap } from 'source-map';
|
||||
import { Config } from '@jest/types';
|
||||
export declare type ShouldInstrumentOptions = Pick<Config.GlobalConfig, 'collectCoverage' | 'collectCoverageFrom' | 'collectCoverageOnlyFrom' | 'coverageProvider'> & {
|
||||
changedFiles?: Set<Config.Path>;
|
||||
};
|
||||
export declare type Options = ShouldInstrumentOptions & Partial<{
|
||||
isCoreModule: boolean;
|
||||
isInternalModule: boolean;
|
||||
}>;
|
||||
declare type SourceMapWithVersion = Pick<RawSourceMap, Exclude<keyof RawSourceMap, 'version'>>;
|
||||
interface FixedRawSourceMap extends SourceMapWithVersion {
|
||||
version: number;
|
||||
}
|
||||
export declare type TransformedSource = {
|
||||
code: string;
|
||||
map?: FixedRawSourceMap | string | null;
|
||||
};
|
||||
export declare type TransformResult = {
|
||||
code: string;
|
||||
originalCode: string;
|
||||
mapCoverage: boolean;
|
||||
sourceMapPath: string | null;
|
||||
};
|
||||
export declare type TransformOptions = {
|
||||
instrument: boolean;
|
||||
};
|
||||
export declare type CacheKeyOptions = {
|
||||
config: Config.ProjectConfig;
|
||||
instrument: boolean;
|
||||
rootDir: string;
|
||||
};
|
||||
export interface Transformer {
|
||||
canInstrument?: boolean;
|
||||
createTransformer?: (options?: any) => Transformer;
|
||||
getCacheKey?: (fileData: string, filePath: Config.Path, configStr: string, options: CacheKeyOptions) => string;
|
||||
process: (sourceText: string, sourcePath: Config.Path, config: Config.ProjectConfig, options?: TransformOptions) => string | TransformedSource;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue