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

jest-worker

Package Overview
Dependencies
Maintainers
4
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-worker - npm Package Compare versions

Comparing version 24.0.0-alpha.13 to 24.0.0-alpha.14

2

build/index.js

@@ -114,3 +114,3 @@ /**

const workerPoolOptions = {
disableWorkerThreads: this._options.disableWorkerThreads || false,
enableWorkerThreads: this._options.enableWorkerThreads || false,
forkOptions: this._options.forkOptions || {},

@@ -117,0 +117,0 @@ maxRetries: this._options.maxRetries || 3,

@@ -41,3 +41,3 @@ /**

if (!this._options.disableWorkerThreads && canUseWorkerThreads()) {
if (this._options.enableWorkerThreads && canUseWorkerThreads()) {
Worker = require('./workers/NodeThreadsWorker').default;

@@ -44,0 +44,0 @@ } else {

{
"name": "jest-worker",
"version": "24.0.0-alpha.13",
"version": "24.0.0-alpha.14",
"repository": {

@@ -21,3 +21,3 @@ "type": "git",

},
"gitHead": "6de22dde9a10f775adc7b6f80080bdd224f6ae31"
"gitHead": "28971c5f794330e8acc6861288e6daafcd32238e"
}

@@ -46,6 +46,4 @@ # jest-worker

We will use worker threads where available. To enable in Node 10+, run the Node process with the `--experimental-worker` flag.
Since `worker_threads` are considered experimental in Node, you have to opt-in to this behavior by passing `enableWorkerThreads: true` when instantiating the worker. While the feature was unflagged in Node 11.7.0, you'll need to run the Node process with the `--experimental-worker` flag for Node 10.
You can explicitly opt-out of this by passing `disableWorkerThreads: true`.
## API

@@ -95,5 +93,5 @@

#### `disableWorkerThreads: boolean` (optional)
#### `enableWorkerThreads: boolean` (optional)
`jest-worker` will automatically detect if `worker_threads` are available and use them. However, running under threads comes with [some caveats](https://nodejs.org/api/worker_threads.html#worker_threads_class_worker), and is still experimental, so you can `opt-out` of this and use `disableWorkerThreads: true`.
`jest-worker` will automatically detect if `worker_threads` are available, but will not use them unless passed `enableWorkerThreads: true`.

@@ -100,0 +98,0 @@ ## Worker

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