fallow 2.47.0 → 2.48.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 CHANGED
@@ -13,10 +13,20 @@ Static analysis is free and open source. Runtime intelligence is the paid team l
13
13
  ## Installation
14
14
 
15
15
  ```bash
16
- npm install -g fallow
16
+ npm install --save-dev fallow # or: pnpm add -D fallow / yarn add -D fallow / bun add -d fallow
17
17
  ```
18
18
 
19
- This installs the `fallow` CLI plus the companion `fallow-lsp` and `fallow-mcp` binaries.
19
+ Installs the `fallow` CLI plus the companion `fallow-lsp` and `fallow-mcp` binaries in your project.
20
+
21
+ The package also ships a version-matched Agent Skill under `skills/fallow`.
22
+ TanStack Intent discovers it from `node_modules` automatically:
23
+
24
+ ```bash
25
+ npx @tanstack/intent list
26
+ npx @tanstack/intent load fallow#fallow
27
+ ```
28
+
29
+ For one-off CLI use without project-local skill discovery, run `npx fallow`.
20
30
 
21
31
  ## Usage
22
32
 
package/bin/fallow CHANGED
@@ -3,32 +3,21 @@
3
3
  const { execFileSync } = require('child_process');
4
4
  const { join } = require('path');
5
5
  const { existsSync } = require('fs');
6
+ const { getPlatformPackage } = require('../scripts/platform-package');
6
7
 
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
- }
8
+ const pkg = (() => {
9
+ if (process.platform !== 'linux') {
10
+ return getPlatformPackage(process.platform, process.arch);
26
11
  }
27
12
 
28
- return null;
29
- }
30
-
31
- const pkg = getPlatformPackage();
13
+ try {
14
+ const { familySync } = require('detect-libc');
15
+ return getPlatformPackage(process.platform, process.arch, familySync());
16
+ } catch {
17
+ // musl binaries are statically linked and work on both glibc and musl systems
18
+ return getPlatformPackage(process.platform, process.arch, 'musl');
19
+ }
20
+ })();
32
21
 
33
22
  if (!pkg) {
34
23
  console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
package/bin/fallow-lsp CHANGED
@@ -3,32 +3,21 @@
3
3
  const { execFileSync } = require('child_process');
4
4
  const { join } = require('path');
5
5
  const { existsSync } = require('fs');
6
+ const { getPlatformPackage } = require('../scripts/platform-package');
6
7
 
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
- }
8
+ const pkg = (() => {
9
+ if (process.platform !== 'linux') {
10
+ return getPlatformPackage(process.platform, process.arch);
26
11
  }
27
12
 
28
- return null;
29
- }
30
-
31
- const pkg = getPlatformPackage();
13
+ try {
14
+ const { familySync } = require('detect-libc');
15
+ return getPlatformPackage(process.platform, process.arch, familySync());
16
+ } catch {
17
+ // musl binaries are statically linked and work on both glibc and musl systems
18
+ return getPlatformPackage(process.platform, process.arch, 'musl');
19
+ }
20
+ })();
32
21
 
33
22
  if (!pkg) {
34
23
  console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
package/bin/fallow-mcp CHANGED
@@ -3,32 +3,21 @@
3
3
  const { execFileSync } = require('child_process');
4
4
  const { join } = require('path');
5
5
  const { existsSync } = require('fs');
6
+ const { getPlatformPackage } = require('../scripts/platform-package');
6
7
 
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
- }
8
+ const pkg = (() => {
9
+ if (process.platform !== 'linux') {
10
+ return getPlatformPackage(process.platform, process.arch);
26
11
  }
27
12
 
28
- return null;
29
- }
30
-
31
- const pkg = getPlatformPackage();
13
+ try {
14
+ const { familySync } = require('detect-libc');
15
+ return getPlatformPackage(process.platform, process.arch, familySync());
16
+ } catch {
17
+ // musl binaries are statically linked and work on both glibc and musl systems
18
+ return getPlatformPackage(process.platform, process.arch, 'musl');
19
+ }
20
+ })();
32
21
 
33
22
  if (!pkg) {
34
23
  console.error(`Unsupported platform: ${process.platform}-${process.arch}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fallow",
3
- "version": "2.47.0",
3
+ "version": "2.48.0",
4
4
  "description": "Codebase intelligence for TypeScript and JavaScript. Finds unused code, duplication, circular dependencies, complexity hotspots, and architecture drift. Optional runtime intelligence layer (Fallow Runtime) adds production execution evidence. Rust-native, sub-second, 90 framework plugins.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -11,6 +11,11 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/fallow-rs/fallow/issues"
13
13
  },
14
+ "intent": {
15
+ "version": 1,
16
+ "repo": "fallow-rs/fallow",
17
+ "docs": "https://docs.fallow.tools"
18
+ },
14
19
  "keywords": [
15
20
  "unused-code",
16
21
  "circular-dependencies",
@@ -19,7 +24,9 @@
19
24
  "analyzer",
20
25
  "typescript",
21
26
  "javascript",
22
- "static-analysis"
27
+ "static-analysis",
28
+ "agent-skills",
29
+ "tanstack-intent"
23
30
  ],
24
31
  "engines": {
25
32
  "node": ">=16"
@@ -32,21 +39,28 @@
32
39
  "files": [
33
40
  "bin",
34
41
  "scripts",
42
+ "skills",
43
+ "!skills/_artifacts",
35
44
  "README.md"
36
45
  ],
37
46
  "scripts": {
38
- "postinstall": "node scripts/postinstall.js"
47
+ "postinstall": "node scripts/postinstall.js",
48
+ "test:platform": "node --test scripts/platform-package.test.js"
39
49
  },
40
50
  "dependencies": {
41
51
  "detect-libc": "2.1.2"
42
52
  },
53
+ "devDependencies": {
54
+ "@tanstack/intent": "0.0.29"
55
+ },
43
56
  "optionalDependencies": {
44
- "@fallow-cli/darwin-arm64": "2.47.0",
45
- "@fallow-cli/darwin-x64": "2.47.0",
46
- "@fallow-cli/linux-x64-gnu": "2.47.0",
47
- "@fallow-cli/linux-arm64-gnu": "2.47.0",
48
- "@fallow-cli/linux-x64-musl": "2.47.0",
49
- "@fallow-cli/linux-arm64-musl": "2.47.0",
50
- "@fallow-cli/win32-x64-msvc": "2.47.0"
57
+ "@fallow-cli/darwin-arm64": "2.48.0",
58
+ "@fallow-cli/darwin-x64": "2.48.0",
59
+ "@fallow-cli/linux-x64-gnu": "2.48.0",
60
+ "@fallow-cli/linux-arm64-gnu": "2.48.0",
61
+ "@fallow-cli/linux-x64-musl": "2.48.0",
62
+ "@fallow-cli/linux-arm64-musl": "2.48.0",
63
+ "@fallow-cli/win32-arm64-msvc": "2.48.0",
64
+ "@fallow-cli/win32-x64-msvc": "2.48.0"
51
65
  }
52
66
  }
@@ -0,0 +1,28 @@
1
+ function getPlatformPackage(platform, arch, libcFamily) {
2
+ if (platform === 'win32') {
3
+ if (arch === 'x64') return '@fallow-cli/win32-x64-msvc';
4
+ if (arch === 'arm64') return '@fallow-cli/win32-arm64-msvc';
5
+ return null;
6
+ }
7
+
8
+ if (platform === 'darwin') {
9
+ if (arch === 'x64' || arch === 'arm64') {
10
+ return `@fallow-cli/darwin-${arch}`;
11
+ }
12
+ return null;
13
+ }
14
+
15
+ if (platform === 'linux') {
16
+ const libc = libcFamily === 'musl' ? 'musl' : 'gnu';
17
+ if (arch === 'x64' || arch === 'arm64') {
18
+ return `@fallow-cli/linux-${arch}-${libc}`;
19
+ }
20
+ return null;
21
+ }
22
+
23
+ return null;
24
+ }
25
+
26
+ module.exports = {
27
+ getPlatformPackage,
28
+ };
@@ -0,0 +1,26 @@
1
+ const test = require('node:test');
2
+ const assert = require('node:assert/strict');
3
+
4
+ const { getPlatformPackage } = require('./platform-package');
5
+
6
+ test('maps Windows x64 and arm64 to MSVC packages', () => {
7
+ assert.equal(getPlatformPackage('win32', 'x64'), '@fallow-cli/win32-x64-msvc');
8
+ assert.equal(getPlatformPackage('win32', 'arm64'), '@fallow-cli/win32-arm64-msvc');
9
+ });
10
+
11
+ test('maps Linux packages with libc awareness', () => {
12
+ assert.equal(getPlatformPackage('linux', 'x64', 'gnu'), '@fallow-cli/linux-x64-gnu');
13
+ assert.equal(getPlatformPackage('linux', 'arm64', 'musl'), '@fallow-cli/linux-arm64-musl');
14
+ assert.equal(getPlatformPackage('linux', 'arm64'), '@fallow-cli/linux-arm64-gnu');
15
+ });
16
+
17
+ test('maps macOS packages by architecture', () => {
18
+ assert.equal(getPlatformPackage('darwin', 'x64'), '@fallow-cli/darwin-x64');
19
+ assert.equal(getPlatformPackage('darwin', 'arm64'), '@fallow-cli/darwin-arm64');
20
+ });
21
+
22
+ test('returns null for unsupported targets', () => {
23
+ assert.equal(getPlatformPackage('win32', 'ia32'), null);
24
+ assert.equal(getPlatformPackage('linux', 'ppc64'), null);
25
+ assert.equal(getPlatformPackage('freebsd', 'x64'), null);
26
+ });
@@ -1,28 +1,17 @@
1
- // Verify the correct platform-specific package was installed
2
- function getPlatformPackage() {
3
- const platform = process.platform;
4
- const arch = process.arch;
1
+ const { getPlatformPackage } = require('./platform-package');
5
2
 
6
- if (platform === 'win32' && arch === 'x64') {
7
- return '@fallow-cli/win32-x64-msvc';
8
- }
9
- if (platform === 'darwin') {
10
- return `@fallow-cli/darwin-${arch}`;
11
- }
12
- if (platform === 'linux') {
13
- try {
14
- const { familySync } = require('detect-libc');
15
- const libc = familySync() === 'musl' ? 'musl' : 'gnu';
16
- return `@fallow-cli/linux-${arch}-${libc}`;
17
- } catch {
18
- return `@fallow-cli/linux-${arch}-gnu`;
19
- }
3
+ const pkg = (() => {
4
+ if (process.platform !== 'linux') {
5
+ return getPlatformPackage(process.platform, process.arch);
20
6
  }
21
7
 
22
- return null;
23
- }
24
-
25
- const pkg = getPlatformPackage();
8
+ try {
9
+ const { familySync } = require('detect-libc');
10
+ return getPlatformPackage(process.platform, process.arch, familySync());
11
+ } catch {
12
+ return getPlatformPackage(process.platform, process.arch);
13
+ }
14
+ })();
26
15
 
27
16
  if (!pkg) {
28
17
  console.warn(