Skip to content

Latest commit

 

History

History
186 lines (135 loc) · 7.98 KB

CHANGELOG.md

File metadata and controls

186 lines (135 loc) · 7.98 KB

Change Log

All notable changes to this project will be documented in this file. This project does its best to adhere to Semantic Versioning.


0.11.0 - 2022-01-02

Changed

  • Update to TypeScript 4.4

0.10.0 - 2021-06-12

Changed

  • Update to TypeScript 4.3

0.9.0 - 2021-01-01

Added

  • BREAKING: Added DomValidate.missingAttribute() interface method - implementations will need to add this
  • A lot of dom-builder.d.ts documentation for DomBuilderHelper
  • Added optional 'parent' argument to DomValidate.missingNode()
  • NodeLike.removeChild()
  • DomLite ElemLite now implements firstChild, lastChild, and removeChild()

Changed

  • BuilderHelper interface changes and DomBuilderHelper implementation changes:
    • BREAKING: getChilds() split and renamed into getChildren() and getChildNodes()
    • BREAKING: getNodeAttrs() renamed getAttrs()
    • BREAKING: removeNodeAttr() renamed removeAttr()
    • BREAKING: getNodeAttr*[Int|Float|Bool|String]() methods renamed getAttr*() (i.e. getNodeAttrInt() is now getAttrInt())
    • Simplify getAttrs() overload signature
    • attr*() and getAttr*() methods have a new optional throwIfMissing argument
    • queryOneChild() now correctly returns T | null
    • addChilds() and removeChilds() expanded to accept NodeLike and Node instead of ElementLike and Element
  • DomBuilder element is no longer a getter but a public field, can be set. Since DomBuilder has no other internal state besides dom, changing the element value should be safe.

0.8.0 - 2020-09-04

Changed

  • Update to TypeScript 4.0

0.7.2 - 2019-11-08

Changed

  • Update to TypeScript 3.7

0.7.1 - 2019-07-05

Changed

  • Update to TypeScript 3.5 and fixed missing lib.dom.d.ts NodeSelector type

0.7.0 - 2019-05-24

Added

  • ElementLike setAttribute() and setAttributeNS()

Changed

  • DomBuilderHelper attr*() functions first parameter changed from attrs: NamedNodeMap to elem: ElementLike to allow setAttribute() to be used instead of setNamedItem() (setNamedItem() does not preserve the namespace prefix in some DOM implementations)

0.6.5 - 2019-05-24

Fixed

  • Fix attribute creation to use createAttributeNS() for attribute names containing a namespace prefix followed by :

0.6.4 - 2018-12-29

Changed

  • Update to TypeScript 3.2 and fix compile errors
  • Update @types dependencies

0.6.3 - 2018-10-16

Changed

  • Update to TypeScript 3.1
  • Update dev dependencies and @types
  • Enable tsconfig.json strict and fix compile errors
  • Removed compiled bin tarball in favor of git tags

0.6.2 - 2018-04-08

Changed

  • Added tarball and package.json npm script build-package reference for creating tarball

0.6.1 - 2018-03-31

Changed

  • Update tsconfig.json with noImplicitReturns: true and forceConsistentCasingInFileNames: true

0.6.0 - 2018-03-29

Changed

  • Update to TypeScript 2.8 and fixes for Element and Document to be assignable to ElementLike and DocumentLike

0.5.2 - 2018-02-27

Changed

  • Update to TypeScript 2.7

0.5.1 - 2018-02-11

Changed

  • Update package.json dependencies - update chai, mocha, and node

0.5.0 - 2017-11-16

Changed

  • package.json added strictNullChecks and fixed code to handle nullable types
  • added/improved unit tests

0.4.1 - 2017-08-11

Changed

  • Update to TypeScript 2.4

0.4.0 - 2017-07-12

Changed

  • Renamed DomBuilder.class() to classes() (meant to include in 0.3.0)

0.3.0 - 2017-07-12

Added

  • DomLite a very basic virtual DOM implementation, currently only partially implements 'id', 'nodeName', 'attribute', 'childNodes', 'classList', and 'style' Element properties. The bare minimum needed to meet the needs of libraries like xlsx-spec-utils and xlsx-spec-models.
  • Added first unit tests for DomLite and DomBuilderHelper using chai & mocha
  • Updated README

Changed

  • Extensive dom-builder interface changes
  • Nearly all DOM types like Node, Element, and HTMLElement have been replaced with '-Like' interfaces such as DocumentLike and ElementLike
  • DomBuilder class now takes two generic parameters, the element type and document type
  • DomBuilderFactory.newLink takes a 'doc' parameter
  • DomBuilderHelper.getNodeAttr*() methods 'ifNullReturnNull' parameter changed to 'defaultValue'; i.e. signature looks like getNodeAttrInt(elem, attrName, [defaultValue])

Fixed

  • DomBuilderHelper.getNodeAttrBool() not parsing false attributes properly

0.2.1 - 2017-05-08

Changed

  • Expanded DomBuilderFactory.create() to use HTMLElementTagNameMap for all HTML element types/names
  • DomBuilder.addChild() now supports adding DomBuilders in addition to HTML elements

0.2.0 - 2017-01-28

Changed

  • Added method expectNode() to DomValidate interface
  • DomBuilder internal changes to make extending it easier

0.1.1 - 2016-12-30

Changed

  • TypeScript 2.0 compatibility

0.1.0 - 2016-04-28

Added

Initial code commit, included in /dom/ directory:

  • dom-builder.d.ts - interfaces for this module
  • DomBuilder.ts - the main DOM builder API, wraps and element (accessible vial the 'element' property) and provides helper functions like class(), style(), attrs(), etc. to setup an element
  • DomBuilderFactory.ts - a factory that wraps a 'Document' object (i.e. window.document) and provides a quick create() function instead manually creating DomBuilder instances
  • DomBuilderHelper.ts - a helper that wraps a 'Document' object and provides functions like attrFloat(), attrString(), queryAllChilds() and removeChilds()

Changed

  • Renamed project from ts-dom-builder -> dom-builder