@promistream/simple-queue 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -33,7 +33,9 @@ module.exports = function createSimpleQueue(_initialItems, _options) {
33
33
  }
34
34
 
35
35
  let stream = simpleSource(() => {
36
- if (isEnded === false && buffer.countLane().values > 0) {
36
+ let valuesInBuffer = buffer.countLane().values + buffer.countInFlight();
37
+
38
+ if (isEnded === false && valuesInBuffer > 0) {
37
39
  debug(`values available; requesting one`);
38
40
  return buffer.request();
39
41
  } else if (autoEnd === false) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@promistream/simple-queue",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "index.js",
5
5
  "repository": "http://git.cryto.net/promistream/simple-queue.git",
6
6
  "author": "Sven Slootweg <admin@cryto.net>",
7
7
  "license": "WTFPL OR CC0-1.0",
8
8
  "dependencies": {
9
9
  "@promistream/aborted": "^0.1.2",
10
- "@promistream/end-of-stream": "^0.1.0",
10
+ "@promistream/end-of-stream": "^0.1.2",
11
11
  "@validatem/anything": "^0.1.0",
12
12
  "@validatem/array-of": "^0.1.3",
13
13
  "@validatem/core": "^0.6.0",
@@ -17,11 +17,11 @@
17
17
  "debug-instanced": "^1.0.0",
18
18
  "error-chain": "^0.1.3",
19
19
  "match-value": "^1.1.0",
20
- "push-buffer": "^1.0.0"
20
+ "push-buffer": "^1.5.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@promistream/collect": "^0.1.1",
24
- "@promistream/parallelize": "^0.1.3",
23
+ "@promistream/collect": "^0.1.2",
24
+ "@promistream/parallelize": "^0.1.6",
25
25
  "@promistream/pipe": "^0.1.6",
26
26
  "@promistream/spy": "^0.1.0",
27
27
  "bluebird": "^3.7.2"