Skip to content

Version 2.0:#46

Merged
jankarres merged 13 commits into
masterfrom
v2
Nov 9, 2025
Merged

Version 2.0:#46
jankarres merged 13 commits into
masterfrom
v2

Conversation

@jankarres
Copy link
Copy Markdown
Member

Breaking Changes

  • Postinstall now auto-downloads a platform-specific LAME binary into vendor/lame/<platform>-<arch>/. Pipelines must permit the download step or configure LAME_BINARY, LAME_SKIP_DOWNLOAD, or LAME_FORCE_DOWNLOAD to control it (more details see README.md).
  • The minimum Node.js version is 20 and the library is published as an ESM-first package with explicit exports. CommonJS imports are still supported. Deep imports like require("node-lame/lib/...") are no longer supported.

Features

  • Introduced duplex streaming helpers (createLameEncoderStream / createLameDecoderStream) so audio can flow through stdin/stdout while progress events continue to fire (#11).
  • Lame#setBuffer accepts ArrayBuffer and all typed arrays, automatically normalizing samples to the requested bit depth and endianness (#33).
  • Broadened CLI option support: gapless playback controls, priority/disptime tuning, channel swapping, gain, decode delay trimming, VBR fine-tuning, verbosity toggles, and custom ID3 frames via meta.custom.
  • Exported resolveBundledLameBinary and resolveLameBinary so applications can inspect or override the binary chosen at runtime.

Improvements

  • spawnLameProcess now drives all CLI interaction, guaranteeing consistent progress parsing and normalized warning/error messages.
  • Temp files live under join(tmpdir(), "node-lame"), are created lazily, and are cleaned up automatically, even after failures.
  • Documentation now covers the installer environment variables, typed-array ingestion, gapless workflows, and streaming usage.

Tooling & Quality

  • Builds now originate from modern TypeScript sources compiled by tsup into dual ESM/CJS bundles with generated typings.
  • Vitest-based unit and integration suites stub binaries, simulate streaming backpressure, and assert option coverage.
  • The installer maintains a deterministic vendor layout, making binary resolution reproducible across platforms.
  • Introduced CI/CD pipelines that lint, type-check, run unit and integration suites, and gate release publishing so every change ships through the same automated path.

@jankarres jankarres merged commit adbd05e into master Nov 9, 2025
10 checks passed
@jankarres jankarres deleted the v2 branch November 9, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant