Comparing version
{ | ||
"name": "fibers", | ||
"version": "2.0.2", | ||
"version": "3.0.0", | ||
"description": "Cooperative multi-tasking for Javascript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
fibers(1) -- Fiber support for v8 and Node | ||
========================================== | ||
[](https://www.npmjs.com/package/fibers) [](https://github.com/laverdet/node-fibers/blob/master/LICENSE) [](https://travis-ci.org/laverdet/node-fibers) [](https://www.npmjs.com/package/fibers) | ||
[](https://www.npmjs.com/package/fibers) | ||
[](https://github.com/laverdet/node-fibers/blob/master/LICENSE) | ||
[](https://travis-ci.org/laverdet/node-fibers) | ||
[](https://www.npmjs.com/package/fibers) | ||
@@ -39,14 +42,13 @@ Fibers, sometimes called [coroutines](https://en.wikipedia.org/wiki/Coroutine), are a powerful tool which expose an API to jump between multiple call stacks from within a single thread. This can be useful to make code written for a synchronous library play nicely in an asynchronous environment. | ||
### supported platforms | ||
If you are running NodeJS version 4.x, 5.x, or 6.x on Linux, OS X, or Windows | ||
(7 or later) then you should be able to install fibers from npm just fine. If | ||
you are running an older (or newer) version of node or some other operating | ||
system you will have to compile fibers on your system. | ||
If you are running nodejs version 8.x or 10.x on Linux, OS X, or Windows (7 or later) then you | ||
should be able to install fibers from npm just fine. If you are running nodejs v6.x then you will | ||
need to use `npm install fibers@2`. For nodejs v4.x you can use `npm install fibers@1`. If you are | ||
running an older (or newer) version of node or some other operating system you will have to compile | ||
fibers on your system. | ||
(special thanks to [Jeroen Janssen](https://github.com/japj) for his work on | ||
fibers in Windows) | ||
(special thanks to [Jeroen Janssen](https://github.com/japj) for his work on fibers in Windows) | ||
If you do end up needing to compile fibers first make sure you have node-gyp | ||
installed as a global dependency (`npm install -g node-gyp`), and that you have | ||
setup your build enviroment by following the instructions at | ||
[node-gyp](https://github.com/TooTallNate/node-gyp). Ubuntu-flavored Linux users | ||
If you do end up needing to compile fibers first make sure you have node-gyp installed as a global | ||
dependency (`npm install -g node-gyp`), and that you have setup your build environment by following | ||
the instructions at [node-gyp](https://github.com/TooTallNate/node-gyp). Ubuntu-flavored Linux users | ||
may need to run `sudo apt-get install g++` as well. | ||
@@ -53,0 +55,0 @@ |
@@ -14,3 +14,5 @@ #!/usr/bin/env node | ||
var args = []; | ||
if (process.versions.modules >= 57) { | ||
if (process.versions.modules >= 57 && process.versions.modules < 59) { | ||
// Node v8 requires forcing async hook checks. In Node v9 (>=59) and beyond, | ||
// async hooks checks are on by default (and the param no longer exists). | ||
args.push('--force-async-hooks-checks'); | ||
@@ -17,0 +19,0 @@ } |
@@ -16,5 +16,11 @@ 'use strict'; | ||
run(cb) { | ||
this.emitBefore(); | ||
cb(); | ||
this.emitAfter(); | ||
// In the v8 API, only emitBefore() and emitAfter() are available | ||
if (process.versions.modules < 59) { | ||
this.emitBefore(); | ||
cb(); | ||
this.emitAfter(); | ||
} else { | ||
// In v9 and higher, emitBefore() and emitAfter() are deperecated in favor of runInAsyncScope(). | ||
this.runInAsyncScope(cb); | ||
} | ||
} | ||
@@ -21,0 +27,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
1465735
5.58%1066
0.76%599
0.34%15
-11.76%49
-3.92%