Skip to content

Commit f883b22

Browse files
authored
Formally declare Bun support (#149)
This is a follow-on to the official Deno support work in #148.
1 parent c881d93 commit f883b22

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ jobs:
7979
run: |
8080
deno --allow-all test-other/integration_check_deno.ts
8181
82+
test-bun-integration:
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v4
86+
87+
- name: Install Bun
88+
uses: oven-sh/setup-bun@v2
89+
with:
90+
bun-version: '1.0.36'
91+
92+
- name: Install dependencies
93+
run: bun install
94+
95+
- name: Check Integration
96+
env:
97+
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
98+
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }}
99+
DATADOG_SITE: ${{ secrets.DATADOG_API_HOST }}
100+
run: |
101+
bun test-other/integration_check.mjs '-bun'
102+
82103
lint:
83104
runs-on: ubuntu-latest
84105
steps:

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
[![NPM Version][npm-image]][npm-url]
55
[![Build Status][ci-status-image]][ci-status-url]
66
[![Downloads Stats][npm-downloads]][npm-url]
7-
![deno compatibility][deno-image]
7+
![Supports Deno 2.1 and Newer][deno-image]
8+
![Supports Bun 1.0 and Newer][bun-image]
89

910
Datadog-metrics lets you collect application metrics through Datadog's HTTP API. Using the HTTP API has the benefit that you **don't need to install the Datadog Agent (StatsD)**. Just get an API key, install the module and you're ready to go.
1011

1112
The downside of using the HTTP API is that it can negatively affect your app's performance. Datadog-metrics **solves this issue by buffering metrics locally and periodically flushing them** to Datadog.
1213

1314
## Installation
1415

15-
Datadog-metrics is compatible with Node.js v14 and later and Deno 2.1 and later. You can install it with NPM:
16+
Datadog-metrics is compatible with Node.js v14+, Deno 2.1+, and Bun 1.0+. You can install it with NPM:
1617

1718
```sh
1819
npm install datadog-metrics --save
@@ -372,13 +373,13 @@ Contributions are always welcome! For more info on how to contribute or develop
372373

373374
**Breaking Changes:**
374375

375-
* The minimum required Node.js version is now v14.0.0 and Deno version is 2.1.0.
376+
* The minimum required Node.js version is now v14.0.0, Deno version is 2.1.0, and Bun version is 1.0.0.
376377

377378
* The `code` property on `AuthorizationError` instances has been changed to `DATADOG_METRICS_AUTHORIZATION_ERROR` for clarity and consistency (it was previously `DATADOG_AUTHORIZATION_ERROR`). If you are using `errorInstance.code` to check types, make sure to update the string you were looking for.
378379

379380
**New Features:**
380381

381-
* Clarify this package is compatible with Deno (>= v2.1). We’ve silently worked on Deno for a long time, but never formally supported it before this release.
382+
* Clarify this package is compatible with Deno (>= v2.1) and Bun (>= 1.0). We’ve silently worked on Deno and Bun for a long time, but never formally supported them before this release.
382383

383384
**Deprecations:**
384385

@@ -800,4 +801,5 @@ Your contributions are always welcome! See [`CONTRIBUTING.md`](./CONTRIBUTING.md
800801
[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square
801802
[ci-status-image]: https://github.com/dbader/node-datadog-metrics/actions/workflows/ci.yml/badge.svg?branch=main
802803
[ci-status-url]: https://github.com/dbader/node-datadog-metrics/actions/workflows/ci.yml?query=branch%3Amain
803-
[deno-image]: https://shield.deno.dev/deno/^2.1
804+
[deno-image]: https://img.shields.io/badge/Deno-^2.1-blue?logo=deno&color=70ffaf&logoColor=ffffff
805+
[bun-image]: https://img.shields.io/badge/Bun-^1.0-blue?logo=bun&color=f368e0

test-other/integration_check.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { main } from './integration_check_lib.mjs';
88

9-
main().catch(error => {
9+
main({ tagSuffix: process.argv[2] || '' }).catch(error => {
1010
process.exitCode = 1;
1111
console.error(error);
1212
});

0 commit comments

Comments
 (0)