Releases: esimkowitz/printers-js
Releases · esimkowitz/printers-js
v0.8.3
What's Changed
- Update the printer examples, fix corrupted Word doc sample by @esimkowitz in #198
- Update library reference in sample text file by @esimkowitz in #199
- Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #202
- Bump actions/download-artifact from 5 to 6 by @dependabot[bot] in #201
- Bump rust-toolchain from 1.90 to 1.91 by @dependabot[bot] in #200
- Bump napi-derive from 3.3.0 to 3.3.2 by @dependabot[bot] in #204
- Bump napi from 3.4.0 to 3.5.1 by @dependabot[bot] in #203
- Bump napi-derive from 3.3.2 to 3.3.3 by @dependabot[bot] in #208
- Bump napi-build from 2.3.0 to 2.3.1 by @dependabot[bot] in #207
- Bump napi from 3.5.1 to 3.5.2 by @dependabot[bot] in #206
- Bump js-yaml from 4.1.0 to 4.1.1 by @dependabot[bot] in #209
- Bump package version to v0.8.3 by @esimkowitz in #210
Full Changelog: v0.8.2...v0.8.3
v0.8.2
What's Changed
- Clarify Linux support in README by @esimkowitz in #196
- Fix loading of optional deps in Deno, add more comprehensive examples by @esimkowitz in #197
Full Changelog: v0.8.1...v0.8.2
v0.8.1
v0.8.0
Release Notes v0.8.0
Major Features
Printer State Monitoring & Events
- Added real-time printer state monitoring with event subscriptions
- Subscribe to printer connection, disconnection, state changes, and error conditions
- New functions:
subscribeToPrinterStateChanges(),startPrinterStateMonitoring(),getPrinterStateSnapshots() - Automatic lifecycle management - monitoring starts/stops with subscriptions
- Full cross-runtime support (Node.js, Deno, Bun)
Enhanced Documentation
- Reorganized documentation into feature-specific guides in
/docsdirectory - New guides: PrinterStateMonitoring.md, JobTracking.md, PrintingOptions.md, CrossRuntimeSupport.md
- Streamlined README with links to detailed feature documentation
- Added GEMINI.md for Gemini AI agents
Improvements
TypeScript Type Safety
- Added
PrinterStateunion type for compile-time state validation - All state-related interfaces now use
PrinterStateinstead ofstring - Better IDE autocomplete and type checking
- Enhanced
toString()method: outputs"Printer Name (default) [state]"
Testing
- Added
/mediadirectory with real test files (PDF, text, JPEG, PNG, DOCX) - Improved test coverage and reliability across all runtimes
Dependencies
- Updated napi from 3.3.0 to 3.4.0
- Updated napi-build from 2.2.3 to 2.2.4
- Updated napi-derive from 3.2.5 to 3.3.0
- Updated rust-toolchain from 1.89 to 1.90
- Updated serde_json from 1.0.143 to 1.0.145
CI/CD
- Updated GitHub Actions: setup-node from v5 to v6, download-artifact from v4 to v5
- Migrated to official Task setup action
- Updated macOS runners for compatibility
- Improved CI reporting and LCOV coverage
- Extracted common script utilities to
scripts/utils.js - Configured NPM Trusted Publisher for improved supply chain security
Bug Fixes
Windows Compatibility
- Fixed temp file handling on Windows in test suite
Architecture
- Refactored
PrinterWrapperImplto use JavaScript Proxy pattern (25% less code) - Cleaned up
NativePrinterinterface to accurately represent Rust FFI boundary - Fixed property exposure - all
NativePrinterproperties now correctly required
Breaking Changes
None - all changes are backward compatible. Existing code continues to work unchanged.
Full Changelog: v0.7.4...v0.8.0
v0.7.4
What's Changed
- Poll the job status in background, instead of delay by @esimkowitz in #154
Full Changelog: v0.7.3...v0.7.4
v0.7.3
What's Changed
- Use UUID if no Job Name is provided by @esimkowitz in #151
- Ensure print jobs transfer before disposing of background threads by @esimkowitz in #152
- Bump to version 0.7.3 by @esimkowitz in #153
Full Changelog: v0.7.2...v0.7.3
v0.7.2
What's Changed
- Use default printer in examples by @esimkowitz in #148
- Clean up the global printBytes impl to match printFile by @esimkowitz in #149
- Fix CUPS Options implementation, bump by @esimkowitz in #150
Full Changelog: v0.7.1...v0.7.2
v0.7.1
What's Changed
- Fix missing Printer methods, update examples to match 0.7 by @esimkowitz in #147
Full Changelog: v0.7.0...v0.7.1
v0.7.0
What's Changed
- Update examples to use new features from v0.6 by @esimkowitz in #145
- Finally implement real file printing, per-printer job tracking by @esimkowitz in #146
Full Changelog: v0.6.0...v0.7.0
v0.6.0
🎯 Major Feature: Enhanced Job Tracking
Comprehensive Job Management Aligned with Upstream printers Crate
- Enhanced Job Structure: Updated
PrinterJobinterface with comprehensive metadata including timestamps, media types, and error tracking - Job State Management: Added
PrinterJobStateenum with states:PENDING,PAUSED,PROCESSING,CANCELLED,COMPLETED,UNKNOWN - Advanced Timestamps: Multi-timestamp tracking with
createdAt,processedAt, andcompletedAtfields - Media Type Detection: Automatic file type detection based on extensions (PDF, PostScript, images, text, etc.)
- Job History API: New methods for querying active jobs (
getActiveJobs()) and job history (getJobHistory())
🔧 Technical Improvements
- 64-bit Job IDs: Upgraded from 32-bit to 64-bit job identifiers for better scalability
- CamelCase API: All exposed fields now use JavaScript-standard camelCase naming
- Cross-Runtime Compatibility: Full support maintained across Deno, Node.js, and Bun
- Backward Compatibility: Legacy
JobStatusinterface preserved for existing code
📊 Enhanced Testing
- Comprehensive Test Coverage: New test suites for job tracking, media type detection, and state management
- Cross-Runtime Validation: All features tested across Deno, Node.js, and Bun runtimes
- Simulation Mode: Safe testing with
PRINTERS_JS_SIMULATE=trueby default
🚀 Breaking Changes
- Job tracking fields now use camelCase (
mediaType,createdAt, etc.) printFile()andprintBytes()now return job IDs instead of void- Job IDs are now numbers (64-bit) instead of 32-bit integers
What's Changed
- Add printBytes function to Printer and add typing and functions for standard CUPS options by @esimkowitz in #142
- Use
printerscrate native job tracking by @esimkowitz in #143 - Bump version to 0.6.0 by @esimkowitz in #144
Full Changelog: v0.5.10...v0.6.0