jest-util
Advanced tools
Comparing version 27.5.1 to 28.0.0-alpha.0
@@ -7,20 +7,119 @@ /** | ||
*/ | ||
export { default as clearLine } from './clearLine'; | ||
export { default as createDirectory } from './createDirectory'; | ||
export { default as ErrorWithStack } from './ErrorWithStack'; | ||
export { default as installCommonGlobals } from './installCommonGlobals'; | ||
export { default as interopRequireDefault } from './interopRequireDefault'; | ||
export { default as isInteractive } from './isInteractive'; | ||
export { default as isPromise } from './isPromise'; | ||
export { default as setGlobal } from './setGlobal'; | ||
export { default as deepCyclicCopy } from './deepCyclicCopy'; | ||
export { default as convertDescriptorToString } from './convertDescriptorToString'; | ||
export * as specialChars from './specialChars'; | ||
export { default as replacePathSepForGlob } from './replacePathSepForGlob'; | ||
export { default as testPathPatternToRegExp } from './testPathPatternToRegExp'; | ||
export { default as globsToMatcher } from './globsToMatcher'; | ||
export * as preRunMessage from './preRunMessage'; | ||
export { default as pluralize } from './pluralize'; | ||
export { default as formatTime } from './formatTime'; | ||
export { default as tryRealpath } from './tryRealpath'; | ||
export { default as requireOrImportModule } from './requireOrImportModule'; | ||
/// <reference types="node" /> | ||
import type {Config} from '@jest/types'; | ||
declare const ARROW = ' \u203A '; | ||
declare const CLEAR: string; | ||
export declare function clearLine(stream: NodeJS.WriteStream): void; | ||
export declare function convertDescriptorToString< | ||
T extends number | string | Function | undefined, | ||
>(descriptor: T): T | string; | ||
export declare function createDirectory(path: Config.Path): void; | ||
export declare function deepCyclicCopy<T>( | ||
value: T, | ||
options?: DeepCyclicCopyOptions, | ||
cycles?: WeakMap<any, any>, | ||
): T; | ||
declare type DeepCyclicCopyOptions = { | ||
blacklist?: Set<string>; | ||
keepPrototype?: boolean; | ||
}; | ||
export declare class ErrorWithStack extends Error { | ||
constructor( | ||
message: string | undefined, | ||
callsite: (...args: Array<any>) => unknown, | ||
stackLimit?: number, | ||
); | ||
} | ||
export declare function formatTime( | ||
time: number, | ||
prefixPower?: number, | ||
padLeftLength?: number, | ||
): string; | ||
/** | ||
* Converts a list of globs into a function that matches a path against the | ||
* globs. | ||
* | ||
* Every time picomatch is called, it will parse the glob strings and turn | ||
* them into regexp instances. Instead of calling picomatch repeatedly with | ||
* the same globs, we can use this function which will build the picomatch | ||
* matchers ahead of time and then have an optimized path for determining | ||
* whether an individual path matches. | ||
* | ||
* This function is intended to match the behavior of `micromatch()`. | ||
* | ||
* @example | ||
* const isMatch = globsToMatcher(['*.js', '!*.test.js']); | ||
* isMatch('pizza.js'); // true | ||
* isMatch('pizza.test.js'); // false | ||
*/ | ||
export declare function globsToMatcher(globs: Array<Config.Glob>): Matcher; | ||
declare const ICONS: { | ||
failed: string; | ||
pending: string; | ||
success: string; | ||
todo: string; | ||
}; | ||
export declare function installCommonGlobals( | ||
globalObject: typeof globalThis, | ||
globals: Config.ConfigGlobals, | ||
): typeof globalThis & Config.ConfigGlobals; | ||
export declare function interopRequireDefault(obj: any): any; | ||
export declare const isInteractive: boolean; | ||
export declare const isPromise: ( | ||
candidate: unknown, | ||
) => candidate is Promise<unknown>; | ||
declare type Matcher = (str: Config.Path) => boolean; | ||
export declare function pluralize(word: string, count: number): string; | ||
declare namespace preRunMessage { | ||
export {print_2 as print, remove}; | ||
} | ||
export {preRunMessage}; | ||
declare const print_2: (stream: NodeJS.WriteStream) => void; | ||
declare const remove: (stream: NodeJS.WriteStream) => void; | ||
export declare function replacePathSepForGlob(path: Config.Path): Config.Glob; | ||
export declare function requireOrImportModule<T>( | ||
filePath: Config.Path, | ||
applyInteropRequireDefault?: boolean, | ||
): Promise<T>; | ||
export declare function setGlobal( | ||
globalToMutate: typeof globalThis, | ||
key: string, | ||
value: unknown, | ||
): void; | ||
declare namespace specialChars { | ||
export {ARROW, ICONS, CLEAR}; | ||
} | ||
export {specialChars}; | ||
export declare function testPathPatternToRegExp( | ||
testPathPattern: Config.GlobalConfig['testPathPattern'], | ||
): RegExp; | ||
export declare function tryRealpath(path: Config.Path): Config.Path; | ||
export {}; |
@@ -111,2 +111,10 @@ 'use strict'; | ||
var preRunMessage = _interopRequireWildcard(require('./preRunMessage')); | ||
exports.preRunMessage = preRunMessage; | ||
var specialChars = _interopRequireWildcard(require('./specialChars')); | ||
exports.specialChars = specialChars; | ||
var _clearLine = _interopRequireDefault2(require('./clearLine')); | ||
@@ -138,6 +146,2 @@ | ||
var _specialChars = _interopRequireWildcard(require('./specialChars')); | ||
exports.specialChars = _specialChars; | ||
var _replacePathSepForGlob = _interopRequireDefault2( | ||
@@ -153,6 +157,2 @@ require('./replacePathSepForGlob') | ||
var _preRunMessage = _interopRequireWildcard(require('./preRunMessage')); | ||
exports.preRunMessage = _preRunMessage; | ||
var _pluralize = _interopRequireDefault2(require('./pluralize')); | ||
@@ -168,2 +168,6 @@ | ||
function _interopRequireDefault2(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj}; | ||
} | ||
function _getRequireWildcardCache(nodeInterop) { | ||
@@ -210,5 +214,1 @@ if (typeof WeakMap !== 'function') return null; | ||
} | ||
function _interopRequireDefault2(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj}; | ||
} |
{ | ||
"name": "jest-util", | ||
"version": "27.5.1", | ||
"version": "28.0.0-alpha.0", | ||
"repository": { | ||
@@ -20,3 +20,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "^27.5.1", | ||
"@jest/types": "^28.0.0-alpha.0", | ||
"@types/node": "*", | ||
@@ -34,3 +34,3 @@ "chalk": "^4.0.0", | ||
"engines": { | ||
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" | ||
"node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0" | ||
}, | ||
@@ -40,3 +40,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850" | ||
"gitHead": "89275b08977065d98e42ad71fcf223f4ad169f09" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36376
24
1107
2
+ Added@jest/schemas@28.1.3(transitive)
+ Added@jest/types@28.1.3(transitive)
+ Added@sinclair/typebox@0.24.51(transitive)
+ Added@types/yargs@17.0.33(transitive)
- Removed@jest/types@27.5.1(transitive)
- Removed@types/yargs@16.0.9(transitive)
Updated@jest/types@^28.0.0-alpha.0