From 9cc131b9cbba3a68b199e1046791e811c08d12d8 Mon Sep 17 00:00:00 2001 From: Aric Camarata Date: Tue, 30 Jun 2026 14:57:58 -0400 Subject: [PATCH] add opt-in telemetry via @acamarata/telemetry (off by default) --- TELEMETRY.md | 8 ++++++++ package.json | 1 + src/index.ts | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 TELEMETRY.md diff --git a/TELEMETRY.md b/TELEMETRY.md new file mode 100644 index 0000000..99cfaa4 --- /dev/null +++ b/TELEMETRY.md @@ -0,0 +1,8 @@ +# Telemetry Disclosure + +This package supports opt-in anonymous usage telemetry via [`@acamarata/telemetry`](https://github.com/acamarata/telemetry). + +Telemetry is **off by default**. No data is sent unless you set `ACAMARATA_TELEMETRY=1`. + +Full disclosure (what is sent, where it goes, how to disable): +[github.com/acamarata/telemetry/blob/main/TELEMETRY.md](https://github.com/acamarata/telemetry/blob/main/TELEMETRY.md) diff --git a/package.json b/package.json index f181cef..46aa662 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "devDependencies": { "@acamarata/eslint-config": "^0.1.0", "@acamarata/prettier-config": "^0.1.0", + "@acamarata/telemetry": "^0.1.0", "@acamarata/tsconfig": "^0.1.0", "@eslint/js": "^10.0.1", "@types/node": "^22.15.0", diff --git a/src/index.ts b/src/index.ts index e1083db..c7e46f1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -104,3 +104,14 @@ export function isValidHijriDate( export function daysInHijriMonth(hy: number, hm: number, options?: ConversionOptions): number { return getCalendar(options?.calendar ?? "uaq").daysInMonth(hy, hm); } + +// ── Opt-in anonymous telemetry ──────────────────────────────────────────────── +// Off by default. Enable: ACAMARATA_TELEMETRY=1 +// What is sent + how to disable: https://github.com/acamarata/telemetry/blob/main/TELEMETRY.md +import('@acamarata/telemetry') + .then(({ track }) => + track('load', { package: 'hijri-core', version: '1.0.4' }), + ) + .catch(() => { + // telemetry not installed or disabled — that's fine + });