Skip to content

Latest commit

 

History

History
298 lines (170 loc) · 8.02 KB

CHANGELOG.md

File metadata and controls

298 lines (170 loc) · 8.02 KB

Change Log

Added

Added

  • Add skipEmptyTag option (#45).

Added

  • Support for simple conditions (docs).
  • Support for custom data resolvers - enables advanced syntax support (docs).

Changed

  • BREAKING - Container closing tag name is ignored and no longer throws when the closing tag has different name than the opening one (docs).

Changed

  • Update dependencies (jszip, xmldom).

Stable release - from now on breaking changes to the public API (the public interface of TemplateHandler) will introduce a new major release.

Fixed

  • Initial content types parsing.
  • Bug in paragraph loops (#36).

Added

  • Headers and footers support.

Fixed

  • Consistent handling of RawXmlContent when the xml prop is null.

Added

  • Support for RawXmlContent.replaceParagraph.

Added

  • Expose "Community Extensions" on npm (readme changes).

Fixed

  • Parsing of tags with custom delimiters.

Fixed

  • Parsing of tags with custom delimiters.

Fixed

  • Export extensions types.

Added

  • Expose Docx.rawZipFile property.

Added

  • Extensions API (#24).

Added

  • Allow overriding container tag logic using explicit content type.

Changed

  • ScopeData.getScopeData is now generic (#17).
  • The data argument of TemplateHandler.process is now strongly typed.
  • Bundle with Rollup instead of Webpack.
  • Auto generate typings.

Fixed

  • Fix typings.

Changed

  • BREAKING: Delimiters can not contain leading or trailing whitespace.
  • Loosen up TemplateHandlerOptions typings.

Fixed

  • Loop tag names trimming.
  • Custom loop delimiters support.
  • Zip export and typings.

Added

Fixed

  • Re-fix "Binary type 'Buffer' is not supported" on Node.

Fixed

  • Link plugin in cases where the link tag is not the only node in it's run.

Added

  • Link plugin.
  • TemplateHandler.version property.

This version removes the notion of a "tag type" and uses instead the notion of "content type". Instead of inferring the type from the tag prefix the type is now explicitly declared in the supplied JSON data.

Example:

Before:

tag: "{@newPage}"  
data: {  
    newPage: "<w:br w:type="page"/>"
}

After:

tag: "{newPage}"
data: {
    newPage: {
        _type: "rawXml",
        xml: "<w:br w:type="page"/>"
    }
}

The only exceptions are the "loop" content type which still uses the "#" opening prefix and "/" closing prefix, and the "text" content type which is the default and does not requires explicitly stating it.

Added

  • Image plugin.
  • Support multi-character delimiters.
  • Template plugins can be async.
  • Improved the docs (readme).

Changed

  • BREAKING: RawXmlPlugin requires data of the form { _type: 'rawXml', xml: string }.

Removed

  • BREAKING: Remove the Tag.type property.

Fixed

  • Parsing error in some cases where multiple tags are declared in the same run.

Fixed

  • "Binary type 'Buffer' is not supported." on Node 12.

Fixed

  • Handle non-textual values (numbers, booleans...) in TextPlugin.

Added

  • Loop over lists and table rows.
    Notice: The loop logic for tables is a bit different than the logic of the existing paragraph loop. Instead of repeating the content in between the opening and closing tags it repeats entire rows (including content in the row that appears before the opening or after the closing tag). The same goes for lists - the entire bullet is repeated.
  • Throw MalformedFileError when fails to open template file as zip.
  • Continuous integration with CircleCI.

Changed

  • Change dev stack to Babel, Jest and ESLint.

Added

  • Easily find out what tags are present in a given template (TemplateHandler.parseTags).

Added

  • Full browser example in readme file.

Added

  • Package keywords for npm visibility.

Fixed

  • Fix serialization of text nodes with empty values.

Added

  • Add readme badges

Added

  • Preserve leading and trailing whitespace
  • More info on missing delimiter errors

Fixed

  • Various bug fixes

Added

  • Typings file
  • First version

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.