Repository navigation
direct-js@4.0.0 has been released with the following changes.
Breaking changes
- Requires
node >= 20. Node.js 18 is no longer supported. Thenpm >= 10requirement is unchanged. - The XML validator for styled notes has been reimplemented with
@xmldom/xmldom, with the schema built into the library.libxmljsis no longer a dependency, sodirect-jsno longer needs a native addon to be built or downloaded as a prebuilt binary. - The validator is stricter than before. The following are now rejected:
- DOCTYPE declarations
- Prefixed namespace declarations, including unused ones
xml:space="default"(onlypreserveis accepted wherexml:spaceis allowed)- A
versionattribute on thenoteelement whose value is not exactly1. Values previously treated as1, such as+1,01, and" 1 ", are now rejected. - A
urlattribute on alinkelement that contains a space. As before, the URL must be URL-encoded, and an IDN must be converted to Punycode.
- Some validation error messages have been reworded, including the
messageof failedvalidateXmlresults and theValidationErrormessages of the note APIs.validateXmlstill returns{ ok: true }on success and{ ok: false, errorType, message }on failure, and the set oferrorTypevalues is unchanged. Do not depend on the exact message text. lib/note-richtext.v1.xsdandlib/xml.xsdare no longer included in the package because the schema is built into the library.
Fixes
- The 100,000-byte size limit for styled note content is now enforced using the UTF-8 byte length rather than the character count.
Notes
hubot-direct@5.0.0depends on this version (direct-js >=4 <5). If you usedirect-jsthroughhubot-direct, upgradehubot-directto 5.0.0.