@tauri-apps/api-v2.12.2

tauri-apps/tauri@tauri-apps/api-v2.12.2Oct 9, 2026by github-actions[bot]

Upgrading?

AI Summary

Updates the Tauri API v2 to version 2.12.2, improving error handling for event listeners and fixing type mismatches in menu manipulation methods.

Key Highlights

  • Event listeners now return awaitable cleanup functions to properly handle rejections instead of unhandled promise rejections.
  • Fixed type mismatches in `Menu` and `Submenu` `append`, `prepend`, and `insert` methods to match TypeScript definitions.

Full Release Notes

<details>
<summary><em><h4>PNPM Audit</h4></em></summary>

```
All found vulnerabilities were already reviewed and decided to be ignored
3 ignored: 3 high
```

</details>

## [2.12.2]

### Bug Fixes

- [`a916205db`](https://www.github.com/tauri-apps/tauri/commit/a916205db2c21a2475502452efa9b70132ae52f3) ([#16195](https://www.github.com/tauri-apps/tauri/pull/16195) by [@alessandrorodi](https://www.github.com/tauri-apps/tauri/../../alessandrorodi)) Return an awaitable cleanup function from `Window.onDragDropEvent`, `Window.onFocusChanged` and `Webview.onDragDropEvent` so rejections from the inner unlisten calls can be handled instead of surfacing as unhandled promise rejections.
- [`a98038ec7`](https://www.github.com/tauri-apps/tauri/commit/a98038ec78422b821b2e25b26fb71a2805741673) ([#16235](https://www.github.com/tauri-apps/tauri/pull/16235) by [@Legend-Master](https://www.github.com/tauri-apps/tauri/../../Legend-Master)) Fix `Menu`/`Submenu` `append`, `prepend`, `insert` not taking `MenuItemOptions` as the typescript type suggests

<details>
<summary><em><h4>PNPM Publish</h4></em></summary>

```
$ pnpm build && cd ./dist && pnpm publish --access public --loglevel debug --no-git-checks
$ rollup -c --configPlugin typescript

./src/app.ts, ./src/core.ts, ./src/dpi.ts, ./src/event.ts, ./src/image.ts, ./src/index.ts, ./src/menu.ts, ./src/mocks.ts, ./src/path.ts, ./src/tray.ts, ./src/webview.ts, ./src/webviewWindow.ts, ./src/window.ts → ./dist, ./dist...
created ./dist, ./dist in 1s

src/index.ts → ../../crates/tauri/scripts/bundle.global.js...
created ../../crates/tauri/scripts/bundle.global.js in 1.6s
GET https://run-actions-3-azure-eastus.actions.githubusercontent.com/213//idtoken/0fbe2603-3d56-8c38-b19e-d6385e66cd8e/20c0902b-9ea5-59ed-9825-ee7093667d2e?api-version=2.0&audience=npm%3Aregistry.npmjs.org 200 136ms
šŸ“¦ @tauri-apps/api@2.12.2 → https://registry.npmjs.org/
GET https://run-actions-3-azure-eastus.actions.githubusercontent.com/213//idtoken/0fbe2603-3d56-8c38-b19e-d6385e66cd8e/20c0902b-9ea5-59ed-9825-ee7093667d2e?api-version=2.0&audience=sigstore 200 44ms
Signed provenance statement with source and build information
āœ… Published package @tauri-apps/api@2.12.2
```

</details>

Related Repositories