commits
This reverts commit 071101e34c790a3ef9589eb78b814f151ee5ebbb.
Since these are side-effects that may be used
to reinsert more signals into the source chain,
through subjects for instance, they need to
protect themselves from dangerous signal loops.
* Fix synchronous make Close signal
* Continue allowing Pull/Close/Push on inner mergeMap sources
* Continue allowing Pull/Close/Push on switchMap's inner source
* Continue allowing Pull/Close/Push on concatMap's inner source
* Fix missing Pull in mergeMap and add merge source test
* Implement alternative passesSourcePushThenEnd suite
This is for eager operators that send an additional
Pull signal when they're not expecting one to come
in from the sink. All {merge,switch,concat}Map operators
need to pass this instead of passSourceEnd.
* Add active pulling to sample
sample needs to also actively send Pull signals as
it may not forward any that will cause Pull signals.
* Add active pulling to buffer
* Add active pulling to takeUntil
* Ensure merge sources are instantiated first
Ensure that all merge sources are eagerly pulled
and started without hanging and waiting for the
first source.
Before `merge` and `mergeMap` would behave like
`concat` and `concatMap` when the first source
wouldn't push or end.
* Fix timing of eager pull in mergeMap
* Add test for interval source to merge source
* Revert change to make teardown
* Remove captureTalkback from filter operator
* Remove captureTalkback from skip operator
* Remove captureTalkback from skipWhile operator
* Refactor takeLast, add tests, and remove captureTalkback
* Delete captureTalkback helper
Delay does not have to pass `passesStrictEnd`,
since it's idempotent.
* Remove strict end test from map operator
The map operator doesn't need to guard
against signals after End since it's a
safe and repeatable effect.
* Remove strict end guard from onEnd operator
The onEnd operator does run a side-effect, but
it can rely on the convention of no signals being
emitted after End/Close.
* Add Close guards to all sources
Since we now assume that sources behave
well and operators don't have to guard
Close events, unless they're dealing with
multiple sources and side-effects, the
sources can be amended instead.
* Rename gotSignal to pulled in skipUntil
* Fix pulling behaviour of skipUntil
* Close source when notifier will never emit
When the notifier ends before it emits any value
it's safe to close the source as it can never emit
any values anymore.
* Fix active pushing
Pull from notifier source on start so it has a chance
to send a value before the source pushes its first value.
* Fix switchMap pulling for cold sources
The pulling behaviour wouldn't take cold sources
into account, which could lead to values being accepted
in the incorrect order.
* Fix passesActivePush for switchMap
* Fix mergeMap pulling for cold sources
* Fix state.ended being set for Close in mergeMap
* Fix concatMap pulling for cold sources
* Remove redundant state.closed from concatMap
* Fix passesPassivePull for buffer operator
* Fix passesSinkClose and passesStrictEnd for buffer operator
* Fix passesActivePush and passesSourceEnd for buffer operator
When two sources are passed two combine of which
one is hot (actively sends Push signals without Pull
talkback signals) and one is cold (only sends Push
signals with Pull talkback signals) the combine
operator stalls.
It will receive a value from the hot source, but
wait for the cold source's value forever.
To prevent this, when no Pull talkback signal has
been received, one is sent to the other (presumably cold)
source proactively.
* Fix debounce emitting End after Close
Since there was no difference between "ended"
and "closed" in the debounce operator, after
the timeout completed it would emit an End
event even if the source has been closed.
* Add test for debounced End
This fixes the delay operator by removing an unnecessary
End event being sent when Close is received.
It also fixes a potential duplicate End signal and renames
`gotEndSignal` to `ended`.
* Fix take operator with max <= 0
* Fix passesSinkClose for take operator
The take operator needs to keep track of ended
actively to avoid confusion with the state.taken
number and the max <= 0 case.
* Add !state.ended condition to take's Push signal
* Fix takeWhile emitting two Start signals
* Remove ref usage from takeWhile
* Upgrade dependencies
* Upgrade to bs-platform 7.0.2-dev.1
* Add gentype
* Switch to genType TypeScript codegen
* Migrate all operators to genType
* Migrate all sinks to genType
* Migrate sources to genType
* Migrate web to genType
* Delete obsolete .d.ts signature files
* Clean up main folder structure
* Add new main src/wonka.ts entrypoint
* Combine all separate granular files
* Remove fromListener
* Add missing shims
* Move include folder to src
* Convert pipe helper to pipe.ts with overloads
* Fix build output
* Update flow typegeneration
* Fix missing Js.shim.ts types
* Refactor tasks
* Add unwrapStatePlugin to optimise size
Unwraps all `let state` usages across all
operators, since internally this will not
change any functionality while optimising for
output size.
* Unwrap refs using unwrapStatePlugin
Also unwrap all ref types which are output
as objects of the shape: { contents: T }
* Fix forEach types not being generated
* Add full clean script
* Simplify pipe overload typings
* Add initial operator spec tests
* Add test for delay/debounce/throttle using fake timers
* Add additional initial unit tests to all operators
* Collect coverage from non-generated / non-helpers files
* Add spec test for single Start signal
Verify that each operator only sends a single
Start event
* Add spec test for closing operators End/Close
Verify that closing operators send the Close
talkback signal upwards and the End signal
downwards.
* Add sync tests for mergeMap, switchMap & concatMap
* Add stricter ending criteria
Check that Close and End aren't duplicated
* Add test for strict end
Some operators stop forwarding signals when the
source has ended. This is not strictly necessary,
but this test may highlight some other edge cases
and bugs, but it may also become necessary for
sources that aren't well behaved.
* Add additional async sequence test
* Add tests for combine operator
* Add asynchronous tests for switchMap, mergeMap & concatMap
* Add initial tests for Wonka sources
* Add more sources to tests
* Ignore wonka.bs.js/wonka.ts in coverage report
* Add source tests for cold Pull waiting
* Revert changes to Wonka_observable implementation
* Add tests for fromObservable
* Fix genType codegen for Callbags
* Add tests for fromCallbag
* Add tests for cancellation of sources
* Replace publish with subscribe with noop fn
* Add tests for Wonka sinks
* Update package.json and README.md
* Fix coverage and add test for publish
* Remove obsolete TODO comments
* Replace Sail CI with Travis
* Replace babel-jest with custom script
* Test makeSubject after complete has been called
* Add missing tests for interval and fromDomEvent
* Remove obsolete .jest.coverage.json
* Add old TypeScript types for various opaque genTypes
Add old definitions for talkbackT, signalT, observableSubscriptionT,
observableObserverT, observableT, and callbagT.
This will provide more backwards compatibility.
* Update .travis.yml command for codecov
* Add Closure Compiler to compilation
* Unwrap state generated by BuckleScript
* Add initial toArray sink implementation
* Add tests for toArray source
* Modify toArray to match subscribe behaviour
* Close non-synchronous sources in toArray
* Add additional toArray test for async sources
* Add docs for toArray sink
* Refactor makeTrampoline and use it for fromArray and fromList
* Update README
* Add docs for fromObservable
* Add docs for fromCallbag
* Add docs for toCallbag and toObservable
* Add docs for buffer
* Add docs for concatAll
* Add docs for mergeAll and mergeMap
* Add docs for share
* Add docs for switchMap and switchAll
* Fix filename of interval source
* Add docs for interval
* Reformat code snippets in operators doc
* Add docs for debounce and throttle
* Move sample operator out of web
The sample operator doesn't use Web-specific APIs
and can hence be moved to be a generic operator.
* Add docs for sample
* Add notes on interoperability to Getting Started
* Add initial buffer implementation
* Add tests for buffer operator
* Implement fromObservable operator
* Add toObservable and refactor
* Rename symbol to observableSymbol
* Support Observables without Symbol.observable
* Add fromCallbag and toCallbag
* Support synchronous observables
* Add tests for fromObservable and fromCallbag
* Fix Observable.symbol creation and toObservable
* Fix method usage on Symbol.observable
`this` was not respected since the method was separated
from the input observable.
* Add tests for toObservable and toCallbag
* Revert changes to fromObservable
* Add introduction content
* Add "Getting Started" page
* Add initial basics section
* Add index content for Basics
* Fix comment syntax in architecture
* Add publish and forEach to sinks doc
* Add toPromise to sinks doc
* Add fromPromise to sources doc
* Apply suggestions and rewrite some sections
Co-authored-by: Parker Ziegler <parkerziegler@users.noreply.github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)
Signed-off-by: dependabot[bot] <support@github.com>
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)
Signed-off-by: dependabot[bot] <support@github.com>
* Initial API documentation.
* Add gatsby and gatsby-theme-docs-system and split api.md
* Setting up site for Netlify
* Fix code blocks and blockquotes (0.1.5)
* Add fromList, fromValue, and make
* Fix some mobile styling and markdown redirects (0.1.8)
* Add makeSubject, empty, and never
* Add API index links
* Adjust breakpoints and code block mobile layout
* Add more docs on Wonka operators.
* Add docs on onPush.
* Better docs for onEnd, onPush, onStart to demonstrate async streams. Add docs on skip.
* skipUntil and skipWhile.
* Layout fixes and sidebar links (0.2.0)
Add basic tests cases for toPromise.
* Fix synchronous make Close signal
* Continue allowing Pull/Close/Push on inner mergeMap sources
* Continue allowing Pull/Close/Push on switchMap's inner source
* Continue allowing Pull/Close/Push on concatMap's inner source
* Fix missing Pull in mergeMap and add merge source test
* Implement alternative passesSourcePushThenEnd suite
This is for eager operators that send an additional
Pull signal when they're not expecting one to come
in from the sink. All {merge,switch,concat}Map operators
need to pass this instead of passSourceEnd.
* Add active pulling to sample
sample needs to also actively send Pull signals as
it may not forward any that will cause Pull signals.
* Add active pulling to buffer
* Add active pulling to takeUntil
* Ensure merge sources are instantiated first
Ensure that all merge sources are eagerly pulled
and started without hanging and waiting for the
first source.
Before `merge` and `mergeMap` would behave like
`concat` and `concatMap` when the first source
wouldn't push or end.
* Fix timing of eager pull in mergeMap
* Add test for interval source to merge source
* Revert change to make teardown
* Remove strict end test from map operator
The map operator doesn't need to guard
against signals after End since it's a
safe and repeatable effect.
* Remove strict end guard from onEnd operator
The onEnd operator does run a side-effect, but
it can rely on the convention of no signals being
emitted after End/Close.
* Add Close guards to all sources
Since we now assume that sources behave
well and operators don't have to guard
Close events, unless they're dealing with
multiple sources and side-effects, the
sources can be amended instead.
* Rename gotSignal to pulled in skipUntil
* Fix pulling behaviour of skipUntil
* Close source when notifier will never emit
When the notifier ends before it emits any value
it's safe to close the source as it can never emit
any values anymore.
* Fix active pushing
Pull from notifier source on start so it has a chance
to send a value before the source pushes its first value.
* Fix switchMap pulling for cold sources
The pulling behaviour wouldn't take cold sources
into account, which could lead to values being accepted
in the incorrect order.
* Fix passesActivePush for switchMap
* Fix mergeMap pulling for cold sources
* Fix state.ended being set for Close in mergeMap
* Fix concatMap pulling for cold sources
* Remove redundant state.closed from concatMap
When two sources are passed two combine of which
one is hot (actively sends Push signals without Pull
talkback signals) and one is cold (only sends Push
signals with Pull talkback signals) the combine
operator stalls.
It will receive a value from the hot source, but
wait for the cold source's value forever.
To prevent this, when no Pull talkback signal has
been received, one is sent to the other (presumably cold)
source proactively.
* Upgrade dependencies
* Upgrade to bs-platform 7.0.2-dev.1
* Add gentype
* Switch to genType TypeScript codegen
* Migrate all operators to genType
* Migrate all sinks to genType
* Migrate sources to genType
* Migrate web to genType
* Delete obsolete .d.ts signature files
* Clean up main folder structure
* Add new main src/wonka.ts entrypoint
* Combine all separate granular files
* Remove fromListener
* Add missing shims
* Move include folder to src
* Convert pipe helper to pipe.ts with overloads
* Fix build output
* Update flow typegeneration
* Fix missing Js.shim.ts types
* Refactor tasks
* Add unwrapStatePlugin to optimise size
Unwraps all `let state` usages across all
operators, since internally this will not
change any functionality while optimising for
output size.
* Unwrap refs using unwrapStatePlugin
Also unwrap all ref types which are output
as objects of the shape: { contents: T }
* Fix forEach types not being generated
* Add full clean script
* Simplify pipe overload typings
* Add initial operator spec tests
* Add test for delay/debounce/throttle using fake timers
* Add additional initial unit tests to all operators
* Collect coverage from non-generated / non-helpers files
* Add spec test for single Start signal
Verify that each operator only sends a single
Start event
* Add spec test for closing operators End/Close
Verify that closing operators send the Close
talkback signal upwards and the End signal
downwards.
* Add sync tests for mergeMap, switchMap & concatMap
* Add stricter ending criteria
Check that Close and End aren't duplicated
* Add test for strict end
Some operators stop forwarding signals when the
source has ended. This is not strictly necessary,
but this test may highlight some other edge cases
and bugs, but it may also become necessary for
sources that aren't well behaved.
* Add additional async sequence test
* Add tests for combine operator
* Add asynchronous tests for switchMap, mergeMap & concatMap
* Add initial tests for Wonka sources
* Add more sources to tests
* Ignore wonka.bs.js/wonka.ts in coverage report
* Add source tests for cold Pull waiting
* Revert changes to Wonka_observable implementation
* Add tests for fromObservable
* Fix genType codegen for Callbags
* Add tests for fromCallbag
* Add tests for cancellation of sources
* Replace publish with subscribe with noop fn
* Add tests for Wonka sinks
* Update package.json and README.md
* Fix coverage and add test for publish
* Remove obsolete TODO comments
* Replace Sail CI with Travis
* Replace babel-jest with custom script
* Test makeSubject after complete has been called
* Add missing tests for interval and fromDomEvent
* Remove obsolete .jest.coverage.json
* Add old TypeScript types for various opaque genTypes
Add old definitions for talkbackT, signalT, observableSubscriptionT,
observableObserverT, observableT, and callbagT.
This will provide more backwards compatibility.
* Update .travis.yml command for codecov
* Add initial toArray sink implementation
* Add tests for toArray source
* Modify toArray to match subscribe behaviour
* Close non-synchronous sources in toArray
* Add additional toArray test for async sources
* Add docs for toArray sink
* Refactor makeTrampoline and use it for fromArray and fromList
* Update README
* Add docs for fromObservable
* Add docs for fromCallbag
* Add docs for toCallbag and toObservable
* Add docs for buffer
* Add docs for concatAll
* Add docs for mergeAll and mergeMap
* Add docs for share
* Add docs for switchMap and switchAll
* Fix filename of interval source
* Add docs for interval
* Reformat code snippets in operators doc
* Add docs for debounce and throttle
* Move sample operator out of web
The sample operator doesn't use Web-specific APIs
and can hence be moved to be a generic operator.
* Add docs for sample
* Add notes on interoperability to Getting Started
* Implement fromObservable operator
* Add toObservable and refactor
* Rename symbol to observableSymbol
* Support Observables without Symbol.observable
* Add fromCallbag and toCallbag
* Support synchronous observables
* Add tests for fromObservable and fromCallbag
* Fix Observable.symbol creation and toObservable
* Fix method usage on Symbol.observable
`this` was not respected since the method was separated
from the input observable.
* Add tests for toObservable and toCallbag
* Revert changes to fromObservable
* Add introduction content
* Add "Getting Started" page
* Add initial basics section
* Add index content for Basics
* Fix comment syntax in architecture
* Add publish and forEach to sinks doc
* Add toPromise to sinks doc
* Add fromPromise to sources doc
* Apply suggestions and rewrite some sections
Co-authored-by: Parker Ziegler <parkerziegler@users.noreply.github.com>
* Initial API documentation.
* Add gatsby and gatsby-theme-docs-system and split api.md
* Setting up site for Netlify
* Fix code blocks and blockquotes (0.1.5)
* Add fromList, fromValue, and make
* Fix some mobile styling and markdown redirects (0.1.8)
* Add makeSubject, empty, and never
* Add API index links
* Adjust breakpoints and code block mobile layout
* Add more docs on Wonka operators.
* Add docs on onPush.
* Better docs for onEnd, onPush, onStart to demonstrate async streams. Add docs on skip.
* skipUntil and skipWhile.
* Layout fixes and sidebar links (0.2.0)