Commit 3b9aaeb

Anton Golub <antongolub@antongolub.com>
2025-07-13 16:08:32
fix: update @webpod/ps to v0.1.4 to handle eperm issues (#1267)
* fix: update @webpod/ps to v0.1.4 to handle eperm issues * chore: update bundles
1 parent 978c0e1
build/3rd-party-licenses
@@ -20,7 +20,7 @@ THIRD PARTY LICENSES
   sindresorhus/merge-streams
   MIT
 
-@webpod/ps@0.1.3
+@webpod/ps@0.1.4
   <unknown>
   git://github.com/webpod/ps.git
   MIT
build/vendor-core.cjs
@@ -1193,13 +1193,16 @@ var IS_WIN = import_node_process4.default.platform === "win32";
 var WMIC_INPUT = "wmic process get ProcessId,ParentProcessId,CommandLine";
 var isBin = (f) => {
   if (f === "") return false;
-  if (!f.includes("/")) return true;
-  if (!f.includes("\\")) return true;
+  if (!f.includes("/") && !f.includes("\\")) return true;
   if (f.length > 3 && f[0] === '"')
     return f[f.length - 1] === '"' ? isBin(f.slice(1, -1)) : false;
-  if (!import_node_fs.default.existsSync(f)) return false;
-  const stat = import_node_fs.default.lstatSync(f);
-  return stat.isFile() || stat.isSymbolicLink();
+  try {
+    if (!import_node_fs.default.existsSync(f)) return false;
+    const stat = import_node_fs.default.lstatSync(f);
+    return stat.isFile() || stat.isSymbolicLink();
+  } catch (e) {
+    return false;
+  }
 };
 var lookup = (query = {}, cb = noop2) => _lookup({ query, cb, sync: false });
 var lookupSync = (query = {}, cb = noop2) => _lookup({ query, cb, sync: true });
@@ -1363,8 +1366,8 @@ var formatOutput = (data) => data.reduce((m, d) => {
   const cmd = _cmd.length === 1 ? _cmd[0].split(/\s+/) : _cmd;
   if (pid && cmd.length > 0) {
     const c = cmd.findIndex((_v, i) => isBin(cmd.slice(0, i).join(" ")));
-    const command = cmd.slice(0, c).join(" ");
-    const args = cmd.length > 1 ? cmd.slice(c) : [];
+    const command = (c === -1 ? cmd : cmd.slice(0, c)).join(" ");
+    const args = c === -1 ? [] : cmd.slice(c);
     m.push({
       pid,
       ppid,
.size-limit.json
@@ -15,7 +15,7 @@
       "README.md",
       "LICENSE"
     ],
-    "limit": "122.85 kB",
+    "limit": "122.90 kB",
     "brotli": false,
     "gzip": false
   },
@@ -29,7 +29,7 @@
       "build/globals.js",
       "build/deno.js"
     ],
-    "limit": "813.35 kB",
+    "limit": "813.40 kB",
     "brotli": false,
     "gzip": false
   },
@@ -43,7 +43,7 @@
   {
     "name": "vendor",
     "path": "build/vendor-*.{cjs,d.ts}",
-    "limit": "766.50 kB",
+    "limit": "766.55 kB",
     "brotli": false,
     "gzip": false
   },
@@ -62,7 +62,7 @@
       "README.md",
       "LICENSE"
     ],
-    "limit": "869.40 kB",
+    "limit": "869.50 kB",
     "brotli": false,
     "gzip": false
   }
package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "zx",
-  "version": "8.7.0",
+  "version": "8.7.1",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "zx",
-      "version": "8.7.0",
+      "version": "8.7.1",
       "license": "Apache-2.0",
       "bin": {
         "zx": "build/cli.js"
@@ -20,7 +20,7 @@
         "@types/node": "24.0.13",
         "@types/which": "3.0.4",
         "@webpod/ingrid": "1.1.1",
-        "@webpod/ps": "0.1.3",
+        "@webpod/ps": "0.1.4",
         "c8": "10.1.3",
         "chalk": "5.4.1",
         "create-require": "1.1.1",
@@ -2569,9 +2569,9 @@
       "license": "MIT"
     },
     "node_modules/@webpod/ps": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/@webpod/ps/-/ps-0.1.3.tgz",
-      "integrity": "sha512-M6u51Qbk9QHE1Rv2tjUaikcxj9vGUMmtl7Ma5ylE1GAx1djpViNZDMO33pE5Sw7wNlsyHt2ymrzpuBb0xoKaNg==",
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/@webpod/ps/-/ps-0.1.4.tgz",
+      "integrity": "sha512-Mq62ZvqAD2uF+b+MjGua7K1lkARk6vzYJTfZDe6h8lYbIXYticPpP+FWA3SPzjKlQQl7EJRdcoB4Xst3IOKz4g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
package.json
@@ -1,6 +1,6 @@
 {
   "name": "zx",
-  "version": "8.7.0",
+  "version": "8.7.1",
   "description": "A tool for writing better scripts",
   "type": "module",
   "main": "./build/index.cjs",
@@ -112,7 +112,7 @@
     "@types/node": "24.0.13",
     "@types/which": "3.0.4",
     "@webpod/ingrid": "1.1.1",
-    "@webpod/ps": "0.1.3",
+    "@webpod/ps": "0.1.4",
     "c8": "10.1.3",
     "chalk": "5.4.1",
     "create-require": "1.1.1",