Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swc/jest

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swc/jest - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

19

index.js

@@ -36,4 +36,19 @@ "use strict";

var core_1 = require("@swc/core");
var packagePath = path.join(process.cwd(), 'package.json');
var packageConfig = JSON.parse(fs.readFileSync(packagePath, 'utf-8'));
/**
* Loads closes package.json in the directory hierarchy
*/
function loadClosesPackageJson(attempts) {
if (attempts === void 0) { attempts = 1; }
if (attempts > 5) {
throw new Error('Can\'t resolve main package.json file');
}
var mainPath = attempts === 1 ? './' : Array(attempts).join("../");
try {
return require(mainPath + 'package.json');
}
catch (e) {
return loadClosesPackageJson(attempts + 1);
}
}
var packageConfig = loadClosesPackageJson();
var isEsmProject = packageConfig.type === 'module';

@@ -40,0 +55,0 @@ // Jest use the `vm` [Module API](https://nodejs.org/api/vm.html#vm_class_vm_module) for ESM.

{
"name": "@swc/jest",
"version": "0.2.4",
"version": "0.2.5",
"description": "swc integration for jest",

@@ -18,2 +18,6 @@ "main": "index.js",

},
"repository": {
"type": "git",
"url": "https://github.com/swc-project/jest.git"
},
"peerDependencies": {

@@ -20,0 +24,0 @@ "@swc/core": "*"

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