New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-runtime

Package Overview
Dependencies
Maintainers
7
Versions
306
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-runtime - npm Package Compare versions

Comparing version 27.0.0-next.5 to 27.0.0-next.6

1

build/index.d.ts

@@ -59,2 +59,3 @@ /**

private readonly _fileTransforms;
private readonly _fileTransformsMutex;
private _v8CoverageInstrumenter;

@@ -61,0 +62,0 @@ private _v8CoverageResult;

77

build/index.js

@@ -352,2 +352,4 @@ 'use strict';

_defineProperty(this, '_fileTransformsMutex', void 0);
_defineProperty(this, '_v8CoverageInstrumenter', void 0);

@@ -397,2 +399,3 @@

this._fileTransforms = new Map();
this._fileTransformsMutex = new Map();
this._virtualMocks = new Map();

@@ -520,2 +523,6 @@ this.jestObjectCaches = new Map();

if (this._fileTransformsMutex.has(cacheKey)) {
await this._fileTransformsMutex.get(cacheKey);
}
if (!this._esmoduleRegistry.has(cacheKey)) {

@@ -530,3 +537,18 @@ invariant(

invariant(context, 'Test environment has been torn down');
let transformResolve;
let transformReject;
this._fileTransformsMutex.set(
cacheKey,
new Promise((resolve, reject) => {
transformResolve = resolve;
transformReject = reject;
})
);
invariant(
transformResolve && transformReject,
'Promise initialization should be sync - please report this bug to Jest!'
);
if (this._resolver.isCoreModule(modulePath)) {

@@ -537,2 +559,3 @@ const core = this._importCoreModule(modulePath, context);

transformResolve();
return core;

@@ -548,24 +571,36 @@ }

});
const module = new (_vm().SourceTextModule)(transformedCode, {
context,
identifier: modulePath,
importModuleDynamically: async (specifier, referencingModule) => {
invariant(
runtimeSupportsVmModules,
'You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/en/ecmascript-modules'
);
const module = await this.resolveModule(
specifier,
referencingModule.identifier,
referencingModule.context
);
return this.linkAndEvaluateModule(module);
},
initializeImportMeta(meta) {
meta.url = (0, _url().pathToFileURL)(modulePath).href;
}
});
try {
const module = new (_vm().SourceTextModule)(transformedCode, {
context,
identifier: modulePath,
importModuleDynamically: async (specifier, referencingModule) => {
invariant(
runtimeSupportsVmModules,
'You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/en/ecmascript-modules'
);
const module = await this.resolveModule(
specifier,
referencingModule.identifier,
referencingModule.context
);
return this.linkAndEvaluateModule(module);
},
this._esmoduleRegistry.set(cacheKey, module);
initializeImportMeta(meta) {
meta.url = (0, _url().pathToFileURL)(modulePath).href;
}
});
invariant(
!this._esmoduleRegistry.has(cacheKey),
`Module cache already has entry ${cacheKey}. This is a bug in Jest, please report it!`
);
this._esmoduleRegistry.set(cacheKey, module);
transformResolve();
} catch (error) {
transformReject(error);
throw error;
}
}

@@ -1183,2 +1218,4 @@

this._fileTransformsMutex.clear();
this.jestObjectCaches.clear();

@@ -1185,0 +1222,0 @@ this._v8CoverageResult = [];

{
"name": "jest-runtime",
"version": "27.0.0-next.5",
"version": "27.0.0-next.6",
"repository": {

@@ -17,9 +17,9 @@ "type": "git",

"dependencies": {
"@jest/console": "^27.0.0-next.5",
"@jest/environment": "^27.0.0-next.5",
"@jest/fake-timers": "^27.0.0-next.5",
"@jest/globals": "^27.0.0-next.5",
"@jest/console": "^27.0.0-next.6",
"@jest/environment": "^27.0.0-next.6",
"@jest/fake-timers": "^27.0.0-next.6",
"@jest/globals": "^27.0.0-next.6",
"@jest/source-map": "^27.0.0-next.3",
"@jest/test-result": "^27.0.0-next.5",
"@jest/transform": "^27.0.0-next.5",
"@jest/test-result": "^27.0.0-next.6",
"@jest/transform": "^27.0.0-next.6",
"@jest/types": "^27.0.0-next.3",

@@ -33,10 +33,10 @@ "@types/yargs": "^16.0.0",

"graceful-fs": "^4.2.4",
"jest-haste-map": "^27.0.0-next.5",
"jest-message-util": "^27.0.0-next.5",
"jest-haste-map": "^27.0.0-next.6",
"jest-message-util": "^27.0.0-next.6",
"jest-mock": "^27.0.0-next.3",
"jest-regex-util": "^27.0.0-next.0",
"jest-resolve": "^27.0.0-next.5",
"jest-snapshot": "^27.0.0-next.5",
"jest-util": "^27.0.0-next.3",
"jest-validate": "^27.0.0-next.5",
"jest-resolve": "^27.0.0-next.6",
"jest-snapshot": "^27.0.0-next.6",
"jest-util": "^27.0.0-next.6",
"jest-validate": "^27.0.0-next.6",
"slash": "^3.0.0",

@@ -47,3 +47,3 @@ "strip-bom": "^4.0.0",

"devDependencies": {
"@jest/test-utils": "^27.0.0-next.5",
"@jest/test-utils": "^27.0.0-next.6",
"@types/exit": "^0.1.30",

@@ -54,3 +54,3 @@ "@types/glob": "^7.1.1",

"execa": "^5.0.0",
"jest-environment-node": "^27.0.0-next.5",
"jest-environment-node": "^27.0.0-next.6",
"jest-snapshot-serializer-raw": "^1.1.0"

@@ -64,3 +64,3 @@ },

},
"gitHead": "0a2b94282170b6d4cc26c2d2003cc04ffebe5e3f"
"gitHead": "974d2f22b7deeb4f683fb38dd1ee3a0e984916df"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc