Skip to content

9.13.0

Latest

Choose a tag to compare

@dolanmiu dolanmiu released this 19 Oct 23:05
· 18 commits to master since this release

9.13.0 adds three features and drops two dependencies. A document can now have VBA macros, which makes it a macro-enabled .docm. Write them from VBA code with createMacros, from the new docx/macros entry, or pass in the vbaProject.bin from a .docm that Word saved (#471). A numbered paragraph can restart its list with numbering: { restart: true }, so you no longer have to make up instance numbers (#3037). Runs can use Word's Two Lines in One and Horizontal in Vertical with eastAsianLayout (#1943). docx now reads and writes XML itself, so it no longer depends on xml and xml-js, which are no longer maintained (#3471). There are also fixes for several long-standing issues. patchDocument can read a template from a stream (#2321). An index entry field no longer scrambles the document in Word (#1546), and a table row with no cells is left out, since Word can't open it (#2724). Components made by another copy of docx, such as one bundled with a plugin, are written correctly (#2988). When page numbers come from docx/layout, a numbered heading's table of contents entry now starts with its number (#1130).

What's Changed

  • fix: leave empty alt text out of wp:docPr so Word 2007 opens images by @dolanmiu in #3777
  • docs: point text frame users to ShapeRun text boxes by @dolanmiu in #3778
  • fix: read and write XML without xml and xml-js, which are no longer maintained by @dolanmiu in #3779
  • feat: restart a numbered list with numbering.restart by @dolanmiu in #3780
  • fix: restarted list follow-ups from #3780 review by @dolanmiu in #3781
  • docs: show how to add SVG images with a fallback by @dolanmiu in #3782
  • feat: two lines in one and horizontal in vertical with eastAsianLayout (#1943) by @dolanmiu in #3783
  • fix: cells added below a rowSpan cell take its formatting and paragraph alignment (#1219) by @dolanmiu in #3784
  • fix: write components from another copy of docx (#2988) by @dolanmiu in #3785
  • fix: patch a template read from a stream (#2321) by @dolanmiu in #3786
  • docs: explain why TOC entries keep a heading's bold, and how to avoid it by @dolanmiu in #3787
  • docs: fix the CI badge in the README showing no status by @dolanmiu in #3788
  • fix: read an image's type from its data when it isn't given (#2952) by @dolanmiu in #3789
  • fix: don't let a paragraph or a table type check as a paragraph's child (#2395) by @dolanmiu in #3790
  • feat: write macro-enabled documents with VBA macros, from docx/macros (#471) by @dolanmiu in #3791
  • fix: stop an index entry field scrambling the document in Word (#1546) by @dolanmiu in #3792
  • fix: don't write a table row with no cells, which Word can't open (#2724) by @dolanmiu in #3799
  • fix: start a numbered heading's table of contents entry with its number, with page numbers from docx/layout (#1130) by @dolanmiu in #3800
  • build(deps-dev): bump vitest from 5.0.4 to 5.0.5 by @dependabot[bot] in #3793
  • build(deps-dev): bump @vitest/coverage-v8 from 5.0.4 to 5.0.5 by @dependabot[bot] in #3794
  • build(deps-dev): bump eslint-plugin-jsdoc from 65.3.2 to 65.3.6 by @dependabot[bot] in #3795
  • build(deps-dev): bump cspell from 10.3.6 to 10.4.0 by @dependabot[bot] in #3796
  • build(deps-dev): bump jsdom from 30.1.2 to 30.1.3 by @dependabot[bot] in #3797
  • build(deps-dev): bump @vitest/ui from 5.0.4 to 5.0.5 by @dependabot[bot] in #3798

Full Changelog: 9.12.0...9.13.0