fallow 2.30.0 → 2.31.0
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/README.md +3 -1
- package/bin/fallow-lsp +60 -0
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ Unused code, circular dependencies, code duplication, complexity hotspots, and a
|
|
|
14
14
|
npm install -g fallow
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
This installs the `fallow` CLI plus the companion `fallow-lsp` and `fallow-mcp` binaries.
|
|
18
|
+
|
|
17
19
|
## Usage
|
|
18
20
|
|
|
19
21
|
```bash
|
|
@@ -53,7 +55,7 @@ fallow dupes --save-baseline # Save current duplication as baseline
|
|
|
53
55
|
|
|
54
56
|
## Framework support
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
90 built-in plugins covering Next.js, Nuxt, Remix, Qwik, SvelteKit, Gatsby, Astro, Angular, NestJS, Expo Router, Vite, Webpack, Vitest, Jest, Playwright, Cypress, Storybook, ESLint, TypeScript, Tailwind, UnoCSS, Prisma, Drizzle, Convex, Turborepo, Hardhat, and many more. Auto-detected from your `package.json`.
|
|
57
59
|
|
|
58
60
|
## Configuration
|
|
59
61
|
|
package/bin/fallow-lsp
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require('child_process');
|
|
4
|
+
const { join } = require('path');
|
|
5
|
+
const { existsSync } = require('fs');
|
|
6
|
+
|
|
7
|
+
function getPlatformPackage() {
|
|
8
|
+
const platform = process.platform;
|
|
9
|
+
const arch = process.arch;
|
|
10
|
+
|
|
11
|
+
if (platform === 'win32' && arch === 'x64') {
|
|
12
|
+
return '@fallow-cli/win32-x64-msvc';
|
|
13
|
+
}
|
|
14
|
+
if (platform === 'darwin') {
|
|
15
|
+
return `@fallow-cli/darwin-${arch}`;
|
|
16
|
+
}
|
|
17
|
+
if (platform === 'linux') {
|
|
18
|
+
try {
|
|
19
|
+
const { familySync } = require('detect-libc');
|
|
20
|
+
const libc = familySync() === 'musl' ? 'musl' : 'gnu';
|
|
21
|
+
return `@fallow-cli/linux-${arch}-${libc}`;
|
|
22
|
+
} catch {
|
|
23
|
+
// musl binaries are statically linked and work on both glibc and musl systems
|
|
24
|
+
return `@fallow-cli/linux-${arch}-musl`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const pkg = getPlatformPackage();
|
|
32
|
+
|
|
33
|
+
if (!pkg) {
|
|
34
|
+
console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let binaryPath;
|
|
39
|
+
try {
|
|
40
|
+
const pkgDir = require.resolve(`${pkg}/package.json`);
|
|
41
|
+
const binaryName = process.platform === 'win32' ? 'fallow-lsp.exe' : 'fallow-lsp';
|
|
42
|
+
binaryPath = join(pkgDir, '..', binaryName);
|
|
43
|
+
} catch {
|
|
44
|
+
console.error(`Could not find ${pkg}. Run 'npm install' to install platform-specific binary.`);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!existsSync(binaryPath)) {
|
|
49
|
+
console.error(`Binary not found at ${binaryPath}`);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
execFileSync(binaryPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
55
|
+
} catch (e) {
|
|
56
|
+
if (e.status !== undefined) {
|
|
57
|
+
process.exit(e.status);
|
|
58
|
+
}
|
|
59
|
+
throw e;
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.31.0",
|
|
4
4
|
"description": "Codebase analyzer for TypeScript/JavaScript — unused code, circular dependencies, code duplication, complexity hotspots, and architecture boundary violations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"bin": {
|
|
28
28
|
"fallow": "bin/fallow",
|
|
29
|
+
"fallow-lsp": "bin/fallow-lsp",
|
|
29
30
|
"fallow-mcp": "bin/fallow-mcp"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
@@ -40,12 +41,12 @@
|
|
|
40
41
|
"detect-libc": "2.1.2"
|
|
41
42
|
},
|
|
42
43
|
"optionalDependencies": {
|
|
43
|
-
"@fallow-cli/darwin-arm64": "2.
|
|
44
|
-
"@fallow-cli/darwin-x64": "2.
|
|
45
|
-
"@fallow-cli/linux-x64-gnu": "2.
|
|
46
|
-
"@fallow-cli/linux-arm64-gnu": "2.
|
|
47
|
-
"@fallow-cli/linux-x64-musl": "2.
|
|
48
|
-
"@fallow-cli/linux-arm64-musl": "2.
|
|
49
|
-
"@fallow-cli/win32-x64-msvc": "2.
|
|
44
|
+
"@fallow-cli/darwin-arm64": "2.31.0",
|
|
45
|
+
"@fallow-cli/darwin-x64": "2.31.0",
|
|
46
|
+
"@fallow-cli/linux-x64-gnu": "2.31.0",
|
|
47
|
+
"@fallow-cli/linux-arm64-gnu": "2.31.0",
|
|
48
|
+
"@fallow-cli/linux-x64-musl": "2.31.0",
|
|
49
|
+
"@fallow-cli/linux-arm64-musl": "2.31.0",
|
|
50
|
+
"@fallow-cli/win32-x64-msvc": "2.31.0"
|
|
50
51
|
}
|
|
51
52
|
}
|