Skip to content

Take the renderer's 6.13.0, and keep the call its readme now gets wrong - #1

Merged
andiwand merged 1 commit into
mainfrom
bump-odr-core-6.13.0
Sep 4, 2026
Merged

Take the renderer's 6.13.0, and keep the call its readme now gets wrong#1
andiwand merged 1 commit into
mainfrom
bump-odr-core-6.13.0

Conversation

@andiwand

@andiwand andiwand commented Sep 4, 2026

Copy link
Copy Markdown
Member

@opendocument/odr-core 6.12.0 → 6.13.0.

Nothing new to call

The JavaScript surface did not move. Against the two tarballs, index.js, odr-core.mjs and index.d.ts are byte-identical, and loading both and comparing enums and fileTypes() gives no difference — no new formats, no new HtmlConfig option, no new binding. So there is no feature here to adopt; the version bump is the adoption.

What we get anyway

The wasm grew ~184 KB, and the change is in what it renders. Diffing the html for public/sample.odt between the two:

  • Type stops being scaled twice on a phone. The rendered page now probes whether the engine honours text-size-adjust under a css zoom, and where it does, restates the zoom as a percentage so a paged document's text holds the box it was fitted to. Also applied under @media print.
  • Table cells start at the top. td{vertical-align:top} — Word and ODF put a cell's content at its top where the browser default centres it.

Both arrive just by opening a document. Nothing on this side opts in.

The readme regression

The only other change in the package is its README, and it changed to something untrue:

-doc.edit(JSON.stringify(iframe.contentWindow.odr.generateDiff()));
+// `generateDiff()` returns the json already; stringifying it again is a string
+// where `edit` wants an object, and it throws.
+doc.edit(iframe.contentWindow.odr.generateDiff());

That is backwards. edit binds to a std::string, so the object is what throws — checked by driving both versions directly:

6.12.0 6.13.0
edit(JSON.stringify(diff)) applies, saves applies, saves
edit(diff) BindingError: Cannot pass non-string to std::string BindingError: Cannot pass non-string to std::string

index.d.ts agrees with the behaviour, not the readme: edit(diff: string).

saveDocument already passes a string and is correct, so the code does not change — but it now carries a comment saying why, because someone reading that readme will otherwise come here and "fix" it, and that breaks saving an edited document. Worth reporting upstream.

Verified

  • npm run build and astro check clean (0 errors/warnings/hints).
  • scripts/sync-odr.mjs emits public/odr/6.13.0/ and the forwarder points at it; the version reaches the bundle via __ODR_VERSION__.
  • Against the built and served site, not the tarball: sample.odt opens and renders, and a diff in the exact shape viewer.ts sends applies, saves, and the edit is still there when the saved bytes are reopened. No console errors.
  • Restored the "license": "MPL-2.0" line npm dropped from the lock entry — registry metadata for a package published hours ago, the license is unchanged in both.

🤖 Generated with Claude Code

https://claude.ai/code/session_019JsBLdSBxzmHFQ4CFDiknj

The engine's javascript surface did not move: `index.js`, `odr-core.mjs` and
`index.d.ts` are byte-identical to 6.12.0, and `fileTypes()` and the enum
tables come back the same, so there is no binding here to start calling. What
grew is the wasm, and what it renders - paged content restates its zoom as a
`text-size-adjust` percentage, so a phone stops scaling the type a second time
over the box it was fitted to, and a table cell starts at its top the way word
and odf say it should rather than at the browser's centre. Both arrive by
opening a document; nothing on this side opts in.

The one thing that did change in the package is its readme, and it changed to
something untrue: it now says `generateDiff()` returns json already and that
`edit` wants that object, not a string. The binding underneath is a
`std::string`, in 6.13.0 as in 6.12.0 - an object throws `BindingError` at both
- so following it would break saving an edited document. `saveDocument` keeps
stringifying, and says why, because the next reader of that readme will come
back here.

Checked against the built site rather than the tarball: the sample document
opens on the served 6.13.0, and a diff in the shape this page sends applies and
survives into the saved file it reopens.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019JsBLdSBxzmHFQ4CFDiknj
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit f67ad31):

https://admob-app-id-9025061963--pr1-bump-odr-core-6-13-0-bwfvxkza.web.app

(expires Fri, 18 Sep 2026 06:47:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b0d3d5ed9702d729bc1b3ec04fb565e826dd7179

@andiwand
andiwand merged commit f67ad31 into main Sep 4, 2026
2 checks passed
@andiwand
andiwand deleted the bump-odr-core-6.13.0 branch September 4, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant