Skip to content

Commit

Permalink
refactor(rstream): update imports (transducers)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 20, 2021
1 parent 6de47ec commit 7fc60cd
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 47 deletions.
2 changes: 1 addition & 1 deletion packages/rstream-dot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Stream } from "@thi.ng/rstream/stream";
import { StreamMerge } from "@thi.ng/rstream/stream-merge";
import { StreamSync } from "@thi.ng/rstream/stream-sync";
import { truncate } from "@thi.ng/strings/truncate";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import type { DotOpts, Node, NodeType, WalkState } from "./api";

export * from "./api";
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-gestures/src/gesture-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { clamp } from "@thi.ng/math/interval";
import type { Stream } from "@thi.ng/rstream";
import { fromDOMEvent } from "@thi.ng/rstream/from/event";
import { merge } from "@thi.ng/rstream/stream-merge";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import type {
GestureEvent,
GestureInfo,
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-graph/src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { fromIterableSync } from "@thi.ng/rstream/from/iterable";
import { fromViewUnsafe } from "@thi.ng/rstream/from/view";
import { StreamSync, sync } from "@thi.ng/rstream/stream-sync";
import type { Transducer } from "@thi.ng/transducers";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import type {
Graph,
GraphSpec,
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-graph/src/nodes/extract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Path } from "@thi.ng/api";
import { getInUnsafe } from "@thi.ng/paths/get-in";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import type { NodeFactory } from "../api";
import { node1 } from "../graph";

Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-graph/src/nodes/math.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IObjectOf } from "@thi.ng/api";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import type { NodeFactory } from "../api";
import { node, node2 } from "../graph";

Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-log/src/xform/filter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { LogLevel } from "@thi.ng/api";
import { isString } from "@thi.ng/checks/is-string";
import type { Transducer } from "@thi.ng/transducers";
import { filter } from "@thi.ng/transducers/xform/filter";
import { filter } from "@thi.ng/transducers/filter";
import type { LogEntry } from "../api";

export const onlyLevel = (level: LogLevel): Transducer<LogEntry, LogEntry> =>
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-log/src/xform/format.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LogLevel } from "@thi.ng/api/api/logger";
import { stringify } from "@thi.ng/strings/stringify";
import type { Transducer } from "@thi.ng/transducers";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import type { BodyFormat, DateFormat, LogEntry, LogEntryObj } from "../api";

export const isoDate = (dt: number) => new Date(dt).toISOString();
Expand Down
6 changes: 3 additions & 3 deletions packages/rstream-query/src/convert.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { isArray } from "@thi.ng/checks/is-array";
import { isPlainObject } from "@thi.ng/checks/is-plain-object";
import { concat } from "@thi.ng/transducers/iter/concat";
import { pairs } from "@thi.ng/transducers/iter/pairs";
import { mapcat } from "@thi.ng/transducers/xform/mapcat";
import { concat } from "@thi.ng/transducers/concat";
import { mapcat } from "@thi.ng/transducers/mapcat";
import { pairs } from "@thi.ng/transducers/pairs";

let NEXT_ID = 0;

Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-query/src/pattern.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { repeatedly } from "@thi.ng/transducers/iter/repeatedly";
import { repeatedly } from "@thi.ng/transducers/repeatedly";
import type { PathPattern, Pattern } from "./api";
import { autoQVar, isQVar, qvarName } from "./qvar";

Expand Down
12 changes: 6 additions & 6 deletions packages/rstream-query/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { join } from "@thi.ng/associative/join";
import { equiv } from "@thi.ng/equiv";
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
import { min3id } from "@thi.ng/math/interval";
import type { Subscription } from "@thi.ng/rstream";
import { DotOpts, IToDot, toDot, walk } from "@thi.ng/rstream-dot";
import { CloseMode, ISubscription } from "@thi.ng/rstream/api";
import { Stream } from "@thi.ng/rstream/stream";
import { sync } from "@thi.ng/rstream/stream-sync";
import type { Subscription } from "@thi.ng/rstream";
import { nextID } from "@thi.ng/rstream/utils/idgen";
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { assocObj } from "@thi.ng/transducers/rfn/assoc-obj";
import { assocObj } from "@thi.ng/transducers/assoc-obj";
import { comp } from "@thi.ng/transducers/comp";
import { dedupe } from "@thi.ng/transducers/dedupe";
import { map } from "@thi.ng/transducers/map";
import { mapIndexed } from "@thi.ng/transducers/map-indexed";
import { transduce } from "@thi.ng/transducers/transduce";
import { dedupe } from "@thi.ng/transducers/xform/dedupe";
import { map } from "@thi.ng/transducers/xform/map";
import { mapIndexed } from "@thi.ng/transducers/xform/map-indexed";
import type {
Edit,
PathPattern,
Expand Down
10 changes: 5 additions & 5 deletions packages/rstream-query/src/xforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { join } from "@thi.ng/associative/join";
import { equiv } from "@thi.ng/equiv";
import { LOGGER } from "@thi.ng/rstream/api";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { compR } from "@thi.ng/transducers/func/compr";
import { keySelector } from "@thi.ng/transducers/func/key-selector";
import { dedupe } from "@thi.ng/transducers/xform/dedupe";
import { map } from "@thi.ng/transducers/xform/map";
import { comp } from "@thi.ng/transducers/comp";
import { compR } from "@thi.ng/transducers/compr";
import { dedupe } from "@thi.ng/transducers/dedupe";
import { keySelector } from "@thi.ng/transducers/key-selector";
import { map } from "@thi.ng/transducers/map";
import type { BindFn, Edit, Solutions, Triple, TripleIds } from "./api";
import type { TripleStore } from "./store";

Expand Down
14 changes: 6 additions & 8 deletions packages/rstream/src/forkjoin.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import type { Fn, Fn3 } from "@thi.ng/api";
import type { IObjectOf } from "@thi.ng/api";
import type { ArrayLikeIterable } from "@thi.ng/api";
import { comp } from "@thi.ng/transducers/func/comp";
import { range } from "@thi.ng/transducers/iter/range";
import { assocObj } from "@thi.ng/transducers/rfn/assoc-obj";
import type { ArrayLikeIterable, Fn, Fn3, IObjectOf } from "@thi.ng/api";
import { assocObj } from "@thi.ng/transducers/assoc-obj";
import { comp } from "@thi.ng/transducers/comp";
import { map } from "@thi.ng/transducers/map";
import { mapcat } from "@thi.ng/transducers/mapcat";
import { range } from "@thi.ng/transducers/range";
import { transduce } from "@thi.ng/transducers/transduce";
import { map } from "@thi.ng/transducers/xform/map";
import { mapcat } from "@thi.ng/transducers/xform/mapcat";
import type { CommonOpts, ISubscribable, ITransformable } from "./api";
import { sync } from "./stream-sync";
import { tunnel } from "./subs/tunnel";
Expand Down
5 changes: 2 additions & 3 deletions packages/rstream/src/from/object.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Keys } from "@thi.ng/api";
import type { Predicate2 } from "@thi.ng/api";
import { dedupe } from "@thi.ng/transducers/xform/dedupe";
import type { Keys, Predicate2 } from "@thi.ng/api";
import { dedupe } from "@thi.ng/transducers/dedupe";
import type { CommonOpts, SubscriptionOpts } from "../api";
import { Subscription, subscription } from "../subscription";
import { nextID } from "../utils/idgen";
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream/src/from/promises.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mapcat } from "@thi.ng/transducers/xform/mapcat";
import { mapcat } from "@thi.ng/transducers/mapcat";
import type { ISubscription, WithErrorHandlerOpts } from "../api";
import { optsWithID } from "../utils/idgen";
import { fromPromise } from "./promise";
Expand Down
12 changes: 5 additions & 7 deletions packages/rstream/src/stream-sync.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type { Derefed } from "@thi.ng/api";
import type { Always } from "@thi.ng/api";
import type { IObjectOf } from "@thi.ng/api";
import { comp } from "@thi.ng/transducers/func/comp";
import { labeled } from "@thi.ng/transducers/xform/labeled";
import { mapVals } from "@thi.ng/transducers/xform/map-vals";
import type { Always, Derefed, IObjectOf } from "@thi.ng/api";
import { comp } from "@thi.ng/transducers/comp";
import { labeled } from "@thi.ng/transducers/labeled";
import { mapVals } from "@thi.ng/transducers/map-vals";
import {
partitionSync,
PartitionSync,
} from "@thi.ng/transducers/xform/partition-sync";
} from "@thi.ng/transducers/partition-sync";
import { ISubscribable, ISubscription, LOGGER, TransformableOpts } from "./api";
import { Subscription } from "./subscription";
import { isFirstOrLastInput } from "./utils/checks";
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream/src/subs/sidechain-partition.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Predicate } from "@thi.ng/api";
import { peek } from "@thi.ng/arrays/peek";
import { map } from "@thi.ng/transducers/xform/map";
import { map } from "@thi.ng/transducers/map";
import { CommonOpts, ISubscribable, State } from "../api";
import { fromRAF } from "../from/raf";
import type { Subscription } from "../subscription";
Expand Down
6 changes: 3 additions & 3 deletions packages/rstream/src/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { peek } from "@thi.ng/arrays/peek";
import { isPlainObject } from "@thi.ng/checks/is-plain-object";
import { illegalState } from "@thi.ng/errors/illegal-state";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { comp } from "@thi.ng/transducers/comp";
import { map } from "@thi.ng/transducers/map";
import { push } from "@thi.ng/transducers/push";
import { isReduced, Reduced, unreduced } from "@thi.ng/transducers/reduced";
import { push } from "@thi.ng/transducers/rfn/push";
import { map } from "@thi.ng/transducers/xform/map";
import {
CloseMode,
CommonOpts,
Expand Down
4 changes: 2 additions & 2 deletions packages/rstream/src/tween.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Fn2 } from "@thi.ng/api";
import { isNumber } from "@thi.ng/checks/is-number";
import { dedupe } from "@thi.ng/transducers/dedupe";
import { reducer } from "@thi.ng/transducers/reduce";
import { dedupe } from "@thi.ng/transducers/xform/dedupe";
import { scan } from "@thi.ng/transducers/xform/scan";
import { scan } from "@thi.ng/transducers/scan";
import { CloseMode, ISubscribable } from "./api";
import { fromInterval } from "./from/interval";
import { fromRAF } from "./from/raf";
Expand Down

0 comments on commit 7fc60cd

Please sign in to comment.