Socket
Socket
Sign inDemoInstall

jest-worker

Package Overview
Dependencies
9
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 21.3.0-beta.4 to 21.3.0-beta.5

.npmignore

1

build/index.js

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

forkOptions: options.forkOptions || {},
maxRetries: options.maxRetries || 3,
workerPath };

@@ -73,0 +74,0 @@

@@ -50,2 +50,4 @@ /**

// Messages passed from the parent to the children.

@@ -52,0 +54,0 @@

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

constructor(options) {

@@ -95,4 +96,20 @@ this._options = options;

this._retries++;
this._child = child;
this._busy = false;
// If we exceeded the amount of retries, we will emulate an error reply
// coming from the child. This avoids code duplication related with cleaning
// the queue, and scheduling the next call.
if (this._retries > this._options.maxRetries) {
const error = new Error('Call retries were exceeded');
this._receive([(_types || _load_types()).PARENT_MESSAGE_ERROR,
error.name,
error.message,
error.stack,
{ type: 'WorkerError' }]);
}
}

@@ -124,3 +141,5 @@

this._retries = 0;
this._busy = true;
// $FlowFixMe: wrong "ChildProcess.send" signature.

@@ -127,0 +146,0 @@ this._child.send(call.request);

2

package.json
{
"name": "jest-worker",
"version": "21.3.0-beta.4",
"version": "21.3.0-beta.5",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -62,2 +62,6 @@ # jest-worker

#### `maxRetries: number` (optional)
Maximum amount of times that a dead child can be re-spawned, per call. Defaults to `3`, pass `Infinity` to allow endless retries.
#### `forkOptions: Object` (optional)

@@ -64,0 +68,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc