improve tamper resistence of Promise.allPromise.race and Promise.prototype.then (note, this isn't complete, but addresses an exception when used \w core-js, follow up work will address entirely)
improve performance of Promise.all when it encounters a non-promise input object input
改进 Promise.all 接受非 Promise 对象输入时的性能
then/resolve tamper protection
保护 then/resolve 方法不被篡改
reduce AST size of promise constructor, to facilitate more inlining
减少 Promise 构造器的 AST 的体积,使之更易于内联
Update README.md with details about PhantomJS requirement for running tests
在 README.md 中添加关于运行测试所需的 PhantomJS 的信息
Mangle and compress the minified version
通过压缩和混淆来生成压缩版文件
3.0.1
no longer include dist/test in npm releases
在 npm 包中不再包含 dist/test 文件夹。
3.0.0
use nextTick() instead of setImmediate() to schedule microtasks with node 0.10. Later versions of nodes are not affected as they were already using nextTick(). Note that using nextTick() might trigger a depreciation warning on 0.10 as described at https://github.com/cujojs/when/issues/410. The reason why nextTick() is preferred is that is setImmediate() would schedule a macrotask instead of a microtask and might result in a different scheduling. If needed you can revert to the former behavior as follow:
在 Node 0.10 中使用
nextTick()
代替setImmediate()
来调度微任务(macrotask)。更高版本的 Node 不受影响,因为它们已经在用nextTick()
了。请注意使用nextTick()
可能会在 Node 0.10 中触发一个弃用警告,详情参见 https://github.com/cujojs/when/issues/410 。换用nextTick()
的原因在于setImmediate()
会调度宏微任务而不是微任务,可能导致不一样的调度结果。如有必要,你可以通过以下代码来恢复以前的行为:2.3.0
2.2.0
asap()
and a way to override the scheduling mechanism on Promiseasap()
接口,允许覆盖 Promise 的调度机制2.1.1
2.1.0
(译注:作者偷懒了,没有写变更记录,但其实这里有个坑:从这个版本开始,脚本加载时就会自动打上补丁,不需要手动调用
.polyfill()
方法了。这属于行为变更,只升次版本号也是醉了。)2.0.0
1.0.0