diff --git a/.github/workflows/test-multi-version.yml b/.github/workflows/test-multi-version.yml index 7b4da71..f675cc4 100644 --- a/.github/workflows/test-multi-version.yml +++ b/.github/workflows/test-multi-version.yml @@ -12,6 +12,7 @@ jobs: strategy: fail-fast: false matrix: + node-version: ${{ github.event_name == 'pull_request' && fromJSON('["22"]') || fromJSON('["16", "18", "20", "22", "24"]') }} rabbitmq-version: - "3.9-management" - "3.10-management" @@ -20,16 +21,18 @@ jobs: - "3.13-management" - "4.0-management" - "4.1-management" - - name: Test RabbitMQ ${{ matrix.rabbitmq-version }} - + - "4.2-management" + - "4.3-management" + + name: Node ${{ matrix.node-version }} · RabbitMQ ${{ matrix.rabbitmq-version }} + steps: - uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '22' + node-version: ${{ matrix.node-version }} - name: Install dependencies run: npm install diff --git a/README.md b/README.md index 997d369..4dc5097 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,7 @@ This is the hook you want when you're piping logs into Winston, Bunyan, Datadog, | `url` | `string` | — | The URL of the RabbitMQ server. | | `reconnectDelay` | `number` | `5000` | Delay in milliseconds before attempting to reconnect after a disconnection. | | `maxReconnectAttempts` | `number` | `5` | Maximum number of reconnection attempts. | +| `usePublisherConfirms` | `boolean` | `true` | Enable RabbitMQ publisher confirms on the user publish channel. When `true`, `publish()` resolves only after the broker acks the message and rejects on broker error. Set to `false` for fire-and-forget publishing. _Available in 2.x._ | | `management` | `ManagementConfiguration` | — | RabbitMQ management API configuration. | --- diff --git a/package.json b/package.json index f41997d..eb116d0 100644 --- a/package.json +++ b/package.json @@ -55,10 +55,10 @@ "@semantic-release/git": "^10.0.1", "@semantic-release/github": "^11.0.1", "@semantic-release/release-notes-generator": "^11.0.7", - "@types/jest": "^30.0.0", + "@types/jest": "^29.5.12", "@types/node": "^22.0.0", "eslint": "^9.29.0", - "jest": "^30.0.3", + "jest": "^29.7.0", "patch-package": "^8.0.1", "semantic-release": "^24.2.0", "ts-jest": "^29.4.0", diff --git a/tests/e2e/RunMQ.resubscribe.e2e.test.ts b/tests/e2e/RunMQ.resubscribe.e2e.test.ts index da5fe2b..819ec48 100644 --- a/tests/e2e/RunMQ.resubscribe.e2e.test.ts +++ b/tests/e2e/RunMQ.resubscribe.e2e.test.ts @@ -124,7 +124,7 @@ describe('RunMQ Consumer Channel Resubscription E2E', () => { // Force-close only the connection(s) holding consumers for our queue. // Scoping by queue avoids killing unrelated parallel-test connections. - const {closed, consumerTags} = await closeConnectionsForQueue(configuration.name, 5000); + const {closed, consumerTags} = await closeConnectionsForQueue(configuration.name, 20000); expect(closed.size).toBeGreaterThan(0); // Wait until a NEW consumer (different tag from the one we killed) is