Skip to content

Commit

Permalink
feat!: Support Electron 7 (#250)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

- Drop support for Electron 4, 5, and 6.
- Remove deprecated passing string argument to `menubar`, use `dir` field instead
```diff
- menubar('/home/me/MY_ABSOLUTE_PATH');
+ menubar({ dir: '/home/me/MY_ABSOLUTE_PATH' });
```
- Remove deprecated passing `x`, `y`, `height`, `width`, `alwaysOnTop` fields to `menubar`, pass them instead into the `browserWindow` field
```diff
- menubar({
-   x: 12,
-   y: 34,
-   height: 500,
-   width: 320,
-   alwaysOnTop: true
- });
+ menubar({
+   browserWindow: {
+     x: 12,
+     y: 34,
+     height: 500,
+     width: 320,
+     alwaysOnTop: true
+  }
+ });
```
  • Loading branch information
amaury1093 authored Oct 23, 2019
1 parent 99176a2 commit b54dce5
Show file tree
Hide file tree
Showing 10 changed files with 449 additions and 1,236 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ The `Menubar` class is an event emitter:
- `after-close` - after the `.window` (BrowserWindow) property has been deleted
- `focus-lost` - emitted if always-on-top option is set and the user clicks away

## Compatibility with Electron

| menubar | Electron |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| 7.x.x | 7.x.x |
| 6.x.x | 4.x.x \| 5.x.x \| 6.x.x (not recommended for [security reasons](https://electronjs.org/docs/tutorial/security#17-use-a-current-version-of-electron)) |
| <= 5.x.x | Please, _please_ don't use these old versions |

## API Docs

See the reference [API docs](./docs/globals.md).
Expand Down
4 changes: 2 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "example-menubar",
"version": "0.1.0",
"description": "Example menubar electron app",
"description": "Examples of menubar electron apps",
"private": true,
"workspaces": [
"arrow",
"hello-world",
"native-menu"
],
"devDependencies": {
"electron": "^6.0.0"
"electron": "^7.0.0"
}
}
Loading

0 comments on commit b54dce5

Please sign in to comment.