backlog.md 0.1.52 → 0.1.54

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/package.json +9 -17
  2. package/postuninstall.cjs +37 -0
package/package.json CHANGED
@@ -1,30 +1,21 @@
1
1
  {
2
2
  "name": "backlog.md",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "bin": {
5
5
  "backlog": "cli.js"
6
6
  },
7
7
  "dependencies": {
8
- "backlog.md-linux-x64": "0.1.52",
9
- "backlog.md-linux-arm64": "0.1.52",
10
- "backlog.md-darwin-x64": "0.1.52",
11
- "backlog.md-darwin-arm64": "0.1.52",
12
- "backlog.md-windows-x64": "0.1.52"
8
+ "blessed": "npm:neo-neo-bblessed@1.0.3"
13
9
  },
14
10
  "optionalDependencies": {
15
- "backlog.md-darwin-arm64": "*",
16
- "backlog.md-darwin-x64": "*",
17
- "backlog.md-linux-arm64": "*",
18
- "backlog.md-linux-x64": "*",
19
- "backlog.md-windows-x64": "*"
11
+ "backlog.md-linux-x64": "0.1.54",
12
+ "backlog.md-linux-arm64": "0.1.54",
13
+ "backlog.md-darwin-x64": "0.1.54",
14
+ "backlog.md-darwin-arm64": "0.1.54",
15
+ "backlog.md-windows-x64": "0.1.54"
20
16
  },
21
17
  "scripts": {
22
- "test": "bun test",
23
- "format": "biome format --write .",
24
- "lint": "biome lint --write .",
25
- "check": "biome check .",
26
- "build": "bun build --compile --minify --sourcemap --outfile=backlog src/cli.ts",
27
- "cli": "bun src/cli.ts"
18
+ "postuninstall": "node postuninstall.cjs"
28
19
  },
29
20
  "lint-staged": {
30
21
  "*.{ts,js,json}": [
@@ -60,6 +51,7 @@
60
51
  "files": [
61
52
  "cli.js",
62
53
  "resolveBinary.cjs",
54
+ "postuninstall.cjs",
63
55
  "package.json",
64
56
  "readme.md",
65
57
  "LICENSE"
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require("node:child_process");
4
+ const { getPackageName } = require("./resolveBinary.cjs");
5
+
6
+ // Platform-specific packages to uninstall
7
+ const platformPackages = [
8
+ "backlog.md-linux-x64",
9
+ "backlog.md-linux-arm64",
10
+ "backlog.md-darwin-x64",
11
+ "backlog.md-darwin-arm64",
12
+ "backlog.md-windows-x64",
13
+ ];
14
+
15
+ // Detect package manager
16
+ const packageManager = process.env.npm_config_user_agent?.split("/")[0] || "npm";
17
+
18
+ console.log("Cleaning up platform-specific packages...");
19
+
20
+ // Try to uninstall all platform packages
21
+ for (const pkg of platformPackages) {
22
+ const args = packageManager === "bun" ? ["remove", "-g", pkg] : ["uninstall", "-g", pkg];
23
+
24
+ const child = spawn(packageManager, args, {
25
+ stdio: "pipe", // Don't show output to avoid spam
26
+ windowsHide: true,
27
+ });
28
+
29
+ child.on("exit", (code) => {
30
+ if (code === 0) {
31
+ console.log(`✓ Cleaned up ${pkg}`);
32
+ }
33
+ // Silently ignore failures - package might not be installed
34
+ });
35
+ }
36
+
37
+ console.log("Platform package cleanup completed.");