Skip to content

Conversation

@maxlath
Copy link

@maxlath maxlath commented Oct 29, 2025

I started this work without a clear idea of where I was going, mostly to figure-out how to make level-ttl work with rave-level in my use-case, thus the many changes. But maybe that work can be useful for others?

Changes summary

  • Replaced callbacks with promises. This required to replace lock with async-lock. I dropped support for callbacks, which apparently will be the way going forward
  • Converted from CommonJS to ESM as that seems the most future-proof (but this wouldn't be hard to revert if needed)
  • Updated tests with promises and mocha: I went that way because that's the tool I know, but if important for consistency with the other modules, I guess it could be converted back to using tape. For tests coverage, I replaced nyc with c8 as the former doesn't seem to support ESM, but I couldn't find how to produce lcov.info with c8, so that could be a reason to switch back to CJS if that's important
  • Added types. I have some uncertainties around the Encoding type, proofreading welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant