From 412ea766bb08d8247f32ff631b578a1a73da4c10 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:50:37 -0500 Subject: [PATCH] docs: add a few API history fragments (#49477) * docs: add a few API history fragments Co-authored-by: Erick Zhao * manual fixes Co-authored-by: Erick Zhao --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Erick Zhao --- docs/api/auto-updater.md | 17 +++++++++++++++++ docs/api/share-menu.md | 7 +++++++ docs/api/shell.md | 28 ++++++++++++++++++++++++++++ docs/breaking-changes.md | 12 ++++++++++++ docs/development/style-guide.md | 2 +- 5 files changed, 65 insertions(+), 1 deletion(-) diff --git a/docs/api/auto-updater.md b/docs/api/auto-updater.md index f2e4a37945..350bcb099b 100644 --- a/docs/api/auto-updater.md +++ b/docs/api/auto-updater.md @@ -100,6 +100,13 @@ On Windows only `releaseName` is available. ### Event: 'before-quit-for-update' + + This event is emitted after a user calls `quitAndInstall()`. When this API is called, the `before-quit` event is not emitted before all windows are closed. As a result you should listen to this event if you wish to perform actions before the windows are closed while a process is quitting, as well as listening to `before-quit`. @@ -110,6 +117,16 @@ The `autoUpdater` object has the following methods: ### `autoUpdater.setFeedURL(options)` + + * `options` Object * `url` string * `headers` Record\ (optional) _macOS_ - HTTP request headers. diff --git a/docs/api/share-menu.md b/docs/api/share-menu.md index c1ffd45574..cb5ee3d017 100644 --- a/docs/api/share-menu.md +++ b/docs/api/share-menu.md @@ -9,6 +9,13 @@ For including the share menu as a submenu of other menus, please use the ## Class: ShareMenu + + > Create share menu on macOS. Process: [Main](../glossary.md#main-process) diff --git a/docs/api/shell.md b/docs/api/shell.md index 80e720b8f4..59bb0c19dd 100644 --- a/docs/api/shell.md +++ b/docs/api/shell.md @@ -29,6 +29,14 @@ Show the given file in a file manager. If possible, select the file. ### `shell.openPath(path)` + + * `path` string Returns `Promise` - Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "". @@ -37,6 +45,18 @@ Open the given file in the desktop's default manner. ### `shell.openExternal(url[, options])` + + * `url` string - Max 2081 characters on Windows. * `options` Object (optional) * `activate` boolean (optional) _macOS_ - `true` to bring the opened application to the foreground. The default is `true`. @@ -50,6 +70,14 @@ Open the given external protocol URL in the desktop's default manner. (For examp ### `shell.trashItem(path)` + + * `path` string - path to the item to be moved to the trash. Returns `Promise` - Resolves when the operation has been completed. diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 31d9a27bbd..43b15dac81 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -2677,6 +2677,18 @@ Replace with: https://atom.io/download/electron The following list includes the breaking API changes made in Electron 2.0. +### `autoUpdater` + +```js +// Deprecated +autoUpdater.setFeedURL(url, headers) +// Replace with +autoUpdater.setFeedURL({ + url, + headers +}) +``` + ### `BrowserWindow` ```js diff --git a/docs/development/style-guide.md b/docs/development/style-guide.md index cac7c7520e..e7cce2b7e7 100644 --- a/docs/development/style-guide.md +++ b/docs/development/style-guide.md @@ -99,7 +99,7 @@ Using `autoUpdater` as an example: ## Methods -### `autoUpdater.setFeedURL(url[, requestHeaders])` +### `autoUpdater.setFeedURL(options)` ``` ### Classes