bbc / sqs-consumer

Build Amazon Simple Queue Service (SQS) based applications without the boilerplate
https://bbc.github.io/sqs-consumer/
Other
1.71k stars 330 forks source link

feat!: transitioning to ESM #476

Closed nicholasgriffintn closed 3 months ago

nicholasgriffintn commented 3 months ago

Resolves #467, #466

Description:

To support modern development, this package needs to transition from commonjs, this PR upgrades the codebase across the board to transition (builds will still output to esm and cjs).

It also upgrades a couple of dependencies that were blocked by still not being ESM, chai and p-event.

A discussion for this has been opened up here: https://github.com/bbc/sqs-consumer/discussions/477

Type of change:

Why is this change required?:

In order to still be able to update dependencies while supporting and using modern development practices.

Code changes:

For ESM and base:

For CJS:

Retains the current config

codeclimate[bot] commented 3 months ago

Code Climate has analyzed commit a411c003 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Style 1

The test coverage on the diff in this pull request is 98.2% (80% is the threshold).

This pull request will bring the total coverage in the repository to 98.3% (0.0% change).

View more on Code Climate.