Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ReactiveX/rxjs into windo…
Browse files Browse the repository at this point in the history
…w-time-with-max-size
  • Loading branch information
mpodlasin committed Jan 31, 2017
2 parents 1c9f746 + a77821b commit 4c5ab7e
Show file tree
Hide file tree
Showing 109 changed files with 1,798 additions and 954 deletions.
2 changes: 0 additions & 2 deletions .lgtm

This file was deleted.

39 changes: 17 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
language: node_js
sudo: false
node_js:
- '4.2.2'
- '6'

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
sauce_connect:
# Update SAUCE_USERNAME / SAUCE_ACCESS_KEY in travis if necessary
# https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
sauce_connect: true
sauce_connect:
# Update SAUCE_USERNAME / SAUCE_ACCESS_KEY in travis if necessary
# https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
sauce_connect: true

cache:
directories:
- node_modules

env:
global:
- CXX=g++-4.8
- alias grunt=./node_modules/grunt-cli/bin/grunt
matrix:
- NODE_VER=4 FULL_VALIDATE=false
- NODE_VER=6 FULL_VALIDATE=true alias grunt=./node_modules/grunt-cli/bin/grunt
- NODE_VER=7 FULL_VALIDATE=false
matrix:
fast_finish: true

before_install:
- npm install -g npm@3 && npm install [email protected] grunt-cli grunt-contrib-connect grunt-run
- nvm install $NODE_VER
- npm install -g npm@4 && node -v && npm -v
- if [ "$FULL_VALIDATE" == "true" ]; then npm install [email protected] grunt-cli grunt-contrib-connect grunt-run; fi

install:
- npm install && npm run lint
- npm install
- if [ "$FULL_VALIDATE" == "true" ]; then npm run lint && npm run check_circular_dependencies; fi

script:
- npm run build_spec && npm run test_mocha && node ./node_modules/markdown-doctest/bin/cmd.js
- npm run check_circular_dependencies

after_success:
- npm run cover
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ -n "${SAUCE_ACCESS_KEY}" ] && npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js || false'
- if [ "$FULL_VALIDATE" == "true" ]; then npm run cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi
- if [ "$FULL_VALIDATE" == "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$SAUCE_ACCESS_KEY" ]; then npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js; fi
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
<a name="5.0.3"></a>
## [5.0.3](https://github.com/ReactiveX/RxJS/compare/5.0.2...v5.0.3) (2017-01-05)


### Bug Fixes

* **observeOn:** seal memory leak involving old notifications ([9664a38](https://github.com/ReactiveX/RxJS/commit/9664a38)), closes [#2244](https://github.com/ReactiveX/RxJS/issues/2244)
* **Subscription:** `add` will return Subscription that `remove`s itself when unsubscribed ([375d4a5](https://github.com/ReactiveX/RxJS/commit/375d4a5))
* **TypeScript:** interfaces that accepted `Scheduler` now accept `IScheduler` interface ([a0d28a8](https://github.com/ReactiveX/RxJS/commit/a0d28a8))



<a name="5.0.2"></a>
## [5.0.2](https://github.com/ReactiveX/RxJS/compare/5.0.1...v5.0.2) (2016-12-23)


### Bug Fixes

* **ajax:** upload progress is now set correctly ([#2200](https://github.com/ReactiveX/RxJS/issues/2200)) ([1a83041](https://github.com/ReactiveX/RxJS/commit/1a83041))
* **groupBy:** Fix groupBy to dispose of outer subscription. ([#2201](https://github.com/ReactiveX/RxJS/issues/2201)) ([2269618](https://github.com/ReactiveX/RxJS/commit/2269618))



<a name="5.0.1"></a>
## [5.0.1](https://github.com/ReactiveX/RxJS/compare/5.0.0...v5.0.1) (2016-12-13)


### Bug Fixes

* **TypeScript:** pin to TypeScript 2.0.x, fix errors with Error subclassing ([300504c](https://github.com/ReactiveX/RxJS/commit/300504c))



<a name="5.0.0"></a>
# [5.0.0](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.5...v5.0.0) (2016-12-13)


### Bug Fixes

* **race:** unsubscribe raced observables with immediate scheduler ([#2158](https://github.com/ReactiveX/RxJS/issues/2158)) ([7dd533b](https://github.com/ReactiveX/RxJS/commit/7dd533b))
* **SubscribeOnObservable:** Add the source subscription to the action disposable so the source will ([64e3815](https://github.com/ReactiveX/RxJS/commit/64e3815))



<a name="5.0.0-rc.5"></a>
# [5.0.0-rc.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.4...v5.0.0-rc.5) (2016-12-07)

Expand Down
127 changes: 78 additions & 49 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,68 +53,88 @@ enabling "composite" subscription behavior.
|RxJS 4|RxJS 5|
|---|---|
|`amb`|`race`|
|`and`|No longer implemented|
|`asObservable`|Exists on `Subject` only|
|`average`|No longer implemented|
|`bufferWithCount`|`bufferCount`|
|`bufferWithTime`|`bufferTime`|
|`flatMap` or `selectMany`|`mergeMap` or `flatMap`(alias)|
|`concat`|`concat`|
|`concatAll`|`concatAll`|
|`concatMap`|`concatMap`|
|`concatMapObserver`|No longer implemented|
|`controlled`|No longer implemented|
|`delaySubscription`|No longer implemented|
|`do`|`do`|
|`doAction`|`do`|
|`doOnCompleted`|`do(null, null, fn)`|
|`doOnError`|`do(null, fn)`|
|`doOnNext`|`do(fn)`|
|`doWhile`|No longer implemented|
|`extend`|No longer implemented|
|`flatMapFirst`|`exhaustMap`|
|`flatMapLatest`|`switchMap`|
|`flatMapWithMaxConcurrent`|`mergeMap` or `flatMap`(alias)|
|`flatMap`|`mergeMap` or `flatMap`(alias)|
|`fromCallback`|`bindCallback`|
|`fromNodeCallback`|`bindNodeCallback`|
|`groupByUntil`|`groupBy(keySelector, elementSelector, durationSelector)`|
|`groupJoin`|No longer implemented|
|`includes(v)`|`.first(x => x === v, () => true, false)`|
|`indexOf(v)`|`.map((x, i) => [x === v, i]).filter(([x]) => x).map(([_, i]) => i).first()`|
|`join`|No longer implemented|
|`jortSortUntil`|No longer implemented|
|`jortSort`|No longer implemented|
|`just(v)` or `just(a, b, c)`|`of(v)`, `of(a, b, c)`|
|`lastIndexOf`|`.map((x, i) => [x === v, i]).filter(([x]) => x).map(([_, i]) => i).last()`|
|`manySelect`|No longer implemented|
|`map(fn)`|`map(fn)`|
|`map(value)`|`mapTo(value)`|
|`maxBy(fn)`|`scan((s, v, i) => { let max = Math.max(s.max, fn(v, i)); return { max, value: max === s.max ? s.value : v }; }, { max: null, value: undefined }).last(x => x.max !== null, x => x.value)`|
|`minBy(fn)`|`scan((s, v, i) => { let min = Math.min(s.min, fn(v, i)); return { min, value: min === s.min ? s.value : v }; }, { min: null, value: undefined }).last(x => x.min !== null, x => x.value)`|
|`of`|`of`|
|`ofObjectChanges`|No longer implemented|
|`pausableBuffered`|No longer implemented|
|`pausable`|No longer implemented|
|`pluck`|`pluck`|
|`publishLast`|`publishLast`|
|`publishValue`|`publishBehavior`|
|`replay`|`publishReplay`|
|`return` or `just`|`of`|
|`select`|`map`|
|`return`|`of`|
|`selectConcatObserver`|No longer implemented|
|`selectConcat`|`concatMap`|
|`selectMany(fn)`|`mergeMap(fn)` or `flatMap(fn)` (alias)|
|`selectMany(observable)`|`mergeMapTo(observable)`|
|`selectManyObserver` or `flatMapObserver`|No longer implemented|
|`select`|`map`|
|`shareReplay`|`publishReplay().refCount()`|
|`shareValue`|No longer implemented|
|`singleInstance`|`share`|
|`skipLastWithTime`|No longer implemented|
|`skipLast`|No longer implemented|
|`skipUntilWithTime`|No longer implemented|
|`slice(start, end)`|`skip(start).take(end - start)`|
|`some`|`first(fn, () => true, false)`|
|`sum`|`reduce((s, v) => s + v, 0)`|
|`switchFirst`|`exhaust`|
|`takeLast`|`takeLast`|
|`takeLastBufferWithTime`|No longer implemented|
|`takeLastBuffer`|No longer implemented|
|`takeLastWithTime`|No longer implemented|
|`takeUntilWithTime`|No longer implemented|
|`tapOnCompleted(fn)`|`do(null, null, fn)`|
|`tapOnError(fn)`|`do(null, fn)`|
|`tapOnNext(fn)`|`do(fn)`|
|`tap`|`do`|
|`windowWithTime`|`windowTime`|
|`windowWithCount`|`windowCount`|
|`timestamp`|`map(v => ({ value: v, timestamp: Date.now() }))`|
|`toMap(keySelector)`|`reduce((map, v, i) => map.set(keySelector(v, i), v), new Map())`|
|`toMap(keySelector, elmentSelector)`|`reduce((map, v, i) => map.set(keySelector(v, i), elementSelector(v)), new Map())`|
|`toSet`|`reduce((set, v) => set.add(v))`|
|`transduce`|No longer implemented|
|`where`|`filter`|
|`and`|Not yet implemented|
|`asObservable`|Not yet implemented|
|`average`|Not yet implemented|
|`controlled`|Not yet implemented|
|`delaySubscription`|Not yet implemented|
|`doWhile`|Not yet implemented|
|`extend`|Not yet implemented|
|`groupByUntil`|Not yet implemented|
|`groupJoin`|Not yet implemented|
|`includes`|Not yet implemented|
|`indexOf`|Not yet implemented|
|`join`|Not yet implemented|
|`jortSort`|Not yet implemented|
|`jortSortUntil`|Not yet implemented|
|`lastIndexOf`|Not yet implemented|
|`manySelect`|Not yet implemented|
|`maxBy`|Not yet implemented|
|`minBy`|Not yet implemented|
|`ofObjectChanges`|Not yet implemented|
|`pausable`|Not yet implemented|
|`pausableBuffered`|Not yet implemented|
|`shareReplay`|Not yet implemented|
|`shareValue`|Not yet implemented|
|`selectConcatObserver` or `concatMapObserver`|Not yet implemented|
|`selectManyObserver` or `flatMapObserver`|Not yet implemented|
|`singleInstance`|Not yet implemented|
|`skipLast`|Not yet implemented|
|`skipLastWithTime`|Not yet implemented|
|`skipUntilWithTime`|Not yet implemented|
|`slice`|Not yet implemented|
|`some`|Not yet implemented|
|`sum`|Not yet implemented|
|`takeLastBuffer`|Not yet implemented|
|`takeLastBufferWithTime`|Not yet implemented|
|`takeLastWithTime`|Not yet implemented|
|`takeUntilWithTime`|Not yet implemented|
|`tapOnNext`|`do`|
|`tapOnError`|`do`|
|`tapOnCompleted`|`do`|
|`timestamp`|Not yet implemented|
|`toMap`|Not yet implemented|
|`toSet`|Not yet implemented|
|`transduce`|Not yet implemented|
|`windowWithTimeOrCount`|Not yet implemented|
|`windowWithCount`|`windowCount`|
|`windowWithTimeOrCount`|No longer implemented|
|`windowWithTime`|`windowTime`|
|`zip`|`zip`|

## Operator Splits

Expand Down Expand Up @@ -223,6 +243,15 @@ To reduce polymorphism and get better performance out of operators, some operato
<td><code>timeout(dueTime: number | Date, other?: Observable | Promise, scheduler?: Scheduler)</code></td>
<td><code>timeoutWith(due: number | Date, withObservable: ObservableInput, scheduler: Scheduler)</code></td>
</tr>
<tr>
<td rowspan="2"><code>sample</code></td>
<td><code>sample(interval: number, scheduler?: Scheduler)</code></td>
<td><code>sampleTime(interval: number, scheduler?: Scheduler)</code></td>
</tr>
<tr>
<td><code>sample(notifier: Observable)</code></td>
<td><code>sample(notifier: Observable)</code></td>
</tr>
</tbody>
</table>

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[![Selenium Test Status](https://saucelabs.com/browser-matrix/rxjs5.svg)](https://saucelabs.com/u/rxjs5)

# RxJS 5 (release candidate)
# RxJS 5

Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is intended to supersede it once this is ready. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.

Expand All @@ -18,6 +18,13 @@ Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Exten
- [Migrating From RxJS 4 to RxJS 5](MIGRATION.md)
- [API Documentation (WIP)](http://reactivex.io/rxjs)

## Versions In This Repository

- [master](https://github.com/ReactiveX/rxjs/commits/master) - commits that will be included in the next _minor_ or _patch_ release
- [next](https://github.com/ReactiveX/rxjs/commits/next) - commits that will be included in the next _major_ release (breaking changes)

Most PRs should be made to **master**, unless you know it is a breaking change.

## Important

By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
Expand Down Expand Up @@ -108,21 +115,14 @@ npm install @reactivex/rxjs
If you are using npm **version 2** before this library has achieved a stable version, you need to specify the library version explicitly:

```sh
npm install @reactivex/[email protected]-rc.1
npm install @reactivex/[email protected]
```

### CDN

For CDN, you can use [unpkg](https://unpkg.com/):

5.0.0-beta.1 - 5.0.0-beta.11:

https://unpkg.com/@reactivex/rxjs/dist/global/Rx.umd.js


5.0.0-beta.12 or higher:

https://unpkg.com/@reactivex/rxjs/dist/global/Rx.js

https://unpkg.com/rxjs/bundles/Rx.min.js

#### Node.js Usage:

Expand Down
3 changes: 2 additions & 1 deletion doc/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ var lastClick = Date.now() - rate;
var button = document.querySelector('button');
button.addEventListener('click', (event) => {
if (Date.now() - lastClick >= rate) {
console.log(++count + event.clientX)
count += event.clientX;
console.log(count)
lastClick = Date.now();
}
});
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorial/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ class MyComponent extends ObservableComponent {
}
componentDidMount() {
this.messages = messages
// Let accumulate our messages in an array
// Accumulate our messages in an array
.scan((messages, message) => [message].concat(messages), [])
// And render whenever we get a new message
.forEach(messages => this.setState({messages: messages}));
.subscribe(messages => this.setState({messages: messages}));
}
componentWillUnmount() {
this.messages.unsubscribe();
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorial/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Which one you choose depends on the scenario. The normal **Observable** is great
## Controlling the flow
```js
// typing "hello world"
var input = Rx.Observable.fromEvent(document.querySelector('input'), 'keypress');
var input = Rx.Observable.fromEvent(document.querySelector('input'), 'input');

// Filter out target values less than 3 characters long
input.filter(event => event.target.value.length > 2)
Expand Down Expand Up @@ -79,7 +79,7 @@ input.takeUntil(stopStream)
## Producing values
```js
// typing "hello world"
var input = Rx.Observable.fromEvent(document.querySelector('input'), 'keypress');
var input = Rx.Observable.fromEvent(document.querySelector('input'), 'input');

// Pass on a new value
input.map(event => event.target.value)
Expand Down
Loading

0 comments on commit 4c5ab7e

Please sign in to comment.