Skip to content

Commit

Permalink
fix: adjust exports to better accomodate ESM and/or CJS
Browse files Browse the repository at this point in the history
  • Loading branch information
brianphillips committed May 28, 2024
1 parent bd3868c commit a905547
Show file tree
Hide file tree
Showing 9 changed files with 271 additions and 8,902 deletions.
2 changes: 0 additions & 2 deletions .commitlintrc.yml

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ For more information on configuring retries, see [Retry Topic Naming Strategies]
To use this module, create an `AsyncRetryHelper` object with the parameters that specify the retry delay, retry strategy, and number of retries, as in this example:

```typescript
import AsyncRetryHelper, { RetryTopicNaming } from "kafkajs-async-retry";
import { AsyncRetryHelper, RetryTopicNaming } from "kafkajs-async-retry";

const asyncRetryHelper = new AsyncRetryHelper({
producer,
Expand Down Expand Up @@ -113,8 +113,7 @@ Here's a complete example:

```typescript
const { Kafka } = require("kafkajs");
const AsyncRetryHelper,
{ RetryTopicNaming } = require("kafkajs-async-retry");
const { AsyncRetryHelper, RetryTopicNaming } = require("kafkajs-async-retry");

const kafka = new Kafka({
clientId: "my-app",
Expand Down Expand Up @@ -261,7 +260,7 @@ Here's a sequence diagram of the various topics needing when using a `DELAY_BASE

### `AsyncRetryHelper` (constructor)

This is the default export and is the primary entry point for all functionality provided by this module.
This is the default export (but also exported as a named export) and is the primary entry point for all functionality provided by this module.
It accepts a single argument, an object with the following properties:

| Property | Type | Description |
Expand Down
Loading

0 comments on commit a905547

Please sign in to comment.