RxJs esm for non-node (#2961)
This commit is contained in:
@@ -33,6 +33,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/websocket": "^1.0.1",
|
||||
"@types/yargs": "^15.0.11"
|
||||
"@types/yargs": "^15.0.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
# @polkadot/x-rxjs
|
||||
|
||||
This is a small wrapper around rjx to make it friendly to both Node.js (from .mjs as well as .cjs) as well as bundlers using both esm and cjs modules.
|
||||
|
||||
This need wil disappear, once rxjs supports export maps.
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
//
|
||||
// Generated via s/export \{ (.*) \} from .*/exports.$1 = rxjs.$1;/ on rxjs/_esm
|
||||
|
||||
// This is or our builder
|
||||
// @polkadot/dev: exports-node
|
||||
|
||||
const rxjs = require('rxjs');
|
||||
|
||||
exports.Observable = rxjs.Observable;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2020 @polkadot/x-rxjs authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { animationFrame, animationFrameScheduler, ArgumentOutOfRangeError, asap, asapScheduler, async, asyncScheduler, AsyncSubject, BehaviorSubject, bindCallback, bindNodeCallback, combineLatest, concat, config, ConnectableObservable, defer, EMPTY, empty, EmptyError, forkJoin, from, fromEvent, fromEventPattern, generate, GroupedObservable, identity, iif, interval, isObservable, merge, NEVER, never, noop, Notification, NotificationKind, ObjectUnsubscribedError, Observable, observable, of, onErrorResumeNext, pairs, partition, pipe, queue, queueScheduler, race, range, ReplaySubject, scheduled, Scheduler, Subject, Subscriber, Subscription, throwError, TimeoutError, timer, UnsubscriptionError, using, VirtualAction, VirtualTimeScheduler, zip } from 'rxjs/_esm5/index.js';
|
||||
@@ -6,6 +6,9 @@
|
||||
//
|
||||
// Generated via s/export \{ (.*) \} from .*/exports.$1 = rxjs.$1;/ on rxjs/_esm
|
||||
|
||||
// This is or our builder, to add the correct exports entry
|
||||
// @polkadot/dev: exports-node
|
||||
|
||||
const operators = require('rxjs/operators');
|
||||
|
||||
exports.audit = operators.audit;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2020 @polkadot/x-rxjs authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { audit, auditTime, buffer, bufferCount, bufferTime, bufferToggle, bufferWhen, catchError, combineAll, combineLatest, concat, concatAll, concatMap, concatMapTo, count, debounce, debounceTime, defaultIfEmpty, delay, delayWhen, dematerialize, distinct, distinctUntilChanged, distinctUntilKeyChanged, elementAt, endWith, every, exhaust, exhaustMap, expand, filter, finalize, find, findIndex, first, flatMap, groupBy, ignoreElements, isEmpty, last, map, mapTo, materialize, max, merge, mergeAll, mergeMap, mergeMapTo, mergeScan, min, multicast, observeOn, onErrorResumeNext, pairwise, partition, pluck, publish, publishBehavior, publishLast, publishReplay, race, reduce, refCount, repeat, repeatWhen, retry, retryWhen, sample, sampleTime, scan, sequenceEqual, share, shareReplay, single, skip, skipLast, skipUntil, skipWhile, startWith, subscribeOn, switchAll, switchMap, switchMapTo, take, takeLast, takeUntil, takeWhile, tap, throttle, throttleTime, throwIfEmpty, timeInterval, timeout, timeoutWith, timestamp, toArray, window, windowCount, windowTime, windowToggle, windowWhen, withLatestFrom, zip, zipAll } from 'rxjs/_esm5/operators/index.js';
|
||||
Reference in New Issue
Block a user