Skip to content

v3.1.0: YAML parsing

Latest
Compare
Choose a tag to compare
@divmgl divmgl released this 19 Jan 20:38
· 1 commit to master since this release

My original intent with this library was to avoid adding any dependencies. I'm happy that I've kept that goal for as long as I have! In practice, however, it's not ideal to have to do your own YAML parsing in order to convert stats and list command responses to proper JavaScript objects.

Because of this, I've added the yaml package as a single dependency, and I've added proper TypeScript types for all of the list and stats commands.

🔨 Breaking Changes

  • Added yaml as a single dependency (previously had no dependencies)
  • getCurrentTube was renamed to listTubeUsed to better align with the naming in the Beanstalkd protocol
  • YAML parsing for stats and list commands now returns proper JavaScript objects instead of raw YAML strings
    • listTubes() returns string[]
    • listTubesWatched() returns string[]
    • listTubesUsed() returns string
    • stats() returns SystemStats
    • statsJob() returns JobStats
    • statsTube() returns TubeStats
    • Keys are camelCased, so current-tubes becomes currentTubes, current-connections becomes currentConnections, etc.

🐛 Bug Fixes

  • Added proper exports configuration in package.json (it was broken before, sorry)
    • Added types export
    • Added default export
    • Properly configured CJS/ESM exports