💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
Find a file
Juan Tejada 0ea35896b0 fix(config): Write config.json atomically and handle errors (#2518)
Summary:
It seems that #2518 was being caused because `fs.writeFileSync` ocasionally failed and ended up writing an empty config.json file, effectively blowing away your N1 settings. The most common cause of failure for `writeFileSync` seems to be EBUSY error on win32, according to Sentry. The reason as to why EBUSY is happening so frequently on win32 is still unclear.

This commit:
- Adds an `atomicWriteFileSync` helper which writes to a temporary file first, and then renames the file. If writing to the temp file fails, we wont blow away our actual config.json. Also, renaming seems to be atomic across all platforms.
- Adds more robust error handling and messaging to both loading and writing the file, and report them to Sentry
- Automatically retries saving the file 3 times before telling the user.
- Fixes https://sentry.nylas.com/sentry/edgehill/group/43112/

Test Plan: Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D3245
2016-08-30 15:46:53 -07:00
apm
build feat(plugins): plugins now properly report which are active on change 2016-08-18 11:42:55 -07:00
docs Update Windows.py to remove Node 0.10x 2016-07-08 10:52:08 -07:00
dot-nylas cleanup(config): Remove unused features, dependencies 2016-04-26 13:14:06 -07:00
examples Update broken links for guides, docs, and API (#2455) 2016-06-15 15:29:52 -07:00
internal_packages fix(onboarding): no longer show welcome page 2016-08-30 14:52:19 -07:00
keymaps feat(snooze): Add command for keyboard shortcut 2016-06-07 10:29:52 -07:00
menus fix(menus): Add missing Window menu to win32 and linux 2016-06-10 11:55:59 -07:00
script bump(version): 0.4.46 and Electron 1.2.7 2016-07-18 16:51:49 -07:00
spec fix(autoupdater): Change feed URL when Nylas ID or accounts changes 2016-08-18 13:22:56 -07:00
spec_integration fix(identity): deprecate updaterId, provide safe access to identity.id 2016-06-02 18:56:09 -07:00
src fix(config): Write config.json atomically and handle errors (#2518) 2016-08-30 15:46:53 -07:00
static fix(icons): Prevent signature dropdown icon from appearing too large 2016-07-28 15:25:11 -07:00
.eslintrc
.gitignore fix(build): Trigger travis rebuild 2016-04-24 18:57:55 -05:00
.gitmodules feat(package): fix build-resources-task and move submodule 2016-04-25 16:01:56 -07:00
.travis.yml feat(travis): add ci-build/.* wildcard to building branches 2016-08-29 17:43:24 -07:00
appveyor.yml feat(package): fix build-resources-task and move submodule 2016-04-25 16:01:56 -07:00
CHANGELOG.md Update changelog 2016-08-18 15:16:58 -07:00
CONFIGURATION.md feat(self-hosting): Add onboarding flow for self-hosted sync engine 2016-07-21 14:25:30 -07:00
CONTRIBUTING.md Mention test focusing and skipping in CONTRIBUTING (#2514) 2016-07-08 10:57:41 -07:00
ISSUE_TEMPLATE.md Update ISSUE_TEMPLATE.md 2016-07-23 13:03:38 -07:00
keymap.json fix(config): Move all reads / writes to the main process 2016-05-16 16:38:46 -05:00
LICENSE.md meta(license): Add GPLv3 License 2015-10-01 10:23:42 -07:00
N1.sh fix(N1.sh): run with --enable-logging (nylas.sh for prod) 2016-05-04 17:24:11 -07:00
package.json bump(version): 0.4.49 2016-08-18 12:21:41 -07:00
README.md add theme img 2016-08-30 14:46:48 -07:00

N1 Logo

N1 Screenshot

N1 is an open-source mail client built on the modern web with Electron, React, and Flux. It is designed to be extensible, so it's easy to create new experiences and workflows around email. N1 is built on the Nylas Sync Engine, which is also open-source free software.

Build Status Slack Invite Button ![GitHub issues On Deck](https://badge.waffle.io/nylas/N1.png?label=on deck&title=On Deck)

Want help build the future of email? Nylas is hiring!

Download N1

You can download compiled versions of N1 for Windows, Mac OS X, and Linux (.deb) from https://nylas.com/N1. You can also build and run N1 on Fedora. On Arch Linux, you can install n1 or n1-git from the aur.

Build A Plugin

Plugins lie at the heart of N1 and give it its powerful features. Building your own plugins allows you to integrate the app with other tools, experiment with new workflows, and more. Follow the Getting Started guide to write your first plugin in five minutes. To create your own theme, go to our Theme Starter guide.

If you would like to run the N1 source and contribute, check out our contributing guide.

Themes

The Nylas N1 user interface is styled using CSS, which means it's easy to modify and extend. N1 comes stock with a few beautiful themes, and there are many more which have been built by community developers

Bundled Themes

Community Themes

To install community themes:

  1. Download and unzip the repo
  2. In Nylas N1, select Developer > Install a Package Manually...
  3. Navigate to where you downloaded the theme and select the root folder. The theme is copied into the ~/.nylas folder for your convinence
  4. Select Change Theme... from the top level menu, and you'll see the newly installed theme. That's it!

Want to dive in more? Try creating your own theme!

Plugin List

We're working on building a plugin index that makes it super easy to add them to N1. For now, check out the list below! (Feel free to submit a PR if you build a plugin and want it featured here.)

Bundled Plugins

Great starting points for creating your own plugins!

Community Plugins

When you install packages, they're moved to ~/.nylas/packages, and N1 runs apm install on the command line to fetch dependencies listed in the package's package.json

Configuration

You can configure N1 in a few ways—for instance, pointing it to your self-hosted instance of the sync engine or changing the interface zoom level. Learn more about how.

Feature Requests / Plugin Ideas

Have an idea for a package or a feature you'd love to see in N1? Check out our public Trello board to contribute your thoughts and vote on existing ideas.