Skip to content

Commit

Permalink
Upgrade to BuckleScript v7 with genType based TS codegen (#44)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kitten authored Jan 7, 2020
1 parent 362c1fe commit 7db1de1
Show file tree
Hide file tree
Showing 165 changed files with 6,435 additions and 6,469 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ yarn-error.log
dist/
node_modules/
lib/
src/**/*.js
src/**/*.bs.js
src/**/*.gen.tsx
src/**/*.gen.ts
src/**/*.js.flow
include/**/*.js
__tests__/**/*.js
coverage/
_esy/
public/

!src/index.js
!src/pipe.js
8 changes: 0 additions & 8 deletions .jest.coverage.json

This file was deleted.

55 changes: 0 additions & 55 deletions .sail.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
notifications:
email: false

branches:
only:
- master
- develop
- /^v\d+\.\d+\.\d+/

language: node_js
cache:
yarn: true
node_js:
- '10'

matrix:
fast_finish: true

install:
- yarn install --frozen-lockfile --non-interactive

script:
- yarn run build
- yarn run check
- yarn run test --coverage
- yarn run codecov --branch $TRAVIS_PULL_REQUEST_BRANCH
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

A fast push & pull stream library for Reason, loosely following the [callbag spec](https://github.com/callbag/callbag)

> **NOTE:** The `master` branch currently points to the v4 Release Candidate version!
> If you're looking for v3, [please check the `v3.2.2`](https://github.com/kitten/wonka/tree/v3.2.2)
<br>
<a href="https://npmjs.com/package/wonka">
<img alt="NPM Version" src="https://img.shields.io/npm/v/wonka.svg" />
Expand Down
Loading

0 comments on commit 7db1de1

Please sign in to comment.