Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .eslintrc.cjs

This file was deleted.

32 changes: 14 additions & 18 deletions .github/workflows/main.yml → .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [14.x]
node-version: [24.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand All @@ -24,11 +24,11 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [20.x, 22.x, 24.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: |
Expand All @@ -45,23 +45,19 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [14.x]
node-version: [24.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: |
npm install
cd test
npm install
- run: npm install
- name: Generate coverage report
run: |
cd test
npm run coverage-ci
run: npm run coverage-ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5
with:
file: ./coverage/lcov.info
files: ./coverage/lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# async-node-events ChangeLog

## 4.0.0 - 2026-xx-xx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 4.0.0 - 2026-xx-xx
## 3.1.0 - 2026-xx-xx


### Changed
- **BREAKING**: Only support Node.js >=20.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not considered a breaking change in our policy.

- Update dev dependencies.

### Fixed
- Add `package.json` `files` field.

## 3.0.0 - 2022-04-13

### Changed
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# async-node-events
# @digitalbazaar/async-node-events

[![NPM Version](https://img.shields.io/npm/v/async-node-events.svg?style=flat-square)](https://npm.im/async-node-devents)
[![Build Status](https://travis-ci.org/digitalbazaar/async-node-events.png?branch=master)](https://travis-ci.org/digitalbazaar/async-node-events)
[![Build Status](https://img.shields.io/github/actions/workflow/status/digitalbazaar/bedrock/main.yaml)](https://github.com/digitalbazaar/bedrock/actions/workflows/main.yaml)

An EventEmitter replacement that allows both asynchronous and synchronous
emissions and handlers. This is entirely based off of and almost entirely
Expand Down Expand Up @@ -33,14 +33,14 @@ use ``emitSync`` to emit ``newListener``, ``removeListener``, and
## Install

```sh
npm install async-node-events
npm install @digitalbazaar/async-node-events
```

## Usage

```js
var EventEmitter = require('async-node-events').EventEmitter;
var util = require('util');
import {EventEmitter} from '@digitalbazaar/async-node-events';
const util = require('node:util');

(async () => {
const myEmitter = new EventEmitter();
Expand All @@ -61,7 +61,8 @@ util.inherits(MyEmittingObject, EventEmitter);
The API is intended to be a mostly-drop-in replacement for Node.js'
`EventEmitter` object, except with support for asynchronous listeners.

The primary differences between the `EventEmitter` and `async-node-events` are:
The primary differences between the `EventEmitter` and
`@digitalbazaarasync-node-events` are:

1. Passing the maximum number of listeners allowed will fire off a
``maxListenersPassed`` event with the event name and listener count as
Expand Down
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import config from '@digitalbazaar/eslint-config/universal-recommended';

export default [
...config
];
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"description": "Asynchronous EventEmitter",
"scripts": {
"lint": "eslint 'lib/*.js' 'test/*.js'",
"lint": "eslint",
"coverage": "cross-env NODE_ENV=test c8 --reporter=lcov --reporter=text-summary npm test",
"coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly npm test",
"coverage-report": "c8 report",
Expand Down Expand Up @@ -34,22 +34,23 @@
"url": "https://github.com/digitalbazaar/async-node-events"
},
"main": "./lib/index.js",
"files": [
"lib/**/*.js"
],
"dependencies": {
"is-promise": "^4.0.0"
},
"devDependencies": {
"c8": "^7.11.0",
"chai": "^4.3.6",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint-config-digitalbazaar": "^2.8.0",
"eslint-plugin-jsdoc": "^39.2.1",
"jsdoc-to-markdown": "^7.1.1",
"mocha": "^9.2.2",
"@digitalbazaar/eslint-config": "^8.0.1",
"c8": "^11.0.0",
"chai": "^6.2.2",
"cross-env": "^10.1.0",
"eslint": "^9.39.3",
"mocha": "^11.7.5",
"mocha-lcov-reporter": "^1.3.0"
},
"engines": {
"node": ">=14"
"node": ">=20"
},
"c8": {
"exclude": [
Expand Down
5 changes: 0 additions & 5 deletions test/.eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion test/event-emitter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {expect} from 'chai';
import {EventEmitter} from '../lib/index.js';
import {expect} from 'chai';

describe('EventEmitter', function() {
describe('#constructor', function() {
Expand Down