Socket
Socket
Sign inDemoInstall

fibers

Package Overview
Dependencies
Maintainers
0
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fibers - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

25

fibers.js

@@ -1,2 +0,2 @@

var fs = require('fs');
var fs = require('fs'), path = require('path');

@@ -21,1 +21,24 @@ if (fs.statSync(process.execPath).mtime >

require('./src/fibers');
// Shim child_process.spawn to shim any spawned Node instances
var fibersRoot = path.dirname(require.resolve('./src/fibers'));
var cp = require('child_process');
cp.spawn = function(spawn) {
return function(command, args, options) {
if (command === process.execPath) {
options = Object.create(options || {});
options.env = Object.create(options.env || {});
options.env.FIBER_SHIM = '1';
if (process.platform === 'linux2') {
options.env.LD_PRELOAD = fibersRoot + '/coroutine.so';
} else if (process.platform === 'darwin') {
options.env.DYLD_INSERT_LIBRARIES = fibersRoot + '/coroutine.dylib';
options.env.DYLD_FORCE_FLAT_NAMESPACE = '1';
options.env.DYLD_LIBRARY_PATH = fibersRoot;
} else {
throw new Error('Unknown platform!');
}
}
return spawn(command, args, options);
};
}(cp.spawn);

2

package.json
{
"name": "fibers",
"version": "0.2.4",
"version": "0.2.5",
"description": "Cooperative multi-tasking for Javascript; or, the closest thing to a thread you'll see in node",

@@ -5,0 +5,0 @@ "keywords": ["fiber", "fibers", "coroutine", "thread", "async", "parallel", "worker"],

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