@signaltree/guardrails 4.0.15 → 4.0.16
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/CHANGELOG.md +15 -0
- package/README.md +51 -0
- package/dist/factories/index.cjs +922 -0
- package/dist/factories/index.cjs.map +1 -0
- package/dist/factories/index.d.cts +48 -0
- package/dist/factories/index.d.ts +48 -0
- package/dist/factories/index.js +914 -0
- package/dist/factories/index.js.map +1 -0
- package/dist/index.cjs +783 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +780 -0
- package/dist/index.js.map +1 -0
- package/dist/noop.cjs +31 -0
- package/dist/noop.cjs.map +1 -0
- package/dist/noop.d.cts +19 -0
- package/dist/noop.d.ts +19 -0
- package/dist/noop.js +28 -0
- package/dist/noop.js.map +1 -0
- package/dist/types-DfZ9n1yX.d.cts +255 -0
- package/dist/types-DfZ9n1yX.d.ts +255 -0
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @signaltree/guardrails Changelog
|
|
2
|
+
|
|
3
|
+
## 1.1.0 (2025-11-12)
|
|
4
|
+
|
|
5
|
+
- Added recomputation tracking, percentile reporting, and diff ratio analysis
|
|
6
|
+
- Implemented memory-leak heuristics, hot-path sampling, and guardrails disposal API
|
|
7
|
+
- Introduced factory helpers (`createFeatureTree`, `createPerformanceTree`, etc.)
|
|
8
|
+
- Integrated guardrails into release automation, bundle analysis, and coverage scripts
|
|
9
|
+
- Published comprehensive documentation set (migration guide, troubleshooting, limitations)
|
|
10
|
+
|
|
11
|
+
## 1.0.0 (2025-10-??)
|
|
12
|
+
|
|
13
|
+
- Initial release with core budgets, hot-path detection, and custom rule engine
|
|
14
|
+
- Dev-only exports to guarantee zero production overhead
|
|
15
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @signaltree/guardrails
|
|
2
|
+
|
|
3
|
+
> Development-only performance monitoring and anti-pattern detection for SignalTree
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ✅ **Zero production cost** - Dev-only via conditional exports
|
|
8
|
+
- ✅ **Performance budgets** - Update time, memory, recomputations
|
|
9
|
+
- ✅ **Hot path analysis** - Automatic detection with heat scores
|
|
10
|
+
- ✅ **Memory leak detection** - Retention and growth tracking
|
|
11
|
+
- ✅ **Custom rules engine** - Team-specific policies
|
|
12
|
+
- ✅ **Intent-aware suppression** - Smart noise reduction
|
|
13
|
+
- ✅ **Percentile reporting** - P50/P95/P99 metrics
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install --save-dev @signaltree/guardrails
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { signalTree } from '@signaltree/core';
|
|
25
|
+
import { withGuardrails } from '@signaltree/guardrails';
|
|
26
|
+
|
|
27
|
+
const tree = signalTree({ count: 0 }).with(withGuardrails({
|
|
28
|
+
budgets: { maxUpdateTime: 16 },
|
|
29
|
+
hotPaths: { threshold: 10 },
|
|
30
|
+
}));
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Using Factories
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { signalTree } from '@signaltree/core';
|
|
37
|
+
import { createFeatureTree } from '@signaltree/guardrails/factories';
|
|
38
|
+
|
|
39
|
+
const tree = createFeatureTree(signalTree, { data: [] }, {
|
|
40
|
+
name: 'dashboard',
|
|
41
|
+
guardrails: true,
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
See [docs/guardrails](../../docs/guardrails) for complete documentation.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|