pretext-pdf 0.9.1 → 0.9.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/CHANGELOG.md CHANGED
@@ -7,6 +7,35 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/)
7
7
 
8
8
  ---
9
9
 
10
+ ## [0.9.2] — 2026-04-22
11
+
12
+ Maintenance release. Engine refresh + repo-hygiene automation. No runtime behavior changes beyond the `@chenglou/pretext` bump.
13
+
14
+ ### Changed
15
+
16
+ - **Bumped `@chenglou/pretext` to 0.0.6** (from 0.0.5). Brings two upstream improvements: (a) CJK text followed by opening-bracket annotations now wraps like browsers instead of leaving the opening bracket on the previous line (upstream PR #148), (b) native numeric `letterSpacing` support on `prepare()` and `prepareWithSegments()` (upstream PRs #108/#156). Our manual letterSpacing compensation in `src/measure-blocks.ts` and `src/rich-text.ts` continues to work unchanged — delegating to pretext's native path is tracked as Tier 1 follow-up in `docs/ROADMAP.md`. All 624 tests green, all 5 visual regression baselines green.
17
+
18
+ ### Fixed
19
+
20
+ - **README badges matched to reality**: `runtime-deps-7` → `runtime-deps-8` (there are 8 direct `dependencies`, not 7), `tests-600+` → `tests-624` (the full `npm test` chain runs 624 tests across 5 subsuites). Drift guarded by a new CI step; see below.
21
+
22
+ ### Added
23
+
24
+ - `scripts/verify-badges.js` + CI step — compares README shields.io badge values against `package.json` dep count and `npm test` total. Fails CI on drift. Fast path via `SKIP_TEST_RUN=1` for pre-commit use.
25
+ - `.github/workflows/release-on-tag.yml` — on `v*` tag push, auto-extracts the matching `## [X.Y.Z]` section from this file and creates the GitHub release. Closes the "tag exists but no release page" gap that affected v0.9.1.
26
+ - `renovate.json` — watches dependencies, auto-merges devDependency bumps that pass CI, opens PRs (without auto-merge) for runtime, peer, and `@chenglou/pretext` engine bumps. Closes the gap that left us one release behind upstream.
27
+
28
+ ### Removed
29
+
30
+ - `test/smoke-staging.test.ts` — exercised a non-existent `{ type: 'paragraph', footnote: {...} }` shape that the permissive validator silently accepted. False coverage. A strict validator rollout (rejecting unknown element properties) is the root fix and is tracked as a Tier 1 item in the rewritten `docs/ROADMAP.md`.
31
+ - `src/brain/` — inert auto-logger artifact (34 blank-body entries, no active writer). Never published to npm.
32
+
33
+ ### Docs
34
+
35
+ - `docs/ROADMAP.md` — complete rewrite as a living document (Now / Next / Under consideration / Shipped / History + Update discipline). The previous "master remediation plan" with phase-numbered sections was dropped: phases 0–5 all shipped by v0.9.1, and the document had rotted to the point of contradicting `package.json` on dependency pinning and `CHANGELOG.md` on what was live. History section preserves the prior plan's origin date and scope for reference.
36
+
37
+ ---
38
+
10
39
  ## [0.9.1] — 2026-04-21
11
40
 
12
41
  Bug-fix + hardening release. Ships the callout + rich-text rendering fixes from PR #2 together with PR #3's producer-validator contract around measured blocks.
package/README.md CHANGED
@@ -9,9 +9,9 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dw/pretext-pdf)](https://www.npmjs.com/package/pretext-pdf)
10
10
  [![CI](https://github.com/Himaan1998Y/pretext-pdf/actions/workflows/ci.yml/badge.svg)](https://github.com/Himaan1998Y/pretext-pdf/actions)
11
11
  [![TypeScript](https://img.shields.io/badge/typescript-strict-blue)](https://www.typescriptlang.org/)
12
- [![Tests](https://img.shields.io/badge/tests-600%2B-brightgreen)](#tests)
12
+ [![Tests](https://img.shields.io/badge/tests-624-brightgreen)](#tests)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
14
- [![Bundle](https://img.shields.io/badge/runtime%20deps-7-informational)](#runtime-footprint)
14
+ [![Bundle](https://img.shields.io/badge/runtime%20deps-8-informational)](#runtime-footprint)
15
15
 
16
16
  **[Live demo](https://himaan1998y.github.io/pretext-pdf/)**  ·  **[`pretext-pdf-mcp`](https://www.npmjs.com/package/pretext-pdf-mcp)** (MCP server)  ·  **[Migrating from pdfmake?](#migrating-from-pdfmake)**
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pretext-pdf",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Declarative JSON → PDF generation with professional typography. Built on pretext's precision text layout engine.",
5
5
  "keywords": [
6
6
  "pdf",
@@ -86,6 +86,8 @@
86
86
  "test:contract": "tsx --test test/pretext-api-contract.test.ts",
87
87
  "test:2f": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tsx --test test/phase-2f-stress.test.ts",
88
88
  "test": "npm run test:contract && npm run test:unit && npm run test:e2e && npm run test:phases && npm run test:2f",
89
+ "verify:badges": "cross-env SKIP_TEST_RUN=1 node scripts/verify-badges.js",
90
+ "verify:badges:full": "node scripts/verify-badges.js",
89
91
  "test:rich": "tsx --test test/rich-text.test.ts",
90
92
  "test:visual": "tsx --test test/visual/visual.test.ts",
91
93
  "test:visual:update": "cross-env UPDATE_BASELINES=1 tsx test/visual/visual.test.ts",
@@ -111,7 +113,7 @@
111
113
  },
112
114
  "dependencies": {
113
115
  "@cantoo/pdf-lib": "^2.6.5",
114
- "@chenglou/pretext": "^0.0.5",
116
+ "@chenglou/pretext": "^0.0.6",
115
117
  "@fontsource-variable/inter": "^5.2.8",
116
118
  "@fontsource/inter": "^5.0.0",
117
119
  "@pdf-lib/fontkit": "^1.1.1",
@@ -124,8 +126,8 @@
124
126
  "@signpdf/signpdf": "^3.3.0",
125
127
  "bwip-js": "^4.0.0",
126
128
  "highlight.js": "^11.0.0",
127
- "qrcode": "^1.5.0",
128
129
  "marked": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
130
+ "qrcode": "^1.5.0",
129
131
  "vega": "^5.0.0 || ^6.0.0",
130
132
  "vega-lite": "^5.0.0 || ^6.0.0"
131
133
  },