footprintjs 6.1.1 → 6.1.2
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 +19 -0
- package/dist/esm/package.json +1 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
<a href="https://github.com/footprintjs/footPrint/actions"><img src="https://github.com/footprintjs/footPrint/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
10
10
|
<!-- coverage-badge --><img src="https://img.shields.io/badge/coverage-93%25-brightgreen.svg" alt="coverage: 93%"><!-- /coverage-badge -->
|
|
11
11
|
<a href="https://www.npmjs.com/package/footprintjs"><img src="https://img.shields.io/npm/v/footprintjs.svg?style=flat" alt="npm version"></a>
|
|
12
|
+
<a href="https://bundlephobia.com/package/footprintjs"><img src="https://img.shields.io/bundlephobia/minzip/footprintjs?label=minzipped" alt="minzipped size"></a>
|
|
13
|
+
<a href="#tree-shakeable--esm-first"><img src="https://img.shields.io/badge/tree--shakeable-%E2%9C%93-success?style=flat" alt="tree-shakeable"></a>
|
|
12
14
|
<a href="https://github.com/footprintjs/footPrint/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"></a>
|
|
13
15
|
<a href="https://www.npmjs.com/package/footprintjs"><img src="https://img.shields.io/npm/dm/footprintjs.svg" alt="Downloads"></a>
|
|
14
16
|
<a href="https://footprintjs.github.io/footprint-playground/samples/llm-agent-tool"><img src="https://img.shields.io/badge/Try_with_LLM-Live_Demo-7c6cf0?style=flat" alt="Try with LLM"></a>
|
|
@@ -170,6 +172,23 @@ The LLM calls the tool, gets back the decision and causal trace, and explains th
|
|
|
170
172
|
|
|
171
173
|
---
|
|
172
174
|
|
|
175
|
+
## Tree-shakeable & ESM-first
|
|
176
|
+
|
|
177
|
+
Import one thing, ship one thing. footprintjs is built so your bundle grows only with what you actually use:
|
|
178
|
+
|
|
179
|
+
- **Dual build, true ESM.** Ships CommonJS (`require`) **and** real ECMAScript Modules (`import`) with TypeScript types. The ESM build is marked `type:module` and every internal import carries an explicit `.js` extension, so it loads as true ESM under Node, Vite, Next, Deno, and Bun — no compatibility shims.
|
|
180
|
+
- **Per-file modules + `sideEffects:false`.** The dist is emitted file-by-file (never pre-bundled) and declares zero side effects, so bundlers can drop every export you don't touch.
|
|
181
|
+
- **Subpath exports.** Pull execution tracing from `footprintjs/trace`, fire-and-forget children from `footprintjs/detach`, engine internals from `footprintjs/advanced` — each is independently tree-shakeable.
|
|
182
|
+
|
|
183
|
+
**Proven, not promised.** A CI smoke test bundles a minimal `import { flowChart } from 'footprintjs'` and asserts the recorder, detach, and trace layers are pruned — your flowchart core doesn't drag them in. See [`test/esm-packaging.test.ts`](test/esm-packaging.test.ts).
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
// Only flowChart? The recorder/detach/trace layers are tree-shaken away.
|
|
187
|
+
import { flowChart } from 'footprintjs';
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
173
192
|
## Dev Mode
|
|
174
193
|
|
|
175
194
|
footprintjs ships with developer-only diagnostics that are OFF in production (zero overhead). Turn them on during development to catch mistakes early:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "footprintjs",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"description": "Explainable backend flows — automatic causal traces, decision evidence, and MCP tool generation for AI agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sanjay Krishna Anbalagan",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"clean": "rm -rf build/* coverage dist node_modules package-lock.json",
|
|
42
|
-
"build": "tsc && tsc -p tsconfig.esm.json",
|
|
42
|
+
"build": "tsc && tsc -p tsconfig.esm.json && node scripts/postbuild-esm.mjs",
|
|
43
43
|
"prepare": "husky",
|
|
44
44
|
"watch": "tsc -w",
|
|
45
45
|
"test": "vitest run",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"@typescript-eslint/parser": "^5.61.0",
|
|
118
118
|
"@vitest/coverage-v8": "^4.1.8",
|
|
119
119
|
"concurrently": "^8.0.1",
|
|
120
|
+
"esbuild": "^0.28.0",
|
|
120
121
|
"eslint": "^8.44.0",
|
|
121
122
|
"eslint-config-prettier": "^6.15.0",
|
|
122
123
|
"eslint-config-standard": "^17.0.0",
|