@gjsify/process 0.39.0 → 0.41.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.
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{getGjsGlobal as e}from"./gjs.js";import{ensureMainLoop as t,quitMainLoop as n}from"@gjsify/utils/core";function exitProcess(r){let i=e().imports,a=i?.gi?.GLib,o=i?.system,s=a?.idle_add,c=a?.SOURCE_REMOVE,l=a?.PRIORITY_DEFAULT;if(o?.exit&&s&&typeof l==`number`&&typeof c==`boolean`)return t(),s(l,()=>(n(),o.exit(r),c)),new Promise(()=>{});try{o?.exit&&o.exit(r)}catch{}let u=globalThis.process;throw u&&typeof u.exit==`function`&&u.exit(r),Error(`process.exit(${r})`)}export{exitProcess};
1
+ import"../_virtual/_rolldown/runtime.js";import{getGjsGlobal as e}from"./gjs.js";function exitProcess(t){let n=e().imports,r=n?.gi?.GLib,i=n?.system,a=r?.idle_add,o=r?.SOURCE_REMOVE,s=r?.PRIORITY_DEFAULT,c=r?.MainContext;if(i?.exit&&a&&typeof s==`number`&&typeof o==`boolean`&&typeof c?.default==`function`){a(s,()=>(i.exit(t),o));let e=c.default();for(;;)e.iteration(!0)}try{i?.exit&&i.exit(t)}catch{}let l=globalThis.process;throw l&&typeof l.exit==`function`&&l.exit(t),Error(`process.exit(${t})`)}export{exitProcess};
@@ -1,7 +1,6 @@
1
1
  /**
2
- * Trigger process termination with the given exit code. Returns `never` —
3
- * the function does not return to its caller under any path. If the GJS
4
- * idle-scheduled path is taken, this returns a forever-pending Promise so
5
- * the caller's synchronous control flow stalls until the syscall fires.
2
+ * Trigger process termination with the given exit code. Never returns, on any
3
+ * path and under any runtime — the GJS branch blocks in a main-context loop
4
+ * until the scheduled `system.exit()` takes the process down.
6
5
  */
7
6
  export declare function exitProcess(code: number): never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/process",
3
- "version": "0.39.0",
3
+ "version": "0.41.0",
4
4
  "description": "Node.js process module for Gjs",
5
5
  "module": "lib/esm/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -40,14 +40,14 @@
40
40
  "process"
41
41
  ],
42
42
  "dependencies": {
43
- "@gjsify/events": "^0.39.0",
44
- "@gjsify/string_decoder": "^0.39.0",
45
- "@gjsify/terminal-native": "^0.39.0",
46
- "@gjsify/utils": "^0.39.0"
43
+ "@gjsify/events": "^0.41.0",
44
+ "@gjsify/string_decoder": "^0.41.0",
45
+ "@gjsify/terminal-native": "^0.41.0",
46
+ "@gjsify/utils": "^0.41.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@gjsify/cli": "^0.39.0",
50
- "@gjsify/unit": "^0.39.0",
49
+ "@gjsify/cli": "^0.41.0",
50
+ "@gjsify/unit": "^0.41.0",
51
51
  "@types/node": "^25.9.2",
52
52
  "typescript": "^6.0.3"
53
53
  },