mirror of
https://github.com/acamarata/hijri-core.git
synced 2026-07-01 11:14:28 +00:00
add opt-in anonymous telemetry (#1)
Some checks failed
CI / Test (Node 20) (push) Failing after 32s
CI / Test (Node 22) (push) Failing after 33s
CI / Test (Node 24) (push) Failing after 38s
CI / Lint (push) Failing after 40s
CI / Typecheck (push) Failing after 29s
CI / Pack check (push) Failing after 34s
CI / Coverage (push) Failing after 3s
Some checks failed
CI / Test (Node 20) (push) Failing after 32s
CI / Test (Node 22) (push) Failing after 33s
CI / Test (Node 24) (push) Failing after 38s
CI / Lint (push) Failing after 40s
CI / Typecheck (push) Failing after 29s
CI / Pack check (push) Failing after 34s
CI / Coverage (push) Failing after 3s
* add opt-in telemetry via @acamarata/telemetry (off by default) * chore: update lockfile for @acamarata/telemetry devDep * chore: fix prettier formatting on telemetry import
This commit is contained in:
parent
9367a45ac8
commit
3c762bd694
4 changed files with 27 additions and 0 deletions
8
TELEMETRY.md
Normal file
8
TELEMETRY.md
Normal file
|
|
@ -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)
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ importers:
|
|||
'@acamarata/prettier-config':
|
||||
specifier: ^0.1.0
|
||||
version: 0.1.0(prettier@3.8.1)
|
||||
'@acamarata/telemetry':
|
||||
specifier: ^0.1.0
|
||||
version: 0.1.0
|
||||
'@acamarata/tsconfig':
|
||||
specifier: ^0.1.0
|
||||
version: 0.1.0
|
||||
|
|
@ -84,6 +87,10 @@ packages:
|
|||
peerDependencies:
|
||||
prettier: '>=3.0.0'
|
||||
|
||||
'@acamarata/telemetry@0.1.0':
|
||||
resolution: {integrity: sha512-iP09ZD0bHencHLbv6kQZDgwN9crLCWGKxmiMrfJjhBCoWTgv4koSgg0Li/LFKwCCFluua6orj9fVeQ8eqcJXSQ==}
|
||||
engines: {node: '>=20'}
|
||||
|
||||
'@acamarata/tsconfig@0.1.0':
|
||||
resolution: {integrity: sha512-bgzyBak43mE+0HhduZX3cvaPjKcggtGGZZMjr35qtYWolsIWgZ9nx7OOswbVYoU35qoUv6rZ0mTK6GbZ8QTYjw==}
|
||||
engines: {node: '>=20'}
|
||||
|
|
@ -1552,6 +1559,8 @@ snapshots:
|
|||
dependencies:
|
||||
prettier: 3.8.1
|
||||
|
||||
'@acamarata/telemetry@0.1.0': {}
|
||||
|
||||
'@acamarata/tsconfig@0.1.0': {}
|
||||
|
||||
'@bcoe/v8-coverage@1.0.2': {}
|
||||
|
|
|
|||
|
|
@ -104,3 +104,12 @@ 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
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue