Skip to content

v0.2.0 — production hardening + structural support

Latest

Choose a tag to compare

@rrader26 rrader26 released this 26 Apr 22:15
· 97 commits to main since this release
bd208e5

v0.2.0 — production hardening + structural support

First post-initial release. All improvements driven by real-world deployment.

DOM-race hardening

  • Null-safe document.body access 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 from playwright-core (was playwright)
  • Drops the cross-package nominal-type mismatch consumers had to cast through
  • Peer dep flips playwrightplaywright-core
  • DOM lib added to tsconfig so arrow functions referencing document type-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 BodySegment kind: { kind: 'table', headers?, rows, caption? }
  • 200 rows × 30 cols cap for snapshot-size safety

Shadow DOM piercing

  • Walks el.shadowRoot.children before 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.body inline
  • Cross-origin iframes: emits [IFRAME:n] tag with src URL + title
  • New IFRAME_OPEN / IFRAME_CLOSE boundary tags around inlined content

Build

  • typescript added to devDependencies
  • playwright-core added to devDependencies (for build-time types)
  • CI uses npm install (cross-platform compatible) instead of npm ci