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

async-transforms

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-transforms - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

15

lib/worker.js

@@ -59,7 +59,12 @@ import worker from 'worker_threads';

} else if (activeWorkers < options.tasks) {
// In commonJS mode, we have to _again_ require the script, as the Worker ctor incorrectly
// only allows ".js" (run as modules because of `type: module`) or ".mjs" extensions.
// This will probably be fixed in a future Node. Sounds like a bug.
const code = isModule ? workerTarget : `require(${JSON.stringify(workerTarget)});`;
w = new worker.Worker(code, {workerData: {dep}, eval: !isModule});
if (isModule) {
w = new worker.Worker(workerTarget, {workerData: {dep}});
} else {
// In commonJS mode, we have to _again_ require the script, as the Worker ctor incorrectly
// only allows ".js" (which attempts to run as a /module/, because of `type: module`) or
// ".mjs" extensions (which is always a module).
// This will probably be fixed in a future Node. Sounds like a bug.
const code = `require(${JSON.stringify(workerTarget)});`;
w = new worker.Worker(code, {workerData: {dep}, eval: true});
}
++activeWorkers;

@@ -66,0 +71,0 @@ } else {

{
"name": "async-transforms",
"version": "1.0.2",
"version": "1.0.3",
"description": "Asynchronous stream transforms",

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

Sorry, the diff of this file is not supported yet

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