From 27c863b469d4012213d4ae57b8d0e3ef0fd00d25 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Mon, 14 Oct 2024 10:20:08 +0200 Subject: [PATCH 1/2] No longer necessary to remove id and change time to number --- src/core/WakaTimeCore.ts | 20 +------------------- src/types/heartbeats.ts | 4 ---- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/core/WakaTimeCore.ts b/src/core/WakaTimeCore.ts index e85d70b..af8cddc 100644 --- a/src/core/WakaTimeCore.ts +++ b/src/core/WakaTimeCore.ts @@ -12,12 +12,7 @@ import { getSettings, Settings } from '../utils/settings'; import { getApiUrl } from '../utils/user'; import config, { ExtensionStatus } from '../config/config'; -import { - EntityType, - Heartbeat, - HeartbeatsBulkResponse, - HeartbeatThirdParty, -} from '../types/heartbeats'; +import { EntityType, Heartbeat, HeartbeatsBulkResponse } from '../types/heartbeats'; class WakaTimeCore { tabsWithDevtoolsOpen: Tabs.Tab[]; @@ -190,19 +185,6 @@ class WakaTimeCore { const request: RequestInit = { body: JSON.stringify( heartbeats.map((heartbeat) => { - if (!apiUrl.includes('wakatime.com')) { - const hb = { - branch: heartbeat.branch, - category: heartbeat.category, - entity: heartbeat.entity, - language: heartbeat.language, - plugin: heartbeat.plugin, - project: heartbeat.project, - time: parseFloat(heartbeat.time), - type: heartbeat.type, - } as HeartbeatThirdParty; - return { ...hb, userAgent }; - } return { ...heartbeat, userAgent }; }), ), diff --git a/src/types/heartbeats.ts b/src/types/heartbeats.ts index eb774bf..c409e78 100644 --- a/src/types/heartbeats.ts +++ b/src/types/heartbeats.ts @@ -10,10 +10,6 @@ export interface Heartbeat { type: EntityType; } -export interface HeartbeatThirdParty extends Omit { - time: number; -} - export enum Category { browsing = 'browsing', code_reviewing = 'code reviewing', From 2aa07804c8e8192f7e6af0c56ba50201e436ce15 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Mon, 14 Oct 2024 10:21:09 +0200 Subject: [PATCH 2/2] bump v4.0.9 --- src/manifests/chrome.json | 2 +- src/manifests/edge.json | 2 +- src/manifests/firefox.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/manifests/chrome.json b/src/manifests/chrome.json index d12ca72..d3a34bc 100644 --- a/src/manifests/chrome.json +++ b/src/manifests/chrome.json @@ -33,5 +33,5 @@ "page": "options.html" }, "permissions": ["alarms", "tabs", "storage", "activeTab"], - "version": "4.0.8" + "version": "4.0.9" } diff --git a/src/manifests/edge.json b/src/manifests/edge.json index b17f7f2..9e6e782 100644 --- a/src/manifests/edge.json +++ b/src/manifests/edge.json @@ -33,5 +33,5 @@ "page": "options.html" }, "permissions": ["alarms", "tabs", "storage", "activeTab"], - "version": "4.0.8" + "version": "4.0.9" } diff --git a/src/manifests/firefox.json b/src/manifests/firefox.json index fe46324..0fb2721 100644 --- a/src/manifests/firefox.json +++ b/src/manifests/firefox.json @@ -39,5 +39,5 @@ "page": "options.html" }, "permissions": ["alarms", "tabs", "storage", "activeTab"], - "version": "4.0.8" + "version": "4.0.9" }