atom / telemetry

sends usage metrics to GitHub's internal analytics pipeline
MIT License
11 stars 12 forks source link

Prepare telemetry to support multiple database implementations #27

Closed rafeca closed 5 years ago

rafeca commented 5 years ago

This PR does some minimum changes to the telemetry package to allow supporting multiple implementation of databases.

This will allow us to tackle https://github.com/atom/telemetry/issues/26 by creating a new IndexedDB database implementation.

In order to do so, I've moved the database.ts file to databases/loki.ts and created a databases/base.ts which contains the TypeScript interface that all database implementations will have to follow.

Additional changes that I've done as part of this PR (I'd loved to make them as separate PRs but they are all dependant between each other, and dependant PRs on GitHub are not handled very well 😅):