cwm-assistant 0.3.6 → 0.3.8

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.
package/dist/main.js CHANGED
@@ -7,7 +7,7 @@ if (major < 22 || major === 22 && minor < 13) {
7
7
  console.error("Workspace \u52A9\u624B\u9700\u8981 Node.js 22.13 \u6216\u66F4\u9AD8\u7248\u672C\uFF08\u63A8\u8350 24 LTS\uFF09\u3002");
8
8
  process.exitCode = 1;
9
9
  } else {
10
- const { cli } = await import("./cli-3NJG6G4T.js");
10
+ const { cli } = await import("./cli-TPXAFK3D.js");
11
11
  cli(process.argv.slice(2), fileURLToPath(import.meta.url)).catch((error) => {
12
12
  console.error(error instanceof Error ? error.message : String(error));
13
13
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cwm-assistant",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Local Git and workspace assistant for the CWM browser workbench",
5
5
  "keywords": [
6
6
  "cwm",
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { spawn } from "node:child_process";
9
9
  import fs from "node:fs";
10
+ import os from "node:os";
10
11
  import path from "node:path";
11
12
  import { fileURLToPath } from "node:url";
12
13
 
@@ -65,6 +66,8 @@ async function main() {
65
66
  detached: true,
66
67
  windowsHide: true,
67
68
  stdio: "ignore",
69
+ // Inheriting the package directory would keep it busy for the next upgrade on Windows.
70
+ cwd: os.tmpdir(),
68
71
  },
69
72
  );
70
73
  child.unref();
@@ -97,6 +97,7 @@ function restartInstalled(stateDirectory) {
97
97
  detached: true,
98
98
  stdio: "ignore",
99
99
  windowsHide: true,
100
+ cwd: stateDirectory,
100
101
  });
101
102
  child.unref();
102
103
  } catch {
@@ -124,6 +125,8 @@ async function main() {
124
125
  stdio: ["ignore", "pipe", "pipe"],
125
126
  shell: false,
126
127
  windowsHide: true,
128
+ // npm renames the package directory; cwd must not be inside it on Windows.
129
+ cwd: directory,
127
130
  env: {
128
131
  ...process.env,
129
132
  PATH: [nodeDirectory, process.env.PATH].filter(Boolean).join(path.delimiter),