Commit graph

422 commits

Author SHA1 Message Date
Evan Morikawa 556f4a6c6f Use babel-cli in devDependencies instead 2017-01-27 16:34:16 -05:00
Evan Morikawa 44e7e58b4f Add babel-node as a dev dependency 2017-01-27 16:26:35 -05:00
Juan Tejada f6b4cfdacb bump(version) 1.0.17 2017-01-27 12:51:49 -08:00
Evan Morikawa dfc09254e6 bump(version): 1.0.16 2017-01-27 10:11:27 -05:00
Juan Tejada 5a67198226 bump(version) 1.0.15 2017-01-25 16:47:04 -08:00
Evan Morikawa 14514a3413 fix(specs): change spec scheduler back to setTimeout
Summary:
Adds a new `npm run test-window` that will launch specs in a window so you
can use the debugger

The spec window wouldn't close because `onbeforeunload` was unnecessarily
preventing close. This circumvents this in spec mode.

Most significantly I discovered we can't use the synchronous timer for the
promise scheduler anymore. Suppose you do:

```
it('should error', async () => {
  try {
    await doSomething()
    throw new Error("doSomething should have thrown!")
  } catch (err) {
    expect(err.message).toMatch(/my message/)
  }
})
```

The way async/await is transpiled, when `doSomething` throws, the error
will propagate all the way back up to the uncaughtPromiseException handler
before the `catch` gets called and registered. The transpilation method
assumes that when the function gets executed it can synchrously advance
beyond the call before the `then` or `catch` resolve. When the promise
scheduler is synchronous this doesn't happen.

I chose to use `setTimeout` instead of `process.nextTick` or
`setImmediate` as the promise scheduler. `setTimeout` seems to work better
with Chrome's async function call stacks. `nextTick` and `setImmediate`,
being Node methods, skip Chrome's async watchers.

Test Plan:
I talked with Juan about these changes, in an upcoming diff he will be
testing these in the context of our broader test suite.

Reviewers: mark, khamidou, halla, spang, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3779
2017-01-25 17:43:11 -05:00
Juan Tejada be99845d41 bump(version) 1.0.14 2017-01-25 12:28:47 -08:00
Evan Morikawa 77bc501eb7 bump(spellcheck) upgrade to 1.0.0
Summary: This bumps the spellcheck and restores the specs

Test Plan:
Manually open a composer, type some text and ensure it underlines them as
misspelled. Also restore test coverage

Reviewers: mark, halla, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3776
2017-01-25 15:26:38 -05:00
Evan Morikawa 313bd18913 bump(version): 1.0.13 2017-01-25 10:20:52 -05:00
Juan Tejada 5ed1f4da9e 🎨 Fix to using imap-provider-settings package
Summary: see title

Test Plan: manual

Reviewers: spang, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3772
2017-01-24 16:25:03 -08:00
Evan Morikawa 2e7e8c2d01 fix(build): add output log interval to prevent travis from dying 2017-01-24 14:27:32 -05:00
Evan Morikawa 677b56f714 feat(build) add npm run local-ci 2017-01-24 14:09:17 -05:00
Evan Morikawa d96672ab57 bump(version): 1.0.12 2017-01-24 12:23:25 -05:00
Evan Morikawa 5fe0650058 bump(version): 1.0.11 2017-01-20 13:55:57 -08:00
Halla Moore 0bd7ecd740 bump(version) 2017-01-19 11:39:50 -08:00
Evan Morikawa fc3e891fe9 bump(version): 1.0.9 2017-01-17 16:33:16 -08:00
Evan Morikawa 0b700c424c bump(version): 1.0.8 2017-01-16 20:21:39 -08:00
Evan Morikawa 964cb3bd86 bump(version): 1.0.7 2017-01-16 18:36:16 -08:00
Evan Morikawa 238c986c46 bump(version): 1.0.6 2017-01-16 10:48:05 -08:00
Evan Morikawa d4e2f71f15 bump(version): 1.0.5 2017-01-15 17:53:47 -08:00
Evan Morikawa 0be3b91ff4 bump(version): 1.0.4 2017-01-15 15:23:27 -08:00
Evan Morikawa cd25918955 bump(version): 1.0.3 2017-01-14 17:51:39 -08:00
Evan Morikawa e5e01e2834 bump(version): 1.0.2 2017-01-13 19:31:43 -08:00
Evan Morikawa 3f15112b8d bump(version): 1.0.1 2017-01-13 19:03:22 -08:00
Karim Hamidou 4fd976167a Bump to version 1.0 2017-01-13 13:28:39 -08:00
Evan Morikawa 61f7a62c5a bump(version): 0.5.11 2017-01-13 12:20:07 -08:00
Evan Morikawa e7ac46d5b4 bump(version): 0.5.10 2017-01-12 12:09:53 -08:00
Jackie Luo 78a7388318 🎨(rename): Update Nylas N1 to Nylas Mail
Test Plan: Tested locally.

Reviewers: halla, juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3645
2017-01-12 12:05:44 -08:00
Jackie Luo 21049b2a1f Update Nylas N1 to Nylas Mail
Test Plan: Tested locally.

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D3644
2017-01-12 11:25:39 -08:00
Evan Morikawa 71c00776ff bump(version): 0.5.9 2017-01-10 18:25:30 -08:00
Michael Pfister a738d8a622 Add ability to debug with chrome dev tools in cloud-api 2017-01-10 17:31:51 -08:00
Juan Tejada d15272c3dc bump(version) 0.5.8 2017-01-10 15:31:05 -08:00
Juan Tejada ce9057cc8c bump(version) 0.5.7 2017-01-10 14:51:09 -08:00
Juan Tejada e6b4cd135a bump(electron) 2017-01-10 14:16:11 -08:00
Evan Morikawa 0c8c37d18d bump(version): 0.5.6 2017-01-10 12:15:22 -08:00
Evan Morikawa 0bcda05832 bump(version): 0.5.5 2017-01-09 15:20:40 -08:00
Juan Tejada aadb1182c0 [local-sync] Make the sync loop interruptible
Summary:
This commit introduces interruptible sync operations. Now, the `SyncWorker`, `FetchFolderList` operation and `FetchMessagesInFolder` operation can be interrupted at several p

To achieve this, this commit adds an Interruptible abstraction, which is an object that can run functions and interrupt them at points marked by the function. For more info o

This commit also splits up the SyncWorker a little bit to make it smaller, byadding a SyncbackTaskWorker.

Test Plan: manual

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3613
2017-01-09 14:42:57 -08:00
Evan Morikawa c0e2943c26 bump(version): 0.5.4 2017-01-09 09:46:31 -08:00
Evan Morikawa b8f126d45b bump(version): 0.5.3 2017-01-06 15:58:04 -08:00
Juan Tejada 1ad337d345 fix(deps) Correctly fix debug version 2017-01-04 10:33:37 -08:00
Juan Tejada 22e4327cb0 fix(deps) Fix debug to v2.4.5. See #3139 2017-01-03 17:36:47 -08:00
Evan Morikawa 0e36afa05e bump(version): 0.5.2 2017-01-03 09:32:59 -08:00
Evan Morikawa baa9d7d363 bump(version): 0.5.1 2016-12-22 09:36:07 -08:00
Evan Morikawa fd8949e9f2 bump(version): 0.5.0 2016-12-19 09:35:21 -08:00
Evan Morikawa f34a8f8f0a feat(babel): bump local babel and update K2 to use babel toolchain 2016-12-16 13:08:52 -05:00
Evan Morikawa 1d254a7aaa [*] Add basic babel toolchain
Summary:
Adds babel to K2
Creates a simple build script so it'll run on prod.

Test Plan: manual

Reviewers: jackie, halla, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3527
2016-12-16 13:08:21 -05:00
Evan Morikawa f7491d7e7b bump(bluebird): upgrade bluebird
Summary:
I upgraded bluebird because I thought there was some missing dependency
issue when I booted K2. It actually turned out that the issue was missing
`striptags` require in the K2 local-sync package json and had nothing to
do with Bluebird.

But since were here and about to QA I figured I might as well bump it
anyway. Especially since I'll need it later to better diagnose async
tests.

I carefully went through the 3.0 changelog and believe I fixed the
outstanding issues

Test Plan: manual

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3523
2016-12-15 17:33:37 -05:00
Evan Morikawa dd2acf4b74 bump(electron): to 1.4.12 from 1.4.5 2016-12-15 13:24:28 -05:00
Evan Morikawa 4c53247df1 [*] update lerna to 2.0.0-beta.30 2016-12-06 16:03:31 -08:00
Evan Morikawa aba77ca637 [cloud-api] add npm start for pm2 launch 2016-12-01 16:33:05 -05:00
Evan Morikawa ae42c37606 Add better-sqlite3 2016-11-23 10:18:47 -08:00
Ben Gotow 0aa11cf9d2 [cloud] fix(*): add things back to package.json 2016-11-22 14:54:40 -08:00
Evan Morikawa 3907c20271 Fix package.json 2016-11-22 14:47:18 -08:00
Karim Hamidou 372beeef52 More structure adapts.
Conflicts:
	packages/local-sync/package.json
2016-11-22 14:26:48 -08:00
Ben Gotow 291106694b Bump eslint 2016-11-22 11:58:34 -08:00
Ben Gotow 27ba2544dd Pull in cloud packages 2016-11-22 10:58:27 -08:00
Evan Morikawa b13aa32f60 fix(readme): minor readme changes 2016-11-21 18:18:21 -08:00
Ben Gotow d4b7f3ee15 bump(version): 0.4.400 2016-11-21 16:38:29 -08:00
Ben Gotow e87e67cea3 Fix linter issues 2016-11-21 14:00:35 -08:00
Juan Tejada ebfe24a648 bump(version): 0.4.205 2016-11-18 11:02:07 -08:00
Evan Morikawa 8489ee59c7 feat(lint): upgrade linter and add exceptions for dumb new rules 2016-11-15 09:56:39 -08:00
Evan Morikawa 8775876c4a feat(lint): add eslint_d to package.json 2016-11-15 09:22:46 -08:00
Ben Gotow feca9f82a7 deps(pro): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:28:42 -08:00
Ben Gotow 80b315d708 deps(*): Lift deps out of packages for simpler install / better deduping 2016-11-09 14:24:10 -08:00
Ben Gotow 1157fdc450 build(*): electron-compile, electron-packager instead of custom tooling
Summary:
This diff removes significant cruft from N1's compilation and build tooling:

- Electron-Packager replaces most of the code in build/tasks/* used to copy things,
  bundle things, download electron, etc.

- script/bootstrap has been replaced with a much simpler script that does not use
  APM, does not download Electron (we just use electron as an NPM dep) and does
  not manully compile sqlite. It requires NPMv3, but I think that's safe.

- babel and eslint are now devDependencies of the main project. The main project
  also supports optionalDependencies now.

- npm test and npm start replace ./N1.sh

- APM is still around, and is only put into N1 so it can install plugins at runtime.
  It should be removed as soon as we notify package maintainers and have them provide zips.

- N1 no longer has it's own compile-cache or babel/typescript/coffeescript compilers.
  It delegates to electron-compile and electron-compilers. Both of these packages had
  to be forked and modified slightly, but I'm hopeful the modifications will make it back
  in to the projects and you can still consult their documentation for more info.

  + In the near future, I think we should stop shipping electron-compilers with N1. This
    would mean that all plugins would need to be compiled on pre-publish, just like NPM
    packages, and would complicate the local development story a bit, but would make the
    app smaller. electron-compile is not supposed to compile at runtime in the prod app,
    just pull from the compile cache.

- I've re-organized Grunt according to Grunt best practices, where each tasks/* file
  specifies it's own config and imports grunt tasks.

- Unfortunately, I was not able to use any open source projects for the deb and rpm builds,
  because we have things like postinst hooks and start menu items which are not supported
  by the electron installer-generators.

WIP

Turn off all LESS compilation, because themes. Doh.

Use Grunt for new build process too, just remove tasks

More changes

Add babel-eslint

Remove unused react-devtools

WIP

Add name

Ignore nonexistent

Switch to more modern approach to config for grunt

Move zipping to mac installer task

Restructure publish task so it aggregates first, can log useful info if publishing is disabled

Fix build dirs

Fix win installer

Fix linux installer

Fix linux installer

Try making linux

A few more

Updates

Upadtes

fixes

fixes

Get rid of non-meaningful variables

Resolve assets path

Insert nylas.sh

Clean up args more

Actually use description

Fix display name ugh

More tweaks

Expliclty write /usr/bin/nylas

Improve vars

Use old nylas.sh

Reinstate APM to better scope this diff

Test Plan: Test on Mac, Windows, Linux

Reviewers: evan, jackie, juan

Reviewed By: jackie, juan

Differential Revision: https://phab.nylas.com/D3411
2016-11-09 13:52:10 -08:00
Juan Tejada 17e5087888 bump(version): 0.4.204 2016-11-07 14:16:50 -08:00
Juan Tejada 5a20dfce76 bump(version): 0.4.203 2016-11-04 16:49:20 -07:00
Juan Tejada f7e162c1a8 bump(version): 0.4.202 2016-11-02 18:03:31 -07:00
Juan Tejada 1183b852f0 bump(version): 0.4.201 2016-11-02 17:33:32 -07:00
Juan Tejada 20b6a6e070 feat(attachments): Add ability to preview with quicklook (mac only)
On mac, you can now preview an attachment by clicking on the new preview
icon, or by pressing space bar when an attachment is focused.

This commit also updates the styling for attachment items and adds the
ability to focus attachment items. We don't keep any focused state, just
the browser's, which means you can focus attachments by clicking, or
tabbing/shift-tabbing
2016-11-01 16:13:42 -07:00
Ben Gotow 85782c7b27 fix(mac-notifier): Make macOS-only package optional 2016-10-27 14:44:33 -07:00
Evan Morikawa f4a5478358 feat(license): add GPL-3.0 license to package.json 2016-10-27 09:36:10 -04:00
Evan Morikawa 40cfdec4ec bump(version): 0.4.200
Includes SFDC and the package migration
2016-10-26 19:48:22 -04:00
Ben Gotow 977b6a0889 feat(quick-replies): Reply from Mac notifications 2016-10-25 11:36:20 -07:00
Ben Gotow ded52ce101 rm(grim): We’re not using Grim for deprecations 2016-10-25 11:36:20 -07:00
Evan Morikawa 1c4ff31d68 feat(flow): Add Flow to Nylas N1
Add flow-typed annotations

Ignore annoying submodules

Add /* @flow */ header to all js & es6 source files

Fix error about having number keys for objects

Remove @flow config from compile-support

Check es6 files

Add jasmine to flow

Revert "Add /* @flow */ header to all js & es6 source files"

This reverts commit c5a57bc402c53633b407b557f28ad12eaa8f27fe.

Update submodule

Add nylas global interface file
2016-10-24 22:44:16 -04:00
Ben Gotow 1c428d8701 bump(version): 0.4.59 2016-10-24 13:21:08 -07:00
Ben Gotow d28c3acd6a bump(version): 0.4.58 2016-10-20 10:21:04 -07:00
Ben Gotow c20238314d lint(*): Bump to ESLint 3.8 2016-10-17 18:07:35 -07:00
Ben Gotow b061dade65 bump(Electron): 1.4.3 2016-10-14 13:11:20 -07:00
Ben Gotow 09b5f03f10 bump(version): 0.4.57
(0.4.58 was accidentally in prev commit)
2016-10-12 16:06:40 -07:00
Ben Gotow 8df4f6d744 feat(win32): Allow N1 to become the system-wide mailto: handler
Summary: This will address the longstanding concern in #417

Test Plan: No new tests

Reviewers: juan, evan

Reviewed By: juan, evan

Maniphest Tasks: T7065

Differential Revision: https://phab.nylas.com/D3322
2016-10-12 16:05:36 -07:00
Ben Gotow f409160273 fix(win32): Still need custom sqlite3 build cmd for win32 😥
This also includes a bump of the better-sqlite3 module to support compilation on ia32.
2016-10-12 12:30:23 -07:00
Evan Morikawa 6d0407acbc fix(jquery): remove jquery 2016-10-12 11:04:38 -04:00
Halla Moore 873c4be2da Switch spellcheck libaries
Summary:
Switch to electron-spellchecker, which will allow N1 to
spellcheck more intelligently across languages. It auto-
detects languages and downloads dictionaries on the fly.

Test Plan: Specs, manual testing

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3319
2016-10-11 14:00:50 -07:00
Ben Gotow 2d7882bade bump(sqlite3): Fix issue with CI build / bindings location 2016-10-07 17:59:10 -07:00
Ben Gotow 8f17b42074 fix(db): Switch to better-sqlite3, resolves offline issue
Summary:
Better-SQLite3 is a fork of node-sqlite3 which includes a re-written JavaScript interface. It’s more synchronous, but better reflects what is actually sync vs. async in sqlite’s C++ API. (Not much is really async under the hood.) This diff uses a branch of better-sqlite3 I’ve edited to support Node 6.

In my tests, this branch spends 3.24x less time executing queries than `master`. (Measured time spent in calls to `this._db[run|all|get]` over the first 5000 queries of initial sync. It also increased the performance of starring a thread in the thread list by 28%.

This library also allows us to use a prepared statement cache, which is great because we often make the same queries repeatedly as query subscriptions refresh the UI and deltas are dumped into the app. The old interface didn’t expose statements (cached query plans) to JS.

better-sqlite3 advertises that it uses the JS garbage collector instead of lower level C++ memory management. I tested syncing my entire mailbox to verify that memory usage is not significantly different on this branch after a lot of queries have been made.

Finally, it looks like we can finally stop building sqlite3 from scratch in `script/bootstrap`. This library builds properly with `apm install`. 🎉

We might want to change the DatabaseStore and DatabaseTransaction classes more, now that it’s possible to execute queries synchronously. It could make things cleaner and get us out of promise-hell in a few places. In this diff I tried to change as little as possible.

Test Plan: Run tests, everything still works

Reviewers: juan, jackie

Reviewed By: juan, jackie

Differential Revision: https://phab.nylas.com/D3315
2016-10-06 17:01:22 -07:00
Ben Gotow 047b4c03fe bump(verison): 0.4.56, more items in changelog 2016-09-29 12:24:15 -07:00
Juan Tejada 5740d29eb5 bump(version): 0.4.55 2016-09-27 08:48:57 -07:00
Juan Tejada fd1ed0cc48 fix(warnings): Fix warnings for react unkown dom prop
When using the pattern `{...extraProps}` to transfer props in the render method,
if rendering a native dom element, react will issue a new warning if we
end up passing invalid dom props:
https://facebook.github.io/react/warnings/unknown-prop.html

This adds a helper library to exclude invalid fom props instead of
manually excluding props inside each render method
2016-09-24 12:31:25 -07:00
Ben Gotow 6b8ae46d0c bump(electron): Update to 1.4.1 to fix intermittent Symbol() error 2016-09-23 08:22:13 -07:00
Ben Gotow 298cb55054 bump(react): 15.3.x, warning removal, thread-sharing tweaks 2016-09-20 17:28:50 -07:00
Ben Gotow e533d063d0 fix(specs): Fix tests that were console.logging, bump coffee-react 2016-09-20 15:17:48 -07:00
Ben Gotow bebba0d45f bump(version): 0.4.54 beta 2016-09-19 18:33:17 -07:00
Ben Gotow 664943354e bump(electron): Electron 1.4, node-sqlite 3.1.4+fts 2016-09-16 08:59:36 -07:00
Juan Tejada 3b7562ed76 bump(version): 0.4.53 and update Changelog 2016-09-14 12:25:00 -07:00
Evan Morikawa 0ea97a5193 bump(version): 0.4.52 and add Changelog 2016-09-14 11:56:36 -07:00
Juan Tejada 962b8b4561 bump(version) 2016-09-01 20:28:17 -07:00
Juan Tejada c98ca87f47 bump(version): 0.4.50 2016-08-31 14:56:08 -07:00
Evan Morikawa 63134325bf bump(version): 0.4.49 2016-08-18 12:21:41 -07:00