Comparing version 2.2.0 to 2.3.0
var Promise = require('native-or-bluebird') | ||
var Promise = require('any-promise') | ||
var fs | ||
@@ -4,0 +4,0 @@ try { |
2.3.0 / 2016-01-30 | ||
================== | ||
* feat(package): switch to `any-promise` to support more promise engines | ||
2.2.0 / 2016-01-24 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "mz", | ||
"description": "modernize node.js to current ECMAScript standards", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"author": { | ||
@@ -14,10 +14,10 @@ "name": "Jonathan Ong", | ||
"dependencies": { | ||
"native-or-bluebird": "1", | ||
"any-promise": "0.2.0", | ||
"object-assign": "^4.0.1", | ||
"thenify-all": "1" | ||
"thenify-all": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"istanbul": "0", | ||
"bluebird": "2", | ||
"mocha": "2" | ||
"istanbul": "^0.4.0", | ||
"bluebird": "^3.0.0", | ||
"mocha": "^2.0.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "scripts": { |
var readline = require('readline') | ||
var Promise = require('native-or-bluebird') | ||
var Promise = require('any-promise') | ||
var objectAssign = require('object-assign') | ||
@@ -4,0 +4,0 @@ var Interface = readline.Interface |
@@ -33,11 +33,11 @@ | ||
Personally, I use this with generator-based control flow libraries such as [co](https://github.com/visionmedia/co) so I don't need to use implementation-specific wrappers like [co-fs](https://github.com/visionmedia/co-fs). | ||
With ES2017, this will allow you to use async functions cleanly with node's core API: | ||
```js | ||
var co = require('co') | ||
var fs = require('mz/fs') | ||
const fs = require('mz/fs') | ||
co(function* () { | ||
if (yield fs.exists(__filename)) // do something | ||
})() | ||
async function doSomething () { | ||
if (await fs.exists(__filename)) // do something | ||
} | ||
``` | ||
@@ -68,12 +68,4 @@ | ||
If you've installed [bluebird][bluebird], | ||
[bluebird][bluebird] will be used. | ||
`mz` does not install [bluebird][bluebird] for you. | ||
`mz` uses [`any-promise`](https://github.com/kevinbeaty/any-promise). | ||
Otherwise, if you're using a node that has native v8 Promises (v0.11.13+), | ||
then that will be used. | ||
Otherwise, this library will crash the process and exit, | ||
so you might as well install [bluebird][bluebird] as a dependency! | ||
## FAQ | ||
@@ -84,3 +76,4 @@ | ||
Yes, Node 4.x ships with stable promises support. For older engines, | ||
you should probably install [bluebird][bluebird]. | ||
you should probably install your own promise implementation and register it with | ||
`require('any-promise/register')('bluebird')`. | ||
@@ -98,2 +91,3 @@ ### Will this make my app faster? | ||
- New APIs in node.js that are not available in older versions of node | ||
- ECMAScript7 Streams | ||
@@ -100,0 +94,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2
9201
107
+ Addedany-promise@0.2.0
+ Addedany-promise@0.2.0(transitive)
- Removednative-or-bluebird@1
- Removednative-or-bluebird@1.2.0(transitive)
Updatedthenify-all@^1.0.0