@bilig/xlsx-formula-recalc 0.129.2 → 0.130.1

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.
Files changed (2) hide show
  1. package/README.md +43 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -4,17 +4,14 @@ Diagnose stale cached XLSX formula values in Node and CI, then recalculate the
4
4
  cells your service actually reads without Excel, LibreOffice, or browser
5
5
  automation.
6
6
 
7
- This is the canonical scoped Bilig package for the high-friction Node XLSX
8
- workflow: a file library edits workbook bytes, but the formula cells still carry
9
- old cached values. Start with the cache doctor when you do not know which cells
10
- are stale. Use recalculation after the detector points at the cells that matter.
7
+ This package is for the high-friction Node XLSX workflow: a file library edits
8
+ workbook bytes, but the formula cells still carry old cached values. Start with
9
+ the cache doctor when you do not know which cells are stale. Use recalculation
10
+ after the detector points at the cells that matter.
11
11
 
12
12
  It fits `xlsx-populate`, SheetJS / `xlsx`, template-generation, GitHub Actions,
13
13
  and backend file pipelines where stale readback is worse than a hard failure.
14
14
 
15
- The unscoped `xlsx-formula-recalc` package remains published as a compatibility
16
- and search alias.
17
-
18
15
  ## Try The Cache Doctor First
19
16
 
20
17
  Run the no-project demo:
@@ -27,6 +24,7 @@ Expected shape:
27
24
 
28
25
  ```json
29
26
  {
27
+ "schemaVersion": "xlsx-cache-doctor.v1",
30
28
  "formulaCellCount": 1,
31
29
  "inspectedFormulaCellCount": 1,
32
30
  "uninspectedFormulaCellCount": 0,
@@ -56,6 +54,15 @@ Expected shape:
56
54
  The JSON is meant for CI and agents. It does not include star, release-watch, or
57
55
  discussion links.
58
56
 
57
+ If a coding agent needs to edit workbook state instead of only inspecting XLSX
58
+ bytes, do not automate Excel or a browser grid. Run the headless proof:
59
+
60
+ ```sh
61
+ npm exec --package @bilig/workpaper@latest -- bilig-mcp-challenge --json
62
+ ```
63
+
64
+ Then use the [agent MCP evaluator](https://proompteng.github.io/bilig/eval-agent-mcp.html).
65
+
59
66
  Use `cacheStatusSummary` and per-formula `cacheStatus` to separate confirmed
60
67
  stale caches from missing cached values or formulas without a comparable
61
68
  recalculated value.
@@ -128,6 +135,7 @@ the JSON includes the skipped count as `uninspectedFormulaCellCount`.
128
135
 
129
136
  ```json
130
137
  {
138
+ "schemaVersion": "xlsx-cache-doctor.v1",
131
139
  "formulaCellCount": 12,
132
140
  "inspectedFormulaCellCount": 12,
133
141
  "uninspectedFormulaCellCount": 0,
@@ -219,6 +227,30 @@ run
219
227
 
220
228
  ## API
221
229
 
230
+ Use `inspectXlsxCache` when a service or test runner needs the cache-doctor
231
+ report without shelling out to the CLI:
232
+
233
+ ```ts
234
+ import { readFile } from 'node:fs/promises'
235
+ import { inspectXlsxCache } from '@bilig/xlsx-formula-recalc'
236
+
237
+ const report = inspectXlsxCache(await readFile('pricing.xlsx'), {
238
+ fileName: 'pricing.xlsx',
239
+ })
240
+
241
+ if (report.staleCachedFormulaCount > 0) {
242
+ throw new Error(
243
+ report.formulas
244
+ .filter((formula) => formula.cacheStatus === 'stale')
245
+ .map((formula) => formula.target)
246
+ .join(', '),
247
+ )
248
+ }
249
+ ```
250
+
251
+ The API returns the same `schemaVersion`, `cacheStatusSummary`, per-formula
252
+ `cacheStatus`, and `suggestedReads` fields as the JSON CLI report.
253
+
222
254
  ```ts
223
255
  import { recalculateXlsx } from '@bilig/xlsx-formula-recalc'
224
256
 
@@ -296,3 +328,7 @@ external workbook links, macros, and volatile functions may need review. Import
296
328
  warnings are returned in `result.warnings`.
297
329
 
298
330
  Full docs: <https://proompteng.github.io/bilig/xlsx-formula-recalculation-node.html>
331
+
332
+ Compatibility note: the unscoped `xlsx-formula-recalc` package remains
333
+ published as a search and migration alias. Use `@bilig/xlsx-formula-recalc` in
334
+ new projects.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bilig/xlsx-formula-recalc",
3
- "version": "0.129.2",
3
+ "version": "0.130.1",
4
4
  "description": "Diagnose stale cached XLSX formula values and recalculate XLSX formulas in Node.js without Excel, LibreOffice, or browser automation.",
5
5
  "keywords": [
6
6
  "bilig",
@@ -71,7 +71,7 @@
71
71
  "smoke": "node ./dist/cli.js --help"
72
72
  },
73
73
  "dependencies": {
74
- "xlsx-formula-recalc": "0.129.2"
74
+ "xlsx-formula-recalc": "0.130.1"
75
75
  },
76
76
  "engines": {
77
77
  "node": ">=22.0.0"