Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x]


steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A Promisified layer over [rhea](https://github.com/amqp/rhea) AMQP client.

## Pre-requisite ##
- **Node.js version: 6.x or higher.**
- **Node.js version: 20.x or higher.**
- We would **still encourage you** to install the latest available LTS version at any given time from https://nodejs.org. **It is a good practice to always install the latest available LTS version of node.js.**
- Installing node.js on **Windows or macOS** is very simple with available installers on the [node.js website](https://nodejs.org). If you are using a **linux based OS**, then you can find easy to follow, one step installation instructions over [here](https://nodejs.org/en/download/package-manager/).

Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 3.0.4 - (Unreleased)

- Upgrade TypeScript to 6.0 and switch `module` to `nodenext` to remove auto-generated `/// <reference types="node" />` directives from typings.
- Update minimum Node.js version to 20.x (Node 16 and 18 are EOL).
- Update `@types/node` to ^20.0.0.

### 3.0.3 - (2024-06-12)

- Release the resources if `Session.createReceiver()` rejects due to timeout.
Expand Down
2 changes: 1 addition & 1 deletion lib/awaitableSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
* @interface PromiseLike
*/
export interface PromiseLike {
resolve: (value?: any) => void;

Check warning on line 23 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Unexpected any. Specify a different type

Check warning on line 23 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected any. Specify a different type
reject: (reason?: any) => void;

Check warning on line 24 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Unexpected any. Specify a different type

Check warning on line 24 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected any. Specify a different type
timer: NodeJS.Timer;
timer: ReturnType<typeof setTimeout>;
}

/**
* Describes the event listeners that can be added to the AwaitableSender.
* @interface Sender
*/
export declare interface AwaitableSender {

Check warning on line 32 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Unsafe declaration merging between classes and interfaces

Check warning on line 32 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Unsafe declaration merging between classes and interfaces
on(event: SenderEvents, listener: OnAmqpEvent): this;
}

Expand Down Expand Up @@ -63,7 +63,7 @@
* Describes the sender where one can await on the message being sent.
* @class AwaitableSender
*/
export class AwaitableSender extends BaseSender {

Check warning on line 66 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Unsafe declaration merging between classes and interfaces

Check warning on line 66 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Unsafe declaration merging between classes and interfaces
/**
* @property {Map<number, PromiseLike} deliveryDispositionMap Maintains a map of delivery of
* messages that are being sent. It acts as a store for correlating the dispositions received
Expand Down Expand Up @@ -230,11 +230,11 @@

const delivery = (this._link as RheaSender).send(msg, options.tag, options.format);
this.deliveryDispositionMap.set(delivery.id, {
resolve: (delivery: any) => {

Check warning on line 233 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Unexpected any. Specify a different type

Check warning on line 233 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected any. Specify a different type
resolve(delivery);
removeAbortListener();
},
reject: (reason?: any) => {

Check warning on line 237 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (22.x)

Unexpected any. Specify a different type

Check warning on line 237 in lib/awaitableSender.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected any. Specify a different type
reject(reason);
removeAbortListener();
},
Expand Down
2 changes: 1 addition & 1 deletion lib/log.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License. See License in the project root for license information.

import * as debugModule from "debug";
import debugModule from "debug";
/**
* @ignore
* log statements for container
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@types/chai": "^4.3.7",
"@types/debug": "^4.0.0",
"@types/mocha": "^10.0.0",
"@types/node": "^16.0.0",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "~7.8.0",
"@typescript-eslint/parser": "~7.8.0",
"chai": "^4.3.10",
Expand All @@ -41,7 +41,7 @@
"mocha": "^10.0.0",
"rimraf": "^5.0.5",
"ts-node": "^10.0.0",
"typescript": "~5.0.4"
"typescript": "^6.0.2"
},
"scripts": {
"lint": "eslint .",
Expand Down
4 changes: 1 addition & 3 deletions review/rhea-promise.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

```ts

/// <reference types="node" />

import { AmqpError } from 'rhea';
import { Connection as Connection_2 } from 'rhea';
import { ConnectionError } from 'rhea';
Expand Down Expand Up @@ -428,7 +426,7 @@ interface PromiseLike_2 {
// (undocumented)
resolve: (value?: any) => void;
// (undocumented)
timer: NodeJS.Timer;
timer: ReturnType<typeof setTimeout>;
}
export { PromiseLike_2 as PromiseLike }

Expand Down
2 changes: 1 addition & 1 deletion test/connection.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as rhea from "rhea";
import rhea from "rhea";
import { assert } from "chai";
import { Connection, ConnectionEvents, ConnectionOptions, Container } from "../lib/index";
import { AbortController } from "@azure/abort-controller";
Expand Down
2 changes: 1 addition & 1 deletion test/receiver.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as rhea from "rhea";
import rhea from "rhea";
import { assert } from "chai";
import { Connection } from "../lib/index";
import { AddressInfo } from "net";
Expand Down
2 changes: 1 addition & 1 deletion test/sender.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as rhea from "rhea";
import rhea from "rhea";
import { assert } from "chai";
import { Connection, InsufficientCreditError } from "../lib/index";
import { AbortController } from "@azure/abort-controller";
Expand Down
2 changes: 1 addition & 1 deletion test/session.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as rhea from "rhea";
import rhea from "rhea";
import { assert } from "chai";
import { Connection, SessionEvents, Session } from "../lib/index";
import { AbortController } from "@azure/abort-controller";
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"compilerOptions": {
"module": "commonjs",
"module": "nodenext",
"moduleResolution": "nodenext",
"preserveConstEnums": true,
"sourceMap": true,
"newLine": "LF",
"target": "es2015",
"importHelpers": true,
"moduleResolution": "node",
"types": ["node", "mocha", "chai"],
Comment thread
deyaaeldeen marked this conversation as resolved.
"noImplicitReturns": true,
"outDir": "dist",
"allowJs": false,
Expand Down
Loading