flagshark 1.4.0 → 2.0.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
@@ -50,7 +50,7 @@ flagshark scan [options]
50
50
 
51
51
  Scan options:
52
52
  --diff <ref> Only scan files changed since this git ref (e.g. main, HEAD~1)
53
- --threshold <months> Staleness age threshold (default: 6, or config.threshold)
53
+ --threshold <days> Staleness age threshold (default: 30, or config.threshold)
54
54
  --verbose Show all stale flags + effective exclude rules
55
55
 
56
56
  Output:
@@ -66,14 +66,14 @@ Configuration:
66
66
  Example invocations:
67
67
 
68
68
  ```bash
69
- # Scan current directory, default 6-month threshold
69
+ # Scan current directory, default 30-day threshold
70
70
  flagshark scan
71
71
 
72
72
  # Scan only files changed since main
73
73
  flagshark scan --diff main
74
74
 
75
75
  # Stricter threshold + JSON for piping
76
- flagshark scan --threshold 3 --json | jq '.staleFlags'
76
+ flagshark scan --threshold 7 --json | jq '.staleFlags'
77
77
 
78
78
  # Use a custom config file
79
79
  flagshark scan --config ./tooling/flagshark.yml
@@ -106,7 +106,7 @@ examples/
106
106
  ### `.flagshark.yml` — full config
107
107
 
108
108
  ```yaml
109
- threshold: 6
109
+ threshold: 30
110
110
 
111
111
  excludes:
112
112
  paths:
@@ -124,9 +124,9 @@ suppress:
124
124
 
125
125
  paths: # Per-path threshold overrides
126
126
  - match: 'src/critical/**'
127
- threshold: 3
127
+ threshold: 90 # stricter for critical code (days)
128
128
  - match: 'src/experimental/**'
129
- threshold: 12
129
+ threshold: 365 # looser for experiments (days)
130
130
  ```
131
131
 
132
132
  The unconditional baseline — `node_modules`, `.git`, `dist`, `build`, `coverage`, `__pycache__`, `vendor`, `.next`, `.turbo` — is always skipped.
@@ -173,7 +173,7 @@ Building a tool on top of the engine? Use [`@flagshark/core`](https://www.npmjs.
173
173
  ```ts
174
174
  import { scanRepo } from '@flagshark/core'
175
175
 
176
- const result = await scanRepo({ cwd: process.cwd(), threshold: 6 })
176
+ const result = await scanRepo({ cwd: process.cwd(), threshold: 30 })
177
177
  console.log(`${result.staleFlags.length} stale of ${result.totalFlags}`)
178
178
  ```
179
179
 
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ flagshark scan [options]
14
14
  Options:
15
15
  --json Output as JSON
16
16
  --diff <ref> Only scan files changed since <ref> (e.g., HEAD~1, main)
17
- --threshold <n> Staleness threshold in months (default: 6)
17
+ --threshold <n> Staleness threshold in days (default: 30)
18
18
  --verbose Show all stale flags (not just top 10)
19
19
  --help Show help
20
20
  --version Show version
@@ -82,7 +82,7 @@ function parseArgs(argv) {
82
82
  i++;
83
83
  args.threshold = parseInt(argv[i], 10);
84
84
  if (isNaN(args.threshold) || args.threshold < 1) {
85
- throw new Error("--threshold requires a positive integer (months)");
85
+ throw new Error("--threshold requires a positive integer (days)");
86
86
  }
87
87
  break;
88
88
  case "--verbose":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flagshark",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "description": "Find stale feature flags in your codebase",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "typecheck": "tsc --noEmit"
24
24
  },
25
25
  "dependencies": {
26
- "@flagshark/core": "1.4.0",
26
+ "@flagshark/core": "2.0.0",
27
27
  "yaml": "^2.4.0",
28
28
  "zod": "^3.23.0"
29
29
  },