@vueuse/electron 14.4.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -11
  2. package/package.json +5 -2
package/dist/index.js CHANGED
@@ -1,16 +1,7 @@
1
1
  import { isRef, ref, shallowRef, watch } from "vue";
2
2
  import { tryOnScopeDispose } from "@vueuse/shared";
3
3
  //#region useIpcRendererInvoke/index.ts
4
- /**
5
- * Returns Promise<any> - Resolves with the response from the main process.
6
- *
7
- * Send a message to the main process via channel and expect a result ~~asynchronously~~. As composition-api, it makes asynchronous operations look like synchronous.
8
- *
9
- * @see https://www.electronjs.org/docs/api/ipc-renderer#ipcrendererinvokechannel-args
10
- * @see https://vueuse.org/useIpcRendererInvoke
11
- *
12
- * @__NO_SIDE_EFFECTS__
13
- */
4
+ /* @__NO_SIDE_EFFECTS__ */
14
5
  function useIpcRendererInvoke(...args) {
15
6
  let ipcRenderer;
16
7
  let channel;
@@ -70,7 +61,7 @@ function useIpcRenderer(ipcRenderer) {
70
61
  removeListener: ipcRenderer.removeListener.bind(ipcRenderer),
71
62
  removeAllListeners: ipcRenderer.removeAllListeners.bind(ipcRenderer),
72
63
  send: ipcRenderer.send,
73
- invoke: (channel, ...args) => useIpcRendererInvoke(ipcRenderer, channel, ...args),
64
+ invoke: (channel, ...args) => /* @__PURE__ */ useIpcRendererInvoke(ipcRenderer, channel, ...args),
74
65
  sendSync: setSendSync(ipcRenderer),
75
66
  postMessage: ipcRenderer.postMessage,
76
67
  sendTo: ipcRenderer.sendTo,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vueuse/electron",
3
3
  "type": "module",
4
- "version": "14.4.0",
4
+ "version": "15.0.0",
5
5
  "description": "Electron renderer process modules for VueUse",
6
6
  "author": "Archer Gu<https://github.com/ArcherGu>",
7
7
  "license": "MIT",
@@ -34,12 +34,15 @@
34
34
  "files": [
35
35
  "dist"
36
36
  ],
37
+ "engines": {
38
+ "node": ">=22"
39
+ },
37
40
  "peerDependencies": {
38
41
  "electron": ">=9.0.0",
39
42
  "vue": "^3.5.0"
40
43
  },
41
44
  "dependencies": {
42
- "@vueuse/shared": "14.4.0"
45
+ "@vueuse/shared": "15.0.0"
43
46
  },
44
47
  "devDependencies": {
45
48
  "electron": "^13.1.0"