Skip to content

Releases: esimkowitz/printers-js

v0.8.3

15 Nov 23:48
762d263

Choose a tag to compare

What's Changed

Full Changelog: v0.8.2...v0.8.3

v0.8.2

29 Oct 00:02
7df34c3

Choose a tag to compare

What's Changed

Full Changelog: v0.8.1...v0.8.2

v0.8.1

27 Oct 01:11
1e9d1f7

Choose a tag to compare

What's Changed

  • Simplify runtime detection and binary loader

Full Changelog: v0.8.0...v0.8.1

v0.8.0

26 Oct 22:29
daab2cf

Choose a tag to compare

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 /docs directory
  • 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 PrinterState union type for compile-time state validation
  • All state-related interfaces now use PrinterState instead of string
  • Better IDE autocomplete and type checking
  • Enhanced toString() method: outputs "Printer Name (default) [state]"

Testing

  • Added /media directory 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 PrinterWrapperImpl to use JavaScript Proxy pattern (25% less code)
  • Cleaned up NativePrinter interface to accurately represent Rust FFI boundary
  • Fixed property exposure - all NativePrinter properties 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

16 Sep 23:56
08d1a22

Choose a tag to compare

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

16 Sep 23:22
7612f95

Choose a tag to compare

What's Changed

Full Changelog: v0.7.2...v0.7.3

v0.7.2

16 Sep 20:30
0197aab

Choose a tag to compare

What's Changed

Full Changelog: v0.7.1...v0.7.2

v0.7.1

16 Sep 17:36
011fd03

Choose a tag to compare

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

16 Sep 07:24
03ff8ec

Choose a tag to compare

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

15 Sep 22:52
ee41406

Choose a tag to compare

🎯 Major Feature: Enhanced Job Tracking

Comprehensive Job Management Aligned with Upstream printers Crate

  • Enhanced Job Structure: Updated PrinterJob interface with comprehensive metadata including timestamps, media types, and error tracking
  • Job State Management: Added PrinterJobState enum with states: PENDING, PAUSED, PROCESSING, CANCELLED, COMPLETED, UNKNOWN
  • Advanced Timestamps: Multi-timestamp tracking with createdAt, processedAt, and completedAt fields
  • 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 JobStatus interface 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=true by default

🚀 Breaking Changes

  • Job tracking fields now use camelCase (mediaType, createdAt, etc.)
  • printFile() and printBytes() now return job IDs instead of void
  • Job IDs are now numbers (64-bit) instead of 32-bit integers

What's Changed

Full Changelog: v0.5.10...v0.6.0