Migrated to node EventEmitter/allow api-compliant middleware.