Skip to content

Commit

Permalink
Require Electron 5
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 21, 2019
1 parent b90ce8f commit 25e3aa7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
os: osx
language: node_js
node_js:
- '10'
- '12'
8 changes: 4 additions & 4 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const electron = require('electron');
const {app, BrowserWindow} = require('electron');
const {openNewGitHubIssue, debugInfo} = require('electron-util');
const unhandled = require('.');

Expand All @@ -17,10 +17,10 @@ unhandled({
let mainWindow;

(async () => {
await electron.app.whenReady();
await app.whenReady();

mainWindow = new electron.BrowserWindow();
mainWindow.loadURL('https://google.com');
mainWindow = new BrowserWindow();
await mainWindow.loadURL('https://google.com');

unhandled.logError(new Error('Test'), {title: 'Custom Title'});
})();
12 changes: 6 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ declare const unhandled: {
(options?: unhandled.UnhandledOptions): void;

/**
* Log an error. This does the same as with caught unhandled errors.
*
* It will use the same options specified in the `unhandled()` call or the defaults.
*
* @param error - Error to log.
*/
Log an error. This does the same as with caught unhandled errors.
It will use the same options specified in the `unhandled()` call or the defaults.
@param error - Error to log.
*/
logError(error: Error, options?: unhandled.LogErrorOptions): void;
};

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@
"dependencies": {
"clean-stack": "^2.1.0",
"electron-is-dev": "^1.0.1",
"ensure-error": "^1.0.0",
"ensure-error": "^2.0.0",
"lodash.debounce": "^4.0.8"
},
"devDependencies": {
"ava": "^1.4.1",
"electron": "^3.0.6",
"electron-util": "^0.10.2",
"electron": "^5.0.1",
"electron-util": "^0.11.0",
"execa": "^1.0.0",
"tsd": "^0.7.2",
"tsd": "^0.7.3",
"xo": "^0.24.0"
},
"xo": {
"nodeVersion": ">=10",
"nodeVersion": ">=12",
"envs": [
"node",
"browser"
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can use this module directly in both the main and renderer process.
$ npm install electron-unhandled
```

Requires Electron 3 or later.
*Requires Electron 5 or later.*


## Usage
Expand All @@ -31,7 +31,7 @@ You probably want to call this both in the main process and any renderer process

### options

Type: `Object`
Type: `object`

#### logger

Expand Down Expand Up @@ -89,7 +89,7 @@ Error to log.

#### options

Type: `Object`
Type: `object`

##### title

Expand Down

0 comments on commit 25e3aa7

Please sign in to comment.