v3.1.0: YAML parsing
After years of maintaining a zero-dependency library, this release introduces yaml
as our first dependency. This change enables proper TypeScript types for all list and stats commands, eliminating the need for users to implement their own YAML parsing.
π¨ Breaking Changes
- Added
yaml
as a dependency (previously zero dependencies) - Renamed
getCurrentTube()
tolistTubeUsed()
for better alignment with Beanstalkd protocol - All stats and list commands now return parsed JavaScript objects instead of raw YAML strings:
listTubes()
βstring[]
listTubesWatched()
βstring[]
listTubeUsed()
βstring
stats()
βSystemStats
statsJob()
βJobStats
statsTube()
βTubeStats
- All YAML keys are now camelCased (e.g.,
current-tubes
βcurrentTubes
)
π Bug Fixes
- Fixed package.json exports configuration
- Added types export
- Added default export
- Properly configured CJS/ESM exports
Migration Guide
If you were previously parsing YAML responses manually, you can now use the parsed objects directly.
// Before
const tubesYAML = await client.listTubes();
const tubes = parseYAML(tubesYAML);
// After
const tubes = await client.listTubes(); // Returns string[] directly