pg-listen icon indicating copy to clipboard operation
pg-listen copied to clipboard

Modernize and simplify

Open dchenk opened this issue 1 year ago • 0 comments

Hello. This PR includes kind of a lot in it, so I apologize in advance. But I think all the changes help make this library more robust and up-to-date with best practices.

Major changes:

  • A named createSubscriber function export rather than a default.
  • ES Module only (on CommonJS).
  • Removed TypedEventEmitter for better runtime type safety. The rationale is that TypedEventEmitter purely type asserts, but in practice you could technically get any sort of payload for notification events. Along with this change I've replaced all instances of the any type with unknown.

Also, internal changes:

  • Use GitHub Actions instead of Travis CI.
  • Replace TSLint with ESLint.
  • Upgraded TypeScript and all other dependencies.
  • Changed to Vitest for the test framework.

dchenk avatar Jun 03 '24 02:06 dchenk