optiprune 2.1.7 → 2.1.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.
Files changed (2) hide show
  1. package/bin/runner.js +25 -25
  2. package/package.json +3 -11
package/bin/runner.js CHANGED
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env node
2
- import { createRequire } from "node:module";
3
- import { fileURLToPath, pathToFileURL } from "node:url";
4
- import path from "pathe";
5
-
6
- const require = createRequire(import.meta.url);
7
-
8
- let cliPath;
9
-
10
- try {
11
- // 1. Try standard package resolution
12
- const pkgPath = require.resolve("@optiprune/cli/package.json");
13
- cliPath = path.join(path.dirname(pkgPath), "dist/cli.js");
14
- } catch {
15
- // 2. Monorepo / global symlink fallback
16
- const currentDir = path.dirname(fileURLToPath(import.meta.url));
17
- cliPath = path.resolve(currentDir, "../../cli/dist/cli.js");
18
- }
19
-
20
- // Convert absolute Windows path (E:\...) into a valid file:// URL
21
- const cliUrl = pathToFileURL(cliPath).href;
22
-
23
- import(cliUrl).catch((err) => {
24
- console.error("Failed to execute @optiprune/cli:", err);
25
- process.exit(1);
1
+ #!/usr/bin/env node
2
+ import { createRequire } from "node:module";
3
+ import { fileURLToPath, pathToFileURL } from "node:url";
4
+ import path from "pathe";
5
+
6
+ const require = createRequire(import.meta.url);
7
+
8
+ let cliPath;
9
+
10
+ try {
11
+ // 1. Try standard package resolution
12
+ const pkgPath = require.resolve("@optiprune/cli/package.json");
13
+ cliPath = path.join(path.dirname(pkgPath), "dist/cli.js");
14
+ } catch {
15
+ // 2. Monorepo / global symlink fallback
16
+ const currentDir = path.dirname(fileURLToPath(import.meta.url));
17
+ cliPath = path.resolve(currentDir, "../../cli/dist/cli.js");
18
+ }
19
+
20
+ // Convert absolute Windows path (E:\...) into a valid file:// URL
21
+ const cliUrl = pathToFileURL(cliPath).href;
22
+
23
+ import(cliUrl).catch((err) => {
24
+ console.error("Failed to execute @optiprune/cli:", err);
25
+ process.exit(1);
26
26
  });
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "optiprune",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "Resilient static dead-code analyzer for TypeScript and JavaScript workspaces.",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
7
- "types": "./dist/cli.d.ts",
8
7
  "homepage": "https://opti.drml.int.yt/",
9
8
  "repository": {
10
9
  "type": "git",
@@ -52,19 +51,13 @@
52
51
  "bin": {
53
52
  "optiprune": "./bin/runner.js"
54
53
  },
55
- "exports": {
56
- ".": {
57
- "types": "./dist/cli.d.ts",
58
- "import": "./dist/cli.js"
59
- }
60
- },
61
54
  "files": [
62
55
  "bin",
63
56
  "README.md",
64
57
  "LICENSE"
65
58
  ],
66
59
  "dependencies": {
67
- "@optiprune/cli": "^1.2.8",
60
+ "@optiprune/cli": "^1.2.9",
68
61
  "pathe": "2.0.3"
69
62
  },
70
63
  "engines": {
@@ -72,8 +65,7 @@
72
65
  },
73
66
  "license": "MIT",
74
67
  "directories": {
75
- "doc": "docs",
76
- "test": "tests"
68
+ "doc": "docs"
77
69
  },
78
70
  "author": "DreamLongYT"
79
71
  }