v4.0.0-alpha.3
·
38 commits
to main
since this release
Summary
Release meta
Released on: 2026-05-20
Released by: github-actions[bot]
Published by: GitHub
Logs: full diff
Changelog
Documentation
- Add syntax highlighting guide explaining client-side (highlight.js via
standalone+source-highlighter) and server-side (conversion-time) approaches, including the "embedding in an existing page" pattern - Document how to run the test suite under Deno in
CONTRIBUTING-CODE.adoc, including the installation prerequisite and the per-package commands - Add customization overview page listing all extension levels from built-in attributes to custom converter
- Update stylesheets page to reflect that the stylesheet factory is deprecated and the default stylesheet no longer uses Sass
Improvements
- Export named TypeScript DSL interface types (
ProcessorDslInterface,DocumentProcessorDslInterface,SyntaxProcessorDslInterface,IncludeProcessorDslInterface,DocinfoProcessorDslInterface,BlockProcessorDslInterface,MacroProcessorDslInterface,InlineMacroProcessorDslInterface) from@asciidoctor/core— TypeScript consumers can now use these asthiscontext types in block-style extension registrations - Type the
processmethod precisely on each processor class:Preprocessor,TreeProcessor,Postprocessor,IncludeProcessor,DocinfoProcessor,BlockProcessor,MacroProcessor,BlockMacroProcessor, andInlineMacroProcessornow have fully typed parameter and return types instead ofany - Add
Registry#getGroups()andExtensions#getGroups()as JavaScript-style accessor aliases for thegroupsproperty, following the dual accessor pattern - Add missing JavaScript-style accessor aliases on
Registryto match the previous Asciidoctor.js public API:blocks(),blockMacros(),getPreprocessors(),getTreeProcessors(),getIncludeProcessors(),getPostprocessors(),getDocinfoProcessors(),getBlocks(),getBlockMacros(),getInlineMacros(),getInlineMacroFor(),getBlockFor(), andgetBlockMacroFor() - Replace generic extension documentation examples with practical, real-world examples — block processor now demonstrates a
calloutblock, include processor uses JSON data, inline macro renders npm badge links, postprocessor adds a copy button, tree processor computes reading time, block macro embeds GitHub Gists, and docinfo processor injects Open Graph metadata
Bug Fixes
AbstractBlock#getAttributes()no longer exposes the internalattribute_entriesbookkeeping key — attribute entries are now stored under a private Symbol key invisible toObject.keys(),for…in, andJSON.stringify()doc.doctitle()anddoc.xreftext()now apply typographic substitutions (e.g.,'→’) to the document title and reftext, matching the Ruby reference implementationNullLoggernow properly extendsLogger—instanceof Loggerchecks on aNullLoggerinstance now returntrue- Strip UTF-8 BOM when it appears as three raw Latin-1 characters ( /
\xEF\xBB\xBF) rather than the decoded U+FEFF codepoint — fixes loading of BOM-prefixed content passed through a binary/Latin-1 decoder load()now accepts aUint8Array(including browser shim instances returned byBuffer.concat) in addition to Node.jsBuffer— fixes "unsupported input type: object" error in browser environmentsTemplateConverternow sorts directory entries fromreaddirbefore scanning — ensures consistent template precedence when multiple engines provide the same node template (previously, a non-deterministicreaddirorder could pick Handlebars over Nunjucks depending on the runtime)
Infrastructure
- Add Deno compatibility shim for
node:test(viadeno.jsonimport map): redirectsnode:testto a@std/testing/bdd-backed shim that provides workingbeforeEach/afterEachhooks — the fullpackages/coretest suite now runs under Deno with 0 failures - Replace shared
LoggerManagermutation in tests withAsyncLocalStorage-based isolation viawithLogger()— eliminates race conditions when tests run concurrently under Deno - Add
test-denojob to the CI workflow, gatingnative_imageson both Node.js and Deno test results