- chore: update devDeps. and lint; change browser targets
- BREAKING: Require Node 18
- perf(build): target Node 18
- fix: revert making
list
attribute nullable (needssetAttribute
)
- fix: make
list
attribute nullable
- fix: for common uses, return more accurate type for
jml()
- fix(plugins): ensure passing root element
- fix(types):
Element
->HTMLElement
- feat: Add type for
JamilihDocumentFragmentContent
- fix: types for
jamilih/src/jml-jsdom.js
- fix: Plugin types (add
PluginValue
and allowPromise<void>
for plugins)
- fix: switch to
nodenext
moduleResolution
- feat: more
toHTML
support - feat: TypeScript typings
- fix: Better error checking/reporting
- fix: expose
src/jml-jsdom.js
export
- fix: expose
jml-jsdom.js
export
User-facing:
- feat: switch to native ESM
Dev-facing:
- chore: update devDeps.
- chore: fix AMO bundle extension
- docs: update license dev. badge
- docs: dev instructions
User-facing:
- npm: Remove
core-js-bundle
frompeerDependencies
Dev-facing:
- Build: Update per latest devDeps.
- Linting: As per latest ash-nazg
- npm: Switch from deprecated
rollup-plugin-commonjs
to@rollup/plugin-commonjs
- npm: Remove
remark-lint
- npm: Add separate
nyc
testing script - npm: Switch to stable
mocha-multi-reporters
- npm: Switch to server without reported vulnerabilities
- npm: Switch to pnpm
- npm: Update devDeps.
- Fix: Missed adding updated build files
- Fix: Resume allowing no-op for
$on
- Build: Change to Node 10 targets
- Build: Switch to babelrc with "json" extension
- Enhancement: More details in error messages
- Docs: Update badges per latest
- Linting: Check hidden files; update per latest ash-nazg
- npm: Switch from deprecated
rollup-plugin-babel
torollup/plugin-babel
; usebabelHelpers
explicitly - npm: Update devDeps and peerDep
- Fix: Wrong mapping for
minlength
- Fix:
minlength
andmaxlength
needed case-changing - Docs: Update coverage badge per latest coveradge
- Docs: Remove redundant license badge
- npm: Update devDeps
- Breaking change: Require Node 10 (dev. env. relies upon)
- Enhancement: Add
minlength
andmaxlength
as nullables - Build: Update build files
- Docs: Add license badges for devs/devDeps
- npm: Update devDeps
- Enhancement: Add
autocomplete
as nullable property - npm: Update devDeps
- Enhancement: Add
integrity
as nullable property
- Fix: For
getInterpolator
plugin, exportuuid
- Fix: Add UMD
dist
for new plugin - Build: Update
dist
files
- Enhancement: Allow non-array Jamilih (e.g., object-based fragments) in
$document
head and body - Enhancement: Expose state to plugins, adding new states
- Enhancement: Add interpolator plugin
- Optimization: Avoid checking for child name unless needed
- Refactoring: Prefer
replaceWith
toreplaceChild
- npm: Update devDeps; use stable mocha-badge-generator
- Fix: Ensure all instances of
XMLSerializer
are on internal "window".
- Breaking change: Remove
setXMLSerializer
/getXMLSerializer
andsetDocument
/getDocument
and check onwindow
(set bysetWindow
) instead (this will now also setbody
). - Breaking change: Switch name of polyglot file to
dist/jml-jsdom.js
(pointed to inmain
so should not be breaking unless hard-coding the path). - Breaking change: Drop ordered attribute array (object properties can be iterated now in order)
- Breaking update: Remove now removed
entities
,notations
,internalSubset
properties - Breaking update: Remove now removed
xmlDeclaration
handling - Breaking change:
toJML
will not get defaults with falsey value besidesundefined
- Fix: Ensure that extra
childNodes
from the default HTML document are overwritten (and completely overwritten) before attempting to add the user's ownchildNodes
. - Fix: Allow previously undocumented fragment creation to accept children
- Fix: Ensure
stripWhitespace
on text node returns a text node (that is empty) - Fix: Ensure can reset to null namespace for namespaced elements
- Fix: Underdocumented named
$map
had not been working properly - Enhancement: Add config for
toJML
toreportInvalidState
- Enhancement: Check for
DOMParser
onwindow
so can get automatically after settingwindow
- Enhancement: Allow wrapping a document and inserting nodes
- Enhancement: Allow wrapping of customized built-in elements
- Enhancement: With
$define
array allow absent 2nd (options) argument - Enhancement (Errors):
- Throw proper
TypeError
on undefined child content; throw also fornull
. - Throw if non-function added within
$on
array - Throw for all non-objects given as plugins
- Report exact type if passing in bad type as Jamilih argument
- Throw if passing in
null
in non-final position - Make
DOMException
polyfill inherit fromError
and include message andname
- Throw proper
- Docs: Add testing and coverage badges
- Docs: Begin commands docs
- Docs: Add jsdoc blocks on methods where missing
- Linting (ESLint): As per latest ash-nazg
- Travis: Adding builds 10, 12
- Testing: Coverage 100%
- Testing: Use builtin
body
,$
,$$
,nbsp
- npm: Update
package-lock.json
- npm: Switch from deprecated
rollup-plugin-json
to replacement - npm: Update devDeps, peerDep
- BREAKING CHANGE: Switch
jsdom
andrequest
topeerDependencies
so they do not need to be downloaded for browser-only use. - Testing: Add code coverage
- Testing: Move code out of HTML to bootstrap file
- npm: Remove
rollup
fromtest
script - npm: Switch to non-deprecated
@rollup/plugin-node-resolve
- npm: Update dep. jsom, peerDep core-js-bundle, and devDeps
- Linting (ESLint): Update code per linting updates; reenable
jsdoc/check-types
- npm: Add Markdown and HTML files to JS linting routine
- npm: Update peerDeps, deps, devDeps
- Breaking change: Require polyfills for ChildNode/ParentNode
- Breaking change: Remove
XMLSerializer
: had become slightly buggy and now jsdom has own - Breaking change: Remove
@babel/polyfill
dep but addcore-js-bundle
peer dep.;@babel/polyfill
may continue to work, but should be more efficient and future-proof to usecore-js-bundle
- Breaking change: Return
TypeError
if plugins not an array - Enhancement:
glue
utility - Linting: Switch to recommended rc file format; switch to
eslint-config-ash-nazg; lint; safer
hasOwnProperty
calls - Testing: Switch from end-of-lifed nodeunit to Mocha/Chai
- npm: Update deps, devDeps; remove
readmeFilename
property inpackage.json
- npm: Added
request
dep (peer dep now of jsdom) - npm: Switch from
opn-cli
toopen-cli
- npm:
open-docs
/build-docs
scripts - Docs: JSDoc config; headings; todos; refactoring
- Fix: Ensure pointing to dist files in
package.json
- Enhancement: In case using
main
in bundlers for browser use, make Node version polyglot-capable
- Enhancement: Add
@babel/polyfill
dependency - jsonchema: Add some attributes and other node types
- Linting (Markdown): Fix linting format
- npm: Update to Babel 7; update other devDeps and jsdom dep
- Fix: Properly escape processing instructions (LGTM-inspired)
- Refactoring: Remove unused function in demo, avoid passing extra arg (LGTM-inspired)
- Linting (LGTM): Add lgtm.yml exclusions of bundles
- Fix: Set charset attribute on
meta
- Enhancement: Allow
$DOCTYPE
shorthand
- Fix: Call
createDocumentType
with empty strings for emptysystemId
orpublicId
- Testing: Undo adding
XMLSerializer
to browser environment (ok if we create the document type correctly)
- Fix: Allow for falsey or string "undefined"
publicId
/systemId
- Refactoring: Use
includes
for strings and arrays inXMLSerializer
polyfill - Testing: Add document test; add
XMLSerializer
to browser environment for consistency for Firefox
- Fix: Undo logging
- Fix:
$document
to handle non-array arguments and properly set node - Testing: Add
$document
/$DOCTYPE
creation test
- Enhancement: Export
body
fordocument.body
(frequently targeted for appending) - Testing: Avoid Firefox-specific exception for password input attribute serialization order (now passing)
- Security fix: Bump versions as part of npm security audit
- Fix: Ensure
nbsp
exported in Node as well - npm: Update devDeps
- Enhancement: Add
nbsp
as export (for another very frequently needed template item)
- Breaking change: Remove
yarn.lock
- Deprecated: Default ES6 export deprecated over new named export
- Enhancement: Add
$
and$$
utilities forquerySelector
/querySelectorAll
.
- Enhancement: Support no-innerHTML ES6 Module dist file
- npm: Update devDeps
- npm: Update deps (jsdom), devDeps; fixes security vulnerability
- Testing: Add opn-cli
- Fix: Move
dir
,lang
, andtitle
to nullables
- Enhancement: Add global
HTMLElement
DOM-settable properties (forundefined
to have no effect) - Build: Add
nodeType
existence check (avoiding strict warnings) - npm: Update devDeps
- Testing: Fix test to exclude attribute nodes (depends still on jsdom fixing)
- Fix:
browser
andmodule
not pointing to updated file names - Docs: Fix paths in docs
- Enhancement: Add "es" dist file
- npm: Fix browser-test script
- Breaking change (file locations): Move files to
dist
orsrc
subdirectories accordingly (and move demo file to own directory) - Breaking change (Bower): Remove
bower.json
(service is deprecated; use npm instead as is also usable for browser) - Enhancement: Add "no innerHTML" distribution for sake of add-on validators
- Linting: ESLint
- Testing: Make conditional check for Firefox in test
- npm: Add chokidar watch script
- npm: Update deps and devDeps
- npm: Fix scripts to avoid building upon install
- Enhancement: Support plugins
- Fix: npmignore
- Build: Add yarn
- npm: Remove babel-env
- npm: Update dev deps
- Breaking change: Don't throw if encountering
Node.nodeType
asundefined
; temporarily treat asNode.ATTRIBUTE_NODE
for jsdom - Breaking change: Remove an unused IE Shiv polyfill from
tests
directory - npm: Add
browser
topackage.json
(and changemain
to point to Node-specific file) - npm: Remove unused dependencies; add Rollup ones
- Build: Move Node code into separate entry file
- Build: Add Rollup code to potentially handle JSDOM as import (incomplete and may not work)
- Testing: Convert non-Nodeunit tests to Nodeunit and merge two test
directories into one; simplify testing and leverage
setUp
; fix all broken tests; rename our assert code and have it accept a test object; make separate entry files for Node and browser; add test messages
- Fix: Actually add plugin apparently insisted on by Babel
- Fix: Add plugins apparently insisted on by Babel
- Fix: Add plugins apparently insisted on by babel-env
- Breaking change: Use
setAttribute
forstyle
to ensure consistent serialization; could break if had been using to add styles to an existing element - Breaking change (Browser): Remove most polyfills (no longer as concerned
about old IE support, Babel or others can polyfill, and some are now
better standardized, e.g.,
XMLSerializer
) - Breaking change (Node): Rather than always creating a new jsdom window, document (and XMLSerializer), look first for global ones (in case user wants to interact with same document object
- Breaking change (Node): Adjust and apply our own more browser-up-to-date
XMLSerializer
polyfill in place ofxmldom
. - Enhancement: Allow for getting/setting of
window
,document
, andXMLSerializer
objects so we don't need to inject globals in Node. - Fix: For Jamilih Maps, stop calling
super
onthis
(not needed and problematic in jsdom) - Refactoring: Rollup and apply Babel to
jml-es6.js
tojml.js
(ensuring older browsers and Node can support new features) - Refactoring: Use new jsdom API
- npm: Add
module
property for sake of Rollup/Webpack - npm: Update deps and devDeps
- npm: Add ESLint to test routines
- npm: Remove xmldom dep., add Rollup plugins for testing
- Testing: Add messages to tests, skipping some tests known to be not supported by jsdom
- Testing: Support one Node/browser polyglot testing, using Rollup
- Testing: Update tests to current browser expectations
- Docs: Document some newer features and other improvements
-
For both files:
- Breaking change: Support reasonable dynamic
template
creation (append to itscontent
fragment instead of totemplate
itself) - Allow document fragment to be appended as with elements
- Breaking change: Support reasonable dynamic
-
For jml-es6.js file:
- Breaking change: Change API for
jml.(Weak)Map.invoke
to pass element as first instead of last arg - Enhancement: Add
$shadow
for creating Shadow DOM - Enhancement: Add
$define
for Custom Element definitions - Enhancement: Add
$custom
for arbitrary addition of DOM properties/methods - Enhancement: Add
jml.command()
utility for invoking functions or methods attached to an element by symbol or map - Enhancement: Override
jml.Map
andjml.WeakMap
get
andset
to accept selectors in place of elements; also allow in custominvoke
- Breaking change: Change API for
- Fix: For jml-es6.js file, avoid error if
opts.$map
doesn't exist!
- For jml-es6.js file, add
jml.sym
(and aliasesjml.symbol
andjml.for
) utilities for retrieving aSymbol
(orSymbol.for
) instance on a particular element - For jml-es6.js file, allow
$symbol
two-item array with the first item as aSymbol
(or a string forSymbol.for
) to be added as a key on the given element with the second item as the function or object to be its value. The object will have anelem
property added to it to reference the current element, or, if a function is used, itsthis
will be set to the element. - For jml-es6.js file, allow
$data
attribute (and$map
in config) (as yet undocumented)
- For jml-es6.js file, add
jml.weak
,jml.strong
,jml.Map
, andjml.WeakMap
for easier association of elements toMap
orWeakMap
maps.
- For jml-es6.js file,
dataset
recursive objects fixed to always repeat prefix when other properties on same sub-object
- For jml-es6.js file,
dataset
recursive objects now support non-string primitive values (with null/undefined ignoring)
- For jml-es6.js file, support recursive objects under
dataset
.
- Refactoring: Add jml-es6.js file for ES6 module support
- Linting: ESLint ES6 module file and tests
- npm: Add ESLint script
- Testing: Serve proper content-types in test server
- Testing: Use ES6 modules in HTML tests and demo file
- Testing: Simplify suite running API
- Add
lang
toNULLABLE
att group
- Add
pattern
to DOM properties - Add new internal group
NON_NULL
for attributes that if set tonull
orundefined
, they will not be set at all (useful for templates that can use the ternary operator to avoid setting) - Add
max
,min
toNON_NULL
att group
- Avoid having nully dataset value set
dataset
,class
/className
,style
,for
/htmlFor
,innerHTML
, and$on
handlers (as setting by DOM alone sets it to the string "undefined" or "null").
- Fix
readOnly
in map and bool check
- Add ATTR_MAP (inspired by JsonML): Only
readOnly
->readonly
for now - Add ATTR_DOM (inspired by JsonML): Attributes to be set in DOM along with booleans (Uses attributes in JsonML)
- Add 'disabled', 'readonly', 'indeterminate' to boolean attributes
- Refactoring: Define BOOL_ATTS (paralleling JsonML) for our boolean attributes
- Test refactoring (minor): Dummy favicon placeholders in test files for avoiding logs
- Test refactoring (minor): Switch from
GLOBAL
toglobal
in tests - npm: Update deps
- Add
defaultChecked
anddefaultSelected
support as properties
- npm: apply correct branch!
- npm: Upgrade jsdom version
- Demo: Fix
- Testing: Unskip
createCDATASection
test forjsdom
now that implemented
- Bower: Shrink description as per npm
- npm: Shrink description to fit limit
- Rename MIT license file to LICENSE-MIT.txt
- Docs: Fix license text displayed
- Travis: Add dependencies status to README
- npm: Update dependencies
- Travis: Add support and display build status
- Testing: Workaround
nodeunit
in browser issue
- npm: Lint, add scripts for browser/Node testing
- npm: Rely on latest
jsdom
rather than my now outdated fork - Refactoring: Avoid
DOMParser
fromxmldom
sincejsdom
supports (still need itsXMLSerializer
however) - Testing/npm: Support
nodeunit
also in browser, via testing server - Testing: All tests passing in Node, browser
- Testing: Upgrade tests per current DOM spec (no more
createEntityReference
) andjsdom
behavior - Testing: Temporarily avoid or provide workarounds for
jsdom
in testing (Needs attr. node added back andcreateCDATASection
) - Testing: Temporarily provide workaround for
xmldom
in testing (non-namespaced serialization) - Schema: Provided tentative JSON Schema
- Actual Node support
- Add document, document type, notation, entity, attribute node support
- Add ordered attribute support
- New methods on jml: toJML(), toJMLString(), toHTML() (or toDOMString()), toXML() (or toXMLDOMString()), toDOM() (an alias for jml()).
- Added unit tests
- Support appending of attributes/properties and children to existing DOM element
- Support style as object (with hyphenated or CamelCase keys)
- Append style string attributes rather than replacing
- Breaking change to allow
on
-prefixed event handlers to become set as direct properties rather than throughaddEventListener
. If you need the latter, use the$on
object syntax. - Allow decimal character references to be supplied as numbers
- Number and boolean children converted to text nodes
- Better error reporting
- Support "defaultValue" property setting