@withone/cli 1.32.0 → 1.32.1

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 +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -847,8 +847,16 @@ async function updateCommand() {
847
847
  }
848
848
  s.stop(`Update available: v${currentVersion} \u2192 v${latestVersion}`);
849
849
  console.log(`Updating @withone/cli: v${currentVersion} \u2192 v${latestVersion}...`);
850
+ await new Promise((resolve) => {
851
+ const child = spawn("npm", ["cache", "clean", "--force"], {
852
+ stdio: "ignore",
853
+ shell: true
854
+ });
855
+ child.on("close", () => resolve());
856
+ child.on("error", () => resolve());
857
+ });
850
858
  const code = await new Promise((resolve) => {
851
- const child = spawn("npm", ["install", "-g", "@withone/cli@latest", "--force"], {
859
+ const child = spawn("npm", ["install", "-g", `@withone/cli@${latestVersion}`, "--force"], {
852
860
  stdio: isAgentMode() ? "pipe" : "inherit",
853
861
  shell: true
854
862
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withone/cli",
3
- "version": "1.32.0",
3
+ "version": "1.32.1",
4
4
  "description": "CLI for managing One",
5
5
  "type": "module",
6
6
  "files": [