feat: modernize tooling and bump all dependencies#182
Merged
Conversation
- Bump all dependencies to latest: aedes ^1.0.1, aedes-persistence-redis ^11.2.2, minimatch ^10.2.4, mqemitter-mongodb ^9.0.1, yargs ^18.0.0, and others - Replace standard + snazzy with eslint + neostandard (flat config) - Replace tap with node:test + node:assert - Delete .taprc (no longer needed) - Fix aedes v1.0 breaking changes: Aedes is now a class (requires `new`), named export, persistence no longer exposed on broker instance - Fix yargs v18 breaking change: must call Yargs() to get instance - Fix server listen error handling to properly reject on EADDRINUSE - Bump all GitHub Actions to latest: checkout@v6, setup-node@v6, setup-buildx-action@v4, setup-qemu-action@v4, login-action@v4, metadata-action@v6, build-push-action@v7 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace mvertes/alpine-mongo (MongoDB 3.6) with mongo:7 in CI workflow. The updated mongodb driver requires at least MongoDB 4.2 (wire version 8). - Update health check command from `mongo` to `mongosh` for mongo:7. - Return `mq` emitter from start() so tests can properly close it. - Await persistence.destroy() and close mq emitter in test helper stop() to prevent process hangs during persistence tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…testing - Use Aedes.createBroker() instead of new Aedes() to properly initialize persistence via the listen() method (aedes v1.0 requires this) - Remove stale waitForReady/once(persistence, 'ready') logic — the new persistence versions handle readiness internally via setup() - Simplify persistence.js: remove waitForReady flags, use SUPPORTED array - Add docker-compose-test.yml with MongoDB 7 and Redis 7 for local testing - Use --test-force-exit to handle lingering persistence connections (aedes-persistence-mongodb has a known race condition during destroy) - Simplify test helper stop(): just close servers and broker Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wait for mqemitter-mongodb's _executingBulk to complete before calling broker.close(), preventing an unhandled rejection from an in-flight bulkWrite being interrupted by the client connection closing. This removes the need for --test-force-exit. Upstream fix: mcollina/mqemitter-mongodb#65 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Modernizes the project’s tooling and dependencies to align with the latest Node ecosystem (notably migrating from tap→node:test, standard→eslint/neostandard) and updates runtime code to accommodate breaking dependency changes (Aedes v1, yargs v18), plus CI/Docker updates.
Changes:
- Bumped major dependencies (Aedes, yargs, minimatch, mqemitter-mongodb, etc.) and adjusted CLI/runtime integration.
- Migrated test suite to
node:test+node:assert/strictand removed Tap config. - Introduced ESLint flat config with neostandard, added docker-compose for test services, and updated GitHub Actions workflows.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
lib/cli.js |
Updates yargs initialization and Aedes broker/server startup logic for breaking dependency changes. |
lib/persistence.js |
Simplifies supported persistence/mq validation logic. |
package.json |
Updates scripts and bumps dependencies/devDependencies to new tooling stack. |
eslint.config.js |
Adds ESLint flat config using neostandard preset. |
test/cli.test.js |
Migrates CLI tests from tap to node:test/assert and adjusts ports/expectations. |
test/authorizer.test.js |
Migrates authorizer tests from tap to node:test/assert. |
test/persistence.test.js |
Migrates persistence test from tap to node:test. |
test/helper.js |
Updates teardown logic for multi-server start + new persistence/mq handling. |
docker-compose-test.yml |
Adds local MongoDB/Redis services for running persistence tests. |
.github/workflows/ci.yml |
Updates CI service images/health checks and bumps Actions versions. |
.github/workflows/dockerbuild.yml |
Bumps Docker build workflow actions versions. |
.taprc |
Removes Tap configuration as part of the node:test migration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major tooling modernization and dependency bump:
Dependencies bumped to latest
new Aedes()), named export,persistenceno longer on brokerYargs()to get instanceLinting: standard → eslint + neostandard
standardandsnazzydevDependencieseslint(^9.27.0) andneostandard(^0.13.0)eslint.config.jsusing ESLint flat config with neostandard presetlint:standard→lintTesting: tap → node:test
tapdevDependencynode:test+node:assert/strictt.plan()/t.equal()/t.same()/t.not()/t.teardown()withassert.equal()/assert.deepEqual()/assert.notEqual()/t.after()/assert.rejects().taprcconfig filetap test/*.test.js→node --test test/*.test.jsCode fixes for breaking changes
Aedesis now a class requiringnew, exported as named export.broker.persistenceis no longer exposed — the persistence reference is now kept separately and returned fromstart()require('yargs')now returns a factory function — must callYargs()to create an instancecreateServer()to useserver.on('error', reject)instead of relying on the listen callback for errors (which doesn't receive them in modern Node.js)GitHub Actions bumped
actions/checkout: v5 → v6actions/setup-node: v5 → v6docker/setup-buildx-action: v3 → v4docker/setup-qemu-action: v3 → v4docker/login-action: v3 → v4docker/metadata-action: v5 → v6docker/build-push-action: v5 → v7Test plan
npm run lintpasses (eslint with neostandard)node --test test/cli.test.js test/authorizer.test.js— all 8 tests passCloses #181
🤖 Generated with Claude Code