Socket
Socket
Sign inDemoInstall

jest-worker

Package Overview
Dependencies
21
Maintainers
5
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3

9

build/index.d.ts

@@ -137,7 +137,6 @@ /**

declare type Promisify<T extends FunctionLike> = ReturnType<T> extends Promise<
infer R
>
? (...args: Parameters<T>) => Promise<R>
: (...args: Parameters<T>) => Promise<ReturnType<T>>;
declare type Promisify<T extends FunctionLike> =
ReturnType<T> extends Promise<infer R>
? (...args: Parameters<T>) => Promise<R>
: (...args: Parameters<T>) => Promise<ReturnType<T>>;

@@ -144,0 +143,0 @@ declare type QueueChildMessage = {

@@ -472,3 +472,5 @@ /*!

this._workerPath = workerPath;
this._workers = new Array(options.numWorkers);
this._workers = Array.from({
length: options.numWorkers
});
const stdout = (0, _mergeStream().default)();

@@ -540,3 +542,3 @@ const stderr = (0, _mergeStream().default)();

createWorker(_workerOptions) {
throw Error('Missing method createWorker in WorkerPool');
throw new Error('Missing method createWorker in WorkerPool');
}

@@ -839,4 +841,4 @@ async start() {

}
} catch (err) {
console.error('Error looking for out of memory crash', err);
} catch (error) {
console.error('Error looking for out of memory crash', error);
}

@@ -1194,3 +1196,2 @@ }

]);
this._retries++;

@@ -1373,6 +1374,6 @@

this._worker.postMessage([_types.CHILD_MESSAGE_MEM_USAGE]);
} catch (err) {
} catch (error) {
this._memoryUsagePromise = undefined;
this._resolveMemoryUsage = undefined;
rejectCallback(err);
rejectCallback(error);
}

@@ -1579,3 +1580,3 @@ return promise;

} else {
throw new Error('"messageParent" can only be used inside a worker');
throw new TypeError('"messageParent" can only be used inside a worker');
}

@@ -1582,0 +1583,0 @@ }

@@ -230,4 +230,4 @@ /*!

result = fn.apply(ctx, args);
} catch (err) {
onError(err);
} catch (error) {
onError(error);
return;

@@ -234,0 +234,0 @@ }

@@ -187,7 +187,7 @@ /*!

_worker_threads().parentPort.postMessage([_types.PARENT_MESSAGE_OK, result]);
} catch (err) {
} catch (error) {
// Handling it here to avoid unhandled `DataCloneError` rejection
// which is hard to distinguish on the parent side
// (such error doesn't have any message or stack trace)
reportClientError(err);
reportClientError(error);
}

@@ -246,4 +246,4 @@ }

result = fn.apply(ctx, args);
} catch (err) {
onError(err);
} catch (error) {
onError(error);
return;

@@ -250,0 +250,0 @@ }

{
"name": "jest-worker",
"version": "30.0.0-alpha.2",
"version": "30.0.0-alpha.3",
"repository": {

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

"@types/node": "*",
"jest-util": "30.0.0-alpha.2",
"jest-util": "30.0.0-alpha.3",
"merge-stream": "^2.0.0",

@@ -34,3 +34,3 @@ "supports-color": "^8.0.0"

"get-stream": "^6.0.0",
"jest-leak-detector": "30.0.0-alpha.2",
"jest-leak-detector": "30.0.0-alpha.3",
"tsd-lite": "^0.8.0",

@@ -45,3 +45,3 @@ "worker-farm": "^1.6.0"

},
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4"
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da"
}
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