chore: build
This commit is contained in:
+7
@@ -1,5 +1,12 @@
|
||||
# wonka
|
||||
|
||||
## 6.3.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Replace for...in with for...of Object.keys() to avoid iterating inherited properties
|
||||
Submitted by [@majgaard](https://github.com/majgaard) (See [#177](https://github.com/0no-co/wonka/pull/177))
|
||||
|
||||
## 6.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+20
-17
@@ -371,7 +371,7 @@ function fromAsyncIterable(e) {
|
||||
}
|
||||
|
||||
function fromIterable(e) {
|
||||
if (e[Symbol.asyncIterator]) {
|
||||
if (e[asyncIteratorSymbol()]) {
|
||||
return fromAsyncIterable(e);
|
||||
}
|
||||
return r => {
|
||||
@@ -483,25 +483,28 @@ function zip(r) {
|
||||
var l = !1;
|
||||
var o = !1;
|
||||
var u = 0;
|
||||
var loop = function(v) {
|
||||
r[v]((c => {
|
||||
if (0 === c) {
|
||||
var v = Object.keys(r);
|
||||
var loop = function() {
|
||||
var h = p[c];
|
||||
r[h]((r => {
|
||||
if (0 === r) {
|
||||
if (u >= t - 1) {
|
||||
o = !0;
|
||||
i(0);
|
||||
} else {
|
||||
u++;
|
||||
}
|
||||
} else if (0 === c.tag) {
|
||||
a[v] = c[0];
|
||||
} else if (0 === r.tag) {
|
||||
a[h] = r[0];
|
||||
} else if (!o) {
|
||||
f[v] = c[0];
|
||||
s.add(v);
|
||||
f[h] = r[0];
|
||||
s.add(h);
|
||||
if (!n && s.size < t) {
|
||||
if (!l) {
|
||||
for (var p in r) {
|
||||
if (!s.has(p)) {
|
||||
(a[p] || e)(0);
|
||||
for (var c = 0, p = v; c < p.length; c += 1) {
|
||||
var g = p[c];
|
||||
if (!s.has(g)) {
|
||||
(a[g] || e)(0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -517,19 +520,19 @@ function zip(r) {
|
||||
}
|
||||
}));
|
||||
};
|
||||
for (var v in r) {
|
||||
loop(v);
|
||||
for (var c = 0, p = v; c < p.length; c += 1) {
|
||||
loop();
|
||||
}
|
||||
i(start((e => {
|
||||
if (o) {} else if (1 === e) {
|
||||
o = !0;
|
||||
for (var r in a) {
|
||||
a[r](1);
|
||||
for (var r = 0, t = Object.keys(a); r < t.length; r += 1) {
|
||||
a[t[r]](1);
|
||||
}
|
||||
} else if (!l) {
|
||||
l = !0;
|
||||
for (var t in a) {
|
||||
a[t](0);
|
||||
for (var i = 0, s = Object.keys(a); i < s.length; i += 1) {
|
||||
a[s[i]](0);
|
||||
}
|
||||
}
|
||||
})));
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"wonka.js","sources":[],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
+20
-17
@@ -902,7 +902,7 @@ function fromAsyncIterable(e) {
|
||||
}
|
||||
|
||||
function fromIterable(e) {
|
||||
if (e[Symbol.asyncIterator]) {
|
||||
if (e[asyncIteratorSymbol()]) {
|
||||
return fromAsyncIterable(e);
|
||||
}
|
||||
return r => {
|
||||
@@ -1198,25 +1198,28 @@ function zip(r) {
|
||||
var l = !1;
|
||||
var u = !1;
|
||||
var o = 0;
|
||||
var loop = function(v) {
|
||||
r[v]((c => {
|
||||
if (0 === c) {
|
||||
var v = Object.keys(r);
|
||||
var loop = function() {
|
||||
var g = h[c];
|
||||
r[g]((r => {
|
||||
if (0 === r) {
|
||||
if (o >= t - 1) {
|
||||
u = !0;
|
||||
i(0);
|
||||
} else {
|
||||
o++;
|
||||
}
|
||||
} else if (0 === c.tag) {
|
||||
f[v] = c[0];
|
||||
} else if (0 === r.tag) {
|
||||
f[g] = r[0];
|
||||
} else if (!u) {
|
||||
n[v] = c[0];
|
||||
a.add(v);
|
||||
n[g] = r[0];
|
||||
a.add(g);
|
||||
if (!s && a.size < t) {
|
||||
if (!l) {
|
||||
for (var h in r) {
|
||||
if (!a.has(h)) {
|
||||
(f[h] || e)(0);
|
||||
for (var c = 0, h = v; c < h.length; c += 1) {
|
||||
var m = h[c];
|
||||
if (!a.has(m)) {
|
||||
(f[m] || e)(0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1232,19 +1235,19 @@ function zip(r) {
|
||||
}
|
||||
}));
|
||||
};
|
||||
for (var v in r) {
|
||||
loop(v);
|
||||
for (var c = 0, h = v; c < h.length; c += 1) {
|
||||
loop();
|
||||
}
|
||||
i(start((e => {
|
||||
if (u) {} else if (1 === e) {
|
||||
u = !0;
|
||||
for (var r in f) {
|
||||
f[r](1);
|
||||
for (var r = 0, t = Object.keys(f); r < t.length; r += 1) {
|
||||
f[t[r]](1);
|
||||
}
|
||||
} else if (!l) {
|
||||
l = !0;
|
||||
for (var t in f) {
|
||||
f[t](0);
|
||||
for (var i = 0, a = Object.keys(f); i < a.length; i += 1) {
|
||||
f[a[i]](0);
|
||||
}
|
||||
}
|
||||
})));
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"wonka.mjs","sources":[],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
{
|
||||
"name": "wonka",
|
||||
"description": "A tiny but capable push & pull stream library for TypeScript and Flow",
|
||||
"version": "6.3.5",
|
||||
"version": "6.3.6",
|
||||
"author": "0no.co <hi@0no.co>",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/wonka",
|
||||
@@ -64,7 +64,7 @@
|
||||
"provenance": true
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.1",
|
||||
"@changesets/cli": "^2.29.6",
|
||||
"@changesets/get-github-info": "^0.6.0",
|
||||
"@rollup/plugin-buble": "^1.0.1",
|
||||
"@rollup/plugin-commonjs": "^23.0.3",
|
||||
|
||||
+5
-4
@@ -61,7 +61,8 @@ function zip<T>(sources: Source<T>[] | Record<string, Source<T>>): Source<T[] |
|
||||
let ended = false;
|
||||
let endCount = 0;
|
||||
|
||||
for (const key in sources) {
|
||||
const keys = Object.keys(sources);
|
||||
for (const key of keys) {
|
||||
(sources[key] as Source<T>)(signal => {
|
||||
if (signal === SignalKind.End) {
|
||||
if (endCount >= size - 1) {
|
||||
@@ -77,7 +78,7 @@ function zip<T>(sources: Source<T>[] | Record<string, Source<T>>): Source<T[] |
|
||||
filled.add(key);
|
||||
if (!gotBuffer && filled.size < size) {
|
||||
if (!gotSignal) {
|
||||
for (const key in sources)
|
||||
for (const key of keys)
|
||||
if (!filled.has(key)) (talkbacks[key] || talkbackPlaceholder)(TalkbackKind.Pull);
|
||||
} else {
|
||||
gotSignal = false;
|
||||
@@ -96,10 +97,10 @@ function zip<T>(sources: Source<T>[] | Record<string, Source<T>>): Source<T[] |
|
||||
/*noop*/
|
||||
} else if (signal === TalkbackKind.Close) {
|
||||
ended = true;
|
||||
for (const key in talkbacks) talkbacks[key](TalkbackKind.Close);
|
||||
for (const key of Object.keys(talkbacks)) talkbacks[key](TalkbackKind.Close);
|
||||
} else if (!gotSignal) {
|
||||
gotSignal = true;
|
||||
for (const key in talkbacks) talkbacks[key](TalkbackKind.Pull);
|
||||
for (const key of Object.keys(talkbacks)) talkbacks[key](TalkbackKind.Pull);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ export function fromAsyncIterable<T>(iterable: AsyncIterable<T> | AsyncIterator<
|
||||
* for the JS Iterable protocol.
|
||||
*/
|
||||
export function fromIterable<T>(iterable: Iterable<T> | AsyncIterable<T>): Source<T> {
|
||||
if (iterable[Symbol.asyncIterator]) return fromAsyncIterable(iterable as AsyncIterable<T>);
|
||||
if (iterable[asyncIteratorSymbol()]) return fromAsyncIterable(iterable as AsyncIterable<T>);
|
||||
return sink => {
|
||||
const iterator = iterable[Symbol.iterator]();
|
||||
let ended = false;
|
||||
|
||||
Reference in New Issue
Block a user