Skip to content

v4.0.0-alpha.4

Choose a tag to compare

@github-actions github-actions released this 21 May 16:32
· 28 commits to main since this release

Summary

Release meta

Released on: 2026-05-21
Released by: github-actions[bot]
Published by: GitHub

Logs: full diff

Changelog

Bug Fixes

  • Fix Windows UNC path handling (\\server\share...) in PathResolver and Documentbase_dir is now correctly posixified (\\//) and .. segments are expanded; previously _expandPath silently fell back to returning the path unchanged because require() is not available in ESM modules
  • Remove unused posixfy() alias on PathResolver (duplicate of posixify())

Improvements

  • Add pluggable HTTP cache system (HttpCache, MemoryHttpCache, HttpCacheManager) activated by the cache-uri document attribute, mirroring Ruby’s open-uri/cached behaviour. When cache-uri is set, an ephemeral in-memory cache is used per conversion by default; register a custom HttpCache implementation via HttpCacheManager.setCache() for persistent or file-system-backed caching.
  • Export HttpCache, MemoryHttpCache, and HttpCacheManager from the browser entry point (browser.js), keeping it in sync with index.js
  • Align readSvgContents with the Ruby reference implementation by delegating entirely to node.readContents, removing the manual isUriish/normalizeSystemPath split
  • Fix warnIfEmpty in AbstractNode#readContents — the empty-string check now correctly uses != null instead of a truthy guard, so a warning is emitted for empty local SVG assets