@adunne09/waldo 0.0.0-dev-202603152043 → 0.0.0-dev-202603160010

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/bin/waldo +6 -35
  2. package/package.json +6 -6
package/bin/waldo CHANGED
@@ -6,41 +6,8 @@ import os from "node:os";
6
6
  import path from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
- function findNodeModulesRoot(target) {
10
- let current = path.dirname(target);
11
-
12
- for (;;) {
13
- if (path.basename(current) === "node_modules") {
14
- return current;
15
- }
16
-
17
- const parent = path.dirname(current);
18
- if (parent === current) {
19
- return undefined;
20
- }
21
-
22
- current = parent;
23
- }
24
- }
25
-
26
- function createRuntimeEnv(target) {
27
- const nodeModulesRoot = findNodeModulesRoot(target);
28
- if (!nodeModulesRoot) {
29
- return process.env;
30
- }
31
-
32
- const existingNodePath = process.env.NODE_PATH;
33
- return {
34
- ...process.env,
35
- NODE_PATH: existingNodePath
36
- ? `${nodeModulesRoot}${path.delimiter}${existingNodePath}`
37
- : nodeModulesRoot,
38
- };
39
- }
40
-
41
9
  function run(target) {
42
10
  const result = childProcess.spawnSync(target, process.argv.slice(2), {
43
- env: createRuntimeEnv(target),
44
11
  stdio: "inherit",
45
12
  });
46
13
 
@@ -319,7 +286,7 @@ function runGlobalUpgrade(method, target) {
319
286
  })();
320
287
 
321
288
  const result = childProcess.spawnSync(command[0], command[1], {
322
- stdio: "inherit",
289
+ stdio: ["ignore", "ignore", "pipe"],
323
290
  cwd: os.homedir(),
324
291
  });
325
292
 
@@ -332,6 +299,10 @@ function runGlobalUpgrade(method, target) {
332
299
  }
333
300
  }
334
301
 
302
+ function formatAutoUpdateSuccessMessage(current, latest) {
303
+ return `Updated Waldo from ${current} to ${latest}. Restart to apply changes.`;
304
+ }
305
+
335
306
  const platformMap = {
336
307
  darwin: "darwin",
337
308
  linux: "linux",
@@ -397,7 +368,7 @@ async function maybeAutoUpdate() {
397
368
  }
398
369
 
399
370
  runGlobalUpgrade(method, latest);
400
- console.error(`Updated Waldo from ${current} to ${latest}.`);
371
+ console.error(formatAutoUpdateSuccessMessage(current, latest));
401
372
  } catch {
402
373
  const current = resolveCurrentVersion();
403
374
  console.error(`Waldo update failed; continuing with ${current}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adunne09/waldo",
3
- "version": "0.0.0-dev-202603152043",
3
+ "version": "0.0.0-dev-202603160010",
4
4
  "waldoReleaseTag": "dev",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,10 +13,10 @@
13
13
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@adunne09/waldo-darwin-arm64": "0.0.0-dev-202603152043",
17
- "@adunne09/waldo-darwin-x64": "0.0.0-dev-202603152043",
18
- "@adunne09/waldo-linux-arm64": "0.0.0-dev-202603152043",
19
- "@adunne09/waldo-linux-x64": "0.0.0-dev-202603152043",
20
- "@adunne09/waldo-windows-x64": "0.0.0-dev-202603152043"
16
+ "@adunne09/waldo-darwin-arm64": "0.0.0-dev-202603160010",
17
+ "@adunne09/waldo-darwin-x64": "0.0.0-dev-202603160010",
18
+ "@adunne09/waldo-linux-arm64": "0.0.0-dev-202603160010",
19
+ "@adunne09/waldo-linux-x64": "0.0.0-dev-202603160010",
20
+ "@adunne09/waldo-windows-x64": "0.0.0-dev-202603160010"
21
21
  }
22
22
  }