Skip to content

Commit 81b8bf2

Browse files
authored
refactor: extract shared utilities to reduce duplication (#85)
1 parent 2bcf0f3 commit 81b8bf2

17 files changed

Lines changed: 585 additions & 1878 deletions

File tree

.github/snippets/package-stats.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### Package Size
2+
3+
| Metric | Value |
4+
|---|---|
5+
| **npm tarball** | **91.8 kB** |
6+
| Unpacked | 341.8 kB |
7+
| Files | 117 |
8+
| JS (`.mjs`) | 81.6 kB |
9+
| Types (`.d.mts`) | 52.3 kB |
10+
| Sourcemaps (`.map`) | 173.1 kB |
11+
12+
### Import Cost Per Entry Point
13+
14+
What users actually pay when importing a specific path (after tree-shaking):
15+
16+
| Import | Raw | Gzip | Includes |
17+
|---|---|---|---|
18+
| `evlog` | 14.6 kB | **5.4 kB** | index + logger + error + utils |
19+
| `evlog/axiom` | 4.5 kB | **2.0 kB** | axiom + _http |
20+
| `evlog/better-stack` | 4.7 kB | **2.1 kB** | better-stack + _http |
21+
| `evlog/otlp` | 7.9 kB | **3.2 kB** | otlp + _http + _severity |
22+
| `evlog/sentry` | 8.4 kB | **3.5 kB** | sentry + _http + _severity |
23+
| `evlog/posthog` | 12.2 kB | **4.6 kB** | posthog + otlp + _http + _severity |
24+
| `evlog/pipeline` | 4.2 kB | **1.4 kB** | pipeline |
25+
| `evlog/enrichers` | 6.1 kB | **1.9 kB** | enrichers |
26+
| `evlog/browser` | 2.9 kB | **1.2 kB** | browser |
27+
| `evlog/workers` | 2.1 kB | **965 B** | workers |
28+
29+
### Shared Chunks
30+
31+
Internal modules deduplicated across entry points:
32+
33+
| Chunk | Size | Gzip | Used by |
34+
|---|---|---|---|
35+
| `_http` | 2.1 kB | 1014 B | all 5 adapters |
36+
| `_severity` | 332 B | 257 B | otlp, sentry |
37+
| `nitro` | 2.4 kB | 1.0 kB | nitro v2/v3 plugins + error handlers |
38+
39+
### Typical Setup Cost
40+
41+
| Scenario | Raw | Gzip |
42+
|---|---|---|
43+
| Core + 1 adapter + pipeline | 23.2 kB | **8.8 kB** |
44+
| Core + 2 adapters + pipeline | 29.5 kB | **11.3 kB** |
45+
| All 5 adapters (no core) | 23.1 kB | **9.0 kB** |
46+
47+
---
48+
49+
*Generated on 2026-02-15 from `dist/` — run `bash scripts/package-stats.sh` to update.*

.github/workflows/code-simplifier.lock.yml

Lines changed: 0 additions & 1128 deletions
This file was deleted.

0 commit comments

Comments
 (0)