Mailspring/packages
Juan Tejada 3554fb2510 [client-app] Fix passing cursor to delta streams
Summary:
Currently, when we auth an account for the first time in Nylas Mail (or
we blow away the database), the app is going to request transactions
since cursor `null` from the /delta/streaming endpoint and from the local-sync
delta observable, instead of requesting transactions since cursor `0`

This is due to a subtle bug with the use of default values when
destructuring an object. Our coded did the following:
```
const {cursor = 0} = this._state
```
Which at a glance seems correct. However, this will only work as
expected if `this._state` has the following shape:
```
{cursor: undefined}
```
And unfortunately, our `this._state` looked like this when authing an
account for the first time:
```
{cursor: null}
```

Which would make `cursor === null` instead of `0`.
This is because when using default values, null is considered an
intentional argument/value, as opposed to not passing any argument/value
(which will mean that the argument is undefined).

This was a regression introduced in d60a23c and 8bc2ec5

Test Plan: manual, will add regression test in upcoming diff

Reviewers: evan, spang, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4243
2017-03-20 16:16:46 -07:00
..
client-app [client-app] Fix passing cursor to delta streams 2017-03-20 16:16:46 -07:00
client-sync [client-app] Fix passing cursor to delta streams 2017-03-20 16:16:46 -07:00
isomorphic-core [cloud-api] Fix query for delta stream transactions 2017-03-20 15:39:24 -07:00
README.md [*] Rename postinstall.js -> postinstall.es6 2017-02-21 15:55:08 -08:00

Monorepo Packages

Each folder here is designed to act as its own repository. For development convenience, they are all included here in one monorepo. This allows us to grep across multiple codebases, not use submodules, and keep a unified commit history.

We use Lerna to manage the monorepo and tie them all together with the main nylas-mail-all/scripts/postinstall.es6 script, which in turn, calls lerna bootstrap