-
92468f7: BREAKING CHANGES: Migrate to Bun and add standalone binary compilation
This release introduces significant infrastructure changes:
- ESM-only package: Removed CommonJS builds. The package now exports only ESM format.
- Bun development requirement: Development now requires Bun 1.2+ instead of pnpm.
- Node.js runtime compatibility maintained: Runtime consumption still supports Node.js 22+.
New Features:
- Standalone binary compilation using Bun's
--compileflag- Cross-platform support: linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64
- Baseline and modern CPU variants (Haswell/AVX2+)
- Automated GitHub workflow for binary builds on releases
- Runtime detection for Bun.CryptoHasher with Node.js fallback for hash computation
Build System:
- Replaced tsup with Bun.build() for faster builds (~0.6s vs 1.5s)
- Simplified package exports to ESM default only
- Updated all 30+ benchmark scripts to use Bun
- Removed pnpm workspace configuration
- 5cf4806: - Guard Readability extraction against fragment HTML by reparsing missing
<html>wrappers, fixingdocumentElementaccess errors.- Inline sample article fixtures in tests to avoid Git LFS pointers and keep CI checks working out of the box.
- 4541105: Refined the htmlparser2 renderer to stream nodes directly, which removes the domhandler dependency and unlocks faster parse times on large fixtures.
Expose granular
convert_parse,convert_render, andconvert_postprocesstelemetry events (propagated throughH2MParserandhtmlToMarkdown) so downstream tooling can pinpoint hotspots while staying backwards compatible.
-
9a25c34: Optimize package size and update Node.js requirements
- Reduce npm package size by 82% (570KB → 103KB) by excluding source maps and enabling minification
- Remove unused
turndowndependency, moving it to devDependencies for benchmarks only - Update Node.js requirement to >=22 and test matrix to Node 22 and 24
- Fix tsup config TypeScript error in esbuildOptions
- Update all GitHub Actions workflows to use Node.js 24
- Configure package.json to exclude source maps from published package
- Enable minification in production builds while keeping it disabled for watch mode
These changes improve installation speed and reduce disk usage for end users while maintaining full functionality.
- 5e93d99: Fast HTML to Markdown converter with Mozilla Readability extraction, streaming renderer, and LLM-ready output. 3.75x faster than alternatives
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2025-01-27
- Initial release of h2m-parser
- Fast HTML to Markdown conversion using htmlparser2
- Mozilla Readability integration for article extraction
- Streaming Markdown rendering with single-pass architecture
- Translator registry for customizing tag rendering
- Output tuning options (tag ignoring, text replacements, link styles)
- YAML front matter generation with metadata
- Content hashing for deduplication
- Heading-aware chunking for LLM processing
- Whitespace normalization and cleanup
- Telemetry hooks for performance monitoring
- NDJSON transform for streaming pipelines
- CLI tool for command-line conversion
- TypeScript support with full type definitions
- Dual ESM/CJS package exports
- Comprehensive test suite
- Performance benchmarks showing 3.75x faster than Turndown
- Average processing time: 1.517ms (without Readability)
- Average processing time: 7.731ms (with Readability)
- Linear O(n) scaling confirmed across file sizes