jest-runtime
Advanced tools
+1
-2
@@ -31,4 +31,3 @@ /** | ||
| declare interface InternalModuleOptions | ||
| extends Required<CallerTransformOptions> { | ||
| declare interface InternalModuleOptions extends Required<CallerTransformOptions> { | ||
| isInternalModule: boolean; | ||
@@ -35,0 +34,0 @@ } |
+17
-17
| { | ||
| "name": "jest-runtime", | ||
| "version": "30.2.0", | ||
| "version": "30.3.0", | ||
| "repository": { | ||
@@ -22,9 +22,9 @@ "type": "git", | ||
| "dependencies": { | ||
| "@jest/environment": "30.2.0", | ||
| "@jest/fake-timers": "30.2.0", | ||
| "@jest/globals": "30.2.0", | ||
| "@jest/environment": "30.3.0", | ||
| "@jest/fake-timers": "30.3.0", | ||
| "@jest/globals": "30.3.0", | ||
| "@jest/source-map": "30.0.1", | ||
| "@jest/test-result": "30.2.0", | ||
| "@jest/transform": "30.2.0", | ||
| "@jest/types": "30.2.0", | ||
| "@jest/test-result": "30.3.0", | ||
| "@jest/transform": "30.3.0", | ||
| "@jest/types": "30.3.0", | ||
| "@types/node": "*", | ||
@@ -34,11 +34,11 @@ "chalk": "^4.1.2", | ||
| "collect-v8-coverage": "^1.0.2", | ||
| "glob": "^10.3.10", | ||
| "glob": "^10.5.0", | ||
| "graceful-fs": "^4.2.11", | ||
| "jest-haste-map": "30.2.0", | ||
| "jest-message-util": "30.2.0", | ||
| "jest-mock": "30.2.0", | ||
| "jest-haste-map": "30.3.0", | ||
| "jest-message-util": "30.3.0", | ||
| "jest-mock": "30.3.0", | ||
| "jest-regex-util": "30.0.1", | ||
| "jest-resolve": "30.2.0", | ||
| "jest-snapshot": "30.2.0", | ||
| "jest-util": "30.2.0", | ||
| "jest-resolve": "30.3.0", | ||
| "jest-snapshot": "30.3.0", | ||
| "jest-util": "30.3.0", | ||
| "slash": "^3.0.0", | ||
@@ -48,5 +48,5 @@ "strip-bom": "^4.0.0" | ||
| "devDependencies": { | ||
| "@jest/test-utils": "30.2.0", | ||
| "@jest/test-utils": "30.3.0", | ||
| "@types/graceful-fs": "^4.1.9", | ||
| "jest-environment-node": "30.2.0" | ||
| "jest-environment-node": "30.3.0" | ||
| }, | ||
@@ -59,3 +59,3 @@ "engines": { | ||
| }, | ||
| "gitHead": "855864e3f9751366455246790be2bf912d4d0dac" | ||
| "gitHead": "efb59c2e81083f8dc941f20d6d20a3af2dc8d068" | ||
| } |
| import { CallerTransformOptions, ScriptTransformer, ShouldInstrumentOptions, shouldInstrument } from "@jest/transform"; | ||
| import { IHasteMap, IModuleMap } from "jest-haste-map"; | ||
| import Resolver from "jest-resolve"; | ||
| import { JestEnvironment } from "@jest/environment"; | ||
| import { expect } from "@jest/globals"; | ||
| import { SourceMapRegistry } from "@jest/source-map"; | ||
| import { TestContext, V8CoverageResult } from "@jest/test-result"; | ||
| import { Config, Global } from "@jest/types"; | ||
| //#region src/index.d.ts | ||
| interface JestGlobals extends Global.TestFrameworkGlobals { | ||
| expect: typeof expect; | ||
| } | ||
| type HasteMapOptions = { | ||
| console?: Console; | ||
| maxWorkers: number; | ||
| resetCache: boolean; | ||
| watch?: boolean; | ||
| watchman: boolean; | ||
| workerThreads?: boolean; | ||
| }; | ||
| interface InternalModuleOptions extends Required<CallerTransformOptions> { | ||
| isInternalModule: boolean; | ||
| } | ||
| declare class Runtime { | ||
| private readonly _cacheFS; | ||
| private readonly _cacheFSBuffer; | ||
| private readonly _config; | ||
| private readonly _globalConfig; | ||
| private readonly _coverageOptions; | ||
| private _currentlyExecutingModulePath; | ||
| private readonly _environment; | ||
| private readonly _explicitShouldMock; | ||
| private readonly _explicitShouldMockModule; | ||
| private readonly _onGenerateMock; | ||
| private _fakeTimersImplementation; | ||
| private readonly _internalModuleRegistry; | ||
| private _isCurrentlyExecutingManualMock; | ||
| private _mainModule; | ||
| private readonly _mockFactories; | ||
| private readonly _mockMetaDataCache; | ||
| private _mockRegistry; | ||
| private _isolatedMockRegistry; | ||
| private readonly _moduleMockRegistry; | ||
| private readonly _moduleMockFactories; | ||
| private readonly _moduleMocker; | ||
| private _isolatedModuleRegistry; | ||
| private _moduleRegistry; | ||
| private readonly _esmoduleRegistry; | ||
| private readonly _cjsNamedExports; | ||
| private readonly _esmModuleLinkingMap; | ||
| private readonly _testPath; | ||
| private readonly _resolver; | ||
| private _shouldAutoMock; | ||
| private readonly _shouldMockModuleCache; | ||
| private readonly _shouldUnmockTransitiveDependenciesCache; | ||
| private readonly _sourceMapRegistry; | ||
| private readonly _scriptTransformer; | ||
| private readonly _fileTransforms; | ||
| private readonly _fileTransformsMutex; | ||
| private _v8CoverageInstrumenter; | ||
| private _v8CoverageResult; | ||
| private _v8CoverageSources; | ||
| private readonly _transitiveShouldMock; | ||
| private _unmockList; | ||
| private readonly _virtualMocks; | ||
| private readonly _virtualModuleMocks; | ||
| private _moduleImplementation?; | ||
| private readonly jestObjectCaches; | ||
| private jestGlobals?; | ||
| private readonly esmConditions; | ||
| private readonly cjsConditions; | ||
| private isTornDown; | ||
| private isInsideTestCode; | ||
| constructor(config: Config.ProjectConfig, environment: JestEnvironment, resolver: Resolver, transformer: ScriptTransformer, cacheFS: Map<string, string>, coverageOptions: ShouldInstrumentOptions, testPath: string, globalConfig: Config.GlobalConfig); | ||
| static shouldInstrument: typeof shouldInstrument; | ||
| static createContext(config: Config.ProjectConfig, options: { | ||
| console?: Console; | ||
| maxWorkers: number; | ||
| watch?: boolean; | ||
| watchman: boolean; | ||
| }): Promise<TestContext>; | ||
| static createHasteMap(config: Config.ProjectConfig, options?: HasteMapOptions): Promise<IHasteMap>; | ||
| static createResolver(config: Config.ProjectConfig, moduleMap: IModuleMap): Resolver; | ||
| unstable_shouldLoadAsEsm(modulePath: string): boolean; | ||
| private loadEsmModule; | ||
| private resolveModule; | ||
| private linkAndEvaluateModule; | ||
| unstable_importModule(from: string, moduleName?: string): Promise<unknown | void>; | ||
| private loadCjsAsEsm; | ||
| private importMock; | ||
| private getExportsOfCjs; | ||
| requireModule<T = unknown>(from: string, moduleName?: string, options?: InternalModuleOptions, isRequireActual?: boolean): T; | ||
| requireInternalModule<T = unknown>(from: string, to?: string): T; | ||
| requireActual<T = unknown>(from: string, moduleName: string): T; | ||
| requireMock<T = unknown>(from: string, moduleName: string): T; | ||
| private _loadModule; | ||
| private _getFullTransformationOptions; | ||
| requireModuleOrMock<T = unknown>(from: string, moduleName: string): T; | ||
| isolateModules(fn: () => void): void; | ||
| isolateModulesAsync(fn: () => Promise<void>): Promise<void>; | ||
| resetModules(): void; | ||
| collectV8Coverage(): Promise<void>; | ||
| stopCollectingV8Coverage(): Promise<void>; | ||
| getAllCoverageInfoCopy(): JestEnvironment['global']['__coverage__']; | ||
| getAllV8CoverageInfoCopy(): V8CoverageResult; | ||
| getSourceMaps(): SourceMapRegistry; | ||
| setMock(from: string, moduleName: string, mockFactory: () => unknown, options?: { | ||
| virtual?: boolean; | ||
| }): void; | ||
| private setModuleMock; | ||
| restoreAllMocks(): void; | ||
| resetAllMocks(): void; | ||
| clearAllMocks(): void; | ||
| enterTestCode(): void; | ||
| leaveTestCode(): void; | ||
| teardown(): void; | ||
| private _resolveCjsModule; | ||
| private _resolveModule; | ||
| private _requireResolve; | ||
| private _requireResolvePaths; | ||
| private _execModule; | ||
| private transformFile; | ||
| private transformFileAsync; | ||
| private createScriptFromCode; | ||
| private _requireCoreModule; | ||
| private _importCoreModule; | ||
| private _importWasmModule; | ||
| private _getMockedNativeModule; | ||
| private _generateMock; | ||
| private _shouldMockCjs; | ||
| private _shouldMockModule; | ||
| private _createRequireImplementation; | ||
| private _createJestObjectFor; | ||
| private _logFormattedReferenceError; | ||
| private constructInjectedModuleParameters; | ||
| private handleExecutionError; | ||
| private getGlobalsForCjs; | ||
| private getGlobalsForEsm; | ||
| private getGlobalsFromEnvironment; | ||
| private readFileBuffer; | ||
| private readFile; | ||
| setGlobalsForRuntime(globals: JestGlobals): void; | ||
| } | ||
| //#endregion | ||
| export { Runtime as default }; |
Sorry, the diff of this file is too big to display
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2117
0.14%86502
-6.06%5
-16.67%20
33.33%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated
Updated