Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: medikoo/deferred
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.2
Choose a base ref
...
head repository: medikoo/deferred
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 4,899 additions and 3,041 deletions.
  1. +15 −0 .editorconfig
  2. +2 −0 .github/FUNDING.yml
  3. +1 −3 .gitignore
  4. +0 −111 .lint
  5. +2 −0 .testignore
  6. +0 −11 .travis.yml
  7. +41 −0 CHANGELOG.md
  8. +80 −0 CHANGES
  9. +0 −19 LICENCE
  10. +15 −0 LICENSE
  11. +0 −9 Makefile
  12. +391 −264 README.md
  13. +121 −0 _ext.js
  14. +27 −0 appveyor.yml
  15. +45 −0 assimilate.js
  16. +1 −0 benchmark/.eslintrc.json
  17. +395 −193 benchmark/concurrent.js
  18. +434 −186 benchmark/one-after-another.js
  19. +195 −0 deferred.js
  20. +54 −0 dynamic-queue.js
  21. +1 −0 examples/.eslintrc.json
  22. +41 −0 examples/gather-paginated-search-results.js
  23. +131 −0 examples/process-directory-of-html-files.js
  24. +60 −0 examples/test-with-mocha-and-should.js
  25. +23 −0 examples/while-loop.js
  26. +33 −0 ext/_process-arguments.js
  27. +5 −0 ext/array/every.js
  28. +98 −0 ext/array/find.js
  29. +86 −0 ext/array/map.js
  30. +151 −0 ext/array/reduce.js
  31. +5 −0 ext/array/some.js
  32. +61 −0 ext/function/call-async.js
  33. +40 −0 ext/function/delay.js
  34. +89 −0 ext/function/gate.js
  35. +52 −0 ext/function/promisify-sync.js
  36. +18 −0 ext/function/promisify.js
  37. +43 −0 ext/promise/_array.js
  38. +44 −0 ext/promise/aside.js
  39. +65 −0 ext/promise/catch.js
  40. +61 −0 ext/promise/cb.js
  41. +26 −0 ext/promise/finally.js
  42. +47 −0 ext/promise/get.js
  43. +130 −0 ext/promise/invoke-async.js
  44. +107 −0 ext/promise/invoke.js
  45. +2 −2 {lib → }/ext/promise/map.js
  46. +2 −2 {lib → }/ext/promise/reduce.js
  47. +2 −2 {lib → }/ext/promise/some.js
  48. +72 −0 ext/promise/spread.js
  49. +36 −0 ext/promise/timeout.js
  50. +43 −0 index.js
  51. +15 −0 invoke-async.js
  52. +9 −0 is-promise.js
  53. +0 −124 lib/_ext.js
  54. +0 −174 lib/deferred.js
  55. +0 −32 lib/ext/_process-arguments.js
  56. +0 −94 lib/ext/array/map.js
  57. +0 −123 lib/ext/array/reduce.js
  58. +0 −96 lib/ext/array/some.js
  59. +0 −29 lib/ext/function/delay.js
  60. +0 −87 lib/ext/function/gate.js
  61. +0 −54 lib/ext/function/promisify-sync.js
  62. +0 −65 lib/ext/function/promisify.js
  63. +0 −42 lib/ext/promise/_array.js
  64. +0 −38 lib/ext/promise/aside.js
  65. +0 −66 lib/ext/promise/cb.js
  66. +0 −49 lib/ext/promise/get.js
  67. +0 −122 lib/ext/promise/invoke-async.js
  68. +0 −100 lib/ext/promise/invoke.js
  69. +0 −77 lib/ext/promise/match.js
  70. +0 −31 lib/index.js
  71. +0 −7 lib/is-promise.js
  72. +0 −40 lib/monitor.js
  73. +125 −0 lib/some-every.js
  74. +0 −10 lib/valid-promise.js
  75. +39 −0 monitor.js
  76. +81 −40 package.json
  77. +30 −23 {lib → }/profiler.js
  78. +4 −0 test/.eslintrc.json
  79. +40 −50 test/_ext.js
  80. +45 −0 test/assimilate.js
  81. +39 −44 test/deferred.js
  82. +63 −0 test/dynamic-queue.js
  83. +14 −21 test/ext/_process-arguments.js
  84. +74 −0 test/ext/array/every.js
  85. +74 −0 test/ext/array/find.js
  86. +42 −51 test/ext/array/map.js
  87. +131 −150 test/ext/array/reduce.js
  88. +33 −16 test/ext/array/some.js
  89. +66 −0 test/ext/function/call-async.js
  90. +7 −7 test/ext/function/delay.js
  91. +39 −34 test/ext/function/gate.js
  92. +9 −13 test/ext/function/promisify-sync.js
  93. +23 −50 test/ext/function/promisify.js
  94. +38 −21 test/ext/promise/_array.js
  95. +12 −8 test/ext/promise/aside.js
  96. +26 −0 test/ext/promise/catch.js
  97. +14 −13 test/ext/promise/cb.js
  98. +41 −0 test/ext/promise/finally.js
  99. +8 −15 test/ext/promise/get.js
  100. +33 −55 test/ext/promise/invoke-async.js
  101. +30 −42 test/ext/promise/invoke.js
  102. +7 −7 test/ext/promise/map.js
  103. +0 −31 test/ext/promise/match.js
  104. +7 −7 test/ext/promise/reduce.js
  105. +11 −11 test/ext/promise/some.js
  106. +33 −0 test/ext/promise/spread.js
  107. +19 −0 test/ext/promise/timeout.js
  108. +62 −57 test/index.js
  109. +66 −0 test/invoke-async.js
  110. +2 −2 test/is-promise.js
  111. +75 −0 test/lib/some-every.js
  112. +4 −3 test/monitor.js
  113. +3 −3 test/profiler.js
  114. +3 −5 test/valid-promise.js
  115. +10 −0 valid-promise.js
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
trim_trailing_whitespace = true

[{*.md,*.yml}]
indent_size = 2
indent_style = space
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: medikoo
tidelift: "npm/deferred"
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.DS_Store
/node_modules
/.lintcache
/npm-debug.log
/package-lock.json
111 changes: 0 additions & 111 deletions .lint

This file was deleted.

2 changes: 2 additions & 0 deletions .testignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/benchmark
/examples
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.7.11](https://github.com/medikoo/deferred/compare/v0.7.10...v0.7.11) (2019-06-14)

<a name="0.7.10"></a>

## [0.7.10](https://github.com/medikoo/deferred/compare/v0.7.9...v0.7.10) (2018-12-27)

### Bug Fixes

- promise.map on pending then rejected ([e7cfc02](https://github.com/medikoo/deferred/commit/e7cfc02))

<a name="0.7.9"></a>

## [0.7.9](https://github.com/medikoo/deferred/compare/v0.7.8...v0.7.9) (2017-12-13)

### Features

- `timeout` promise extension ([cbdc9fd](https://github.com/medikoo/deferred/commit/cbdc9fd))

<a name="0.7.8"></a>

## [0.7.8](https://github.com/medikoo/deferred/compare/v0.7.7...v0.7.8) (2017-05-25)

### Bug Fixes

- **gate:** resolution of rejected promise ([f6fe524](https://github.com/medikoo/deferred/commit/f6fe524))

<a name="0.7.7"></a>

## [0.7.7](https://github.com/medikoo/deferred/compare/v0.7.6...v0.7.7) (2017-05-24)

### Features

- improve gate error format ([ad4d71b](https://github.com/medikoo/deferred/commit/ad4d71b))

## Old Changelog

Can be found at `CHANGES`
80 changes: 80 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
New changes are described in CHANGELOG.md

v0.7.6 -- 2017.03.15
* Fix errors in documentation
* Prevent stack trace related range errors

v0.7.5 -- 2016.01.28
* Fix few stack trace overflow vulnerabilities
* Improve delay arguments handling. `timeout` is now optional
if not provided then `nextTick` is used
otherwise proper validation of input value takes place.

v0.7.4 -- 2015.11.18
* `every` extension
* `dynamicQueue` util

v0.7.3 -- 2015.09.10
* `find` extension (Array's find for promises)
* Fix spelling of LICENSE

v0.7.2 -- 2015.01.07
* Force assimilation of pre v0.7 deferred promises.
Using them as own raised serious bugs
* Configure lint scripts in package.json

v0.7.1 -- 2014.04.27
* Update internals to use latest versions of dependencies

v0.7.0 -- 2014.04.04
Major (breaking) changes:
* Fix error handling:
Up to v0.6.x promise could have been rejected only with error instance, and
same way they couldn't be successfully resolved with an error instance. It was
not an issue if we followed good practices, still it didn't match `throw`
behavior (any JavaScript value can be thrown). Starting from v0.7 promise can
be rejected and resolved with any kind of value. It's also how promises behave
in other implementations including upcoming ECMAScript 6 standard.
* Assimilate foreign promises. Promises from other implemantations (including
native promises) are detected and assimilated for recursive resolution.
Addresses issue #29
* Rename `promise.match` to `promise.spread`, this is the name under which this
functionality was popularized in other libraries.
* Remove `end`, as it was replaced by `done` in v0.6.4 (`end` was kept as an
alias to not break current programs)
* Move modules from `lib` to root folder

Other changes:
* Expose `resolve` and `reject` functions on deferred. It complies to
`Promise.resolve` and `Promise.reject`
* Remove Makefile (it's cross-environment package)
* Fix handling of promise arguments in promisifySync

v0.6.8 -- 2013.12.27
* Function version of `invokeAsync` utility (further addresses #26)

v0.6.7 -- 2013.12.27
* `callAsync` utility, to promisify asynchronous functions inline in algorithm.
Fixes #26

v0.6.6 -- 2013.10.14
* Fix stack overflow vulnerability in `reduce` implementation, as diagnosed
here: https://github.com/cujojs/promise-perf-tests/blob
/e58b90c2660914411c96efe854446444160b592a/lib/tests/reduce-large.js#L25
* Introduce `examples` directory. First examples introduced by
Marc-Aurèle DARCHE (@madarche). Thanks!
* Improve benchmarks, and add kew and bluebird to them (and remove jQuery)
* Documentation: Fix profiler example and general improvements

v0.6.5 -- 2013.06.05
* `catch` extension
* Unify listeners handling in promises handled by gate
* Improve documentation

v0.6.4 -- 2013.05.15
* Rename `done` to `end` and leave `end` as an alias for `done`.
With v0.7 release `end` alias will be removed.

v0.6.3 -- 2013.03.21
* promise.finally extension

v0.6.2 -- 2013.03.18
* Provide deferred.reject to allow configuration of v0.7 safe working flows
* Do not require whole event-emitter but just needed modules
19 changes: 0 additions & 19 deletions LICENCE

This file was deleted.

15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2011-2019, Mariusz Nowak, @medikoo, medikoo.com

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
9 changes: 0 additions & 9 deletions Makefile

This file was deleted.

Loading