v0.2.0 — production hardening + structural support
First post-initial release. All improvements driven by real-world deployment.
DOM-race hardening
- Null-safe
document.bodyaccess in extractor (was crashing mid-navigation) - Explicit
waitForFunction(() => document.body)before mutation observers attach - Body-existence guards inside observer + scroll scripts
Type-import alignment
import type { Page }now fromplaywright-core(wasplaywright)- Drops the cross-package nominal-type mismatch consumers had to cast through
- Peer dep flips
playwright→playwright-core - DOM lib added to tsconfig so arrow functions referencing
documenttype-check cleanly
Semantic table support
<table>recognized + rendered as GitHub-flavored markdown<thead>/ first-row-of-<th>treated as headers;<tbody>rows or direct<tr>walked- Pipes/newlines in cells escaped; rows padded to column count
- New
BodySegmentkind:{ kind: 'table', headers?, rows, caption? } - 200 rows × 30 cols cap for snapshot-size safety
Shadow DOM piercing
- Walks
el.shadowRoot.childrenbefore tag-specific handling - Open shadow roots only (closed ones are unreachable to script by browser design)
- Catches modern web components (Salesforce Lightning, MS 365, Lit/Polymer apps)
Iframe handling
- Same-origin iframes: walks
contentDocument.bodyinline - Cross-origin iframes: emits
[IFRAME:n]tag with src URL + title - New
IFRAME_OPEN/IFRAME_CLOSEboundary tags around inlined content
Build
typescriptadded to devDependenciesplaywright-coreadded to devDependencies (for build-time types)- CI uses
npm install(cross-platform compatible) instead ofnpm ci