Skip to content

Commit 8efc317

Browse files
authored
fix slack link and bump dependencies (#513)
* fix slack link and bump dependencies * update tooltip
1 parent 38c14eb commit 8efc317

14 files changed

+92
-148
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "swdc-vscode",
33
"displayName": "Code Time",
4-
"version": "2.8.1",
4+
"version": "2.8.2",
55
"publisher": "softwaredotcom",
66
"description": "Code Time is an open source plugin that provides programming metrics right in Visual Studio Code.",
77
"author": {
@@ -139,13 +139,13 @@
139139
"dependencies": {
140140
"@swdotcom/editor-flow": "1.1.3",
141141
"@types/uuid": "^9.0.8",
142-
"@types/ws": "^8.5.10",
142+
"@types/ws": "^8.5.12",
143143
"axios": "^1.7.4",
144-
"date-fns": "^3.6.0",
144+
"date-fns": "^4.1.0",
145145
"node-cache": "^5.1.2",
146-
"open": "^8.4.0",
146+
"open": "^10.1.0",
147147
"swdc-tracker": "1.5.7",
148148
"uuid": "^9.0.1",
149-
"ws": "^8.17.1"
149+
"ws": "^8.18.0"
150150
}
151151
}

src/Util.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import {getBooleanJsonItem, getJsonItem, setJsonItem, storeJsonData} from './man
1616
import { formatISO } from 'date-fns';
1717
import { initializeWebsockets, websocketAlive } from './websockets';
1818

19-
const open = require('open');
20-
const fs = require('fs');
21-
const os = require('os');
22-
const path = require('path');
19+
import open from 'open';
20+
import * as fs from 'fs';
21+
import * as path from 'path';
22+
import * as os from 'os';
2323
const outputChannel = window.createOutputChannel('CodeTime');
2424

2525
export const alpha = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';

src/command-helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export function createCommands(
144144

145145
cmds.push(
146146
commands.registerCommand('codetime.connectSlack', () => {
147-
launchWebUrl(`${app_url}/data_sources/integration_types/slack`);
147+
launchWebUrl(`${app_url}/code_time/integration_type/slack`);
148148
})
149149
);
150150

@@ -162,7 +162,7 @@ export function createCommands(
162162

163163
cmds.push(
164164
commands.registerCommand('codetime.manageSlackConnection', () => {
165-
launchWebUrl(`${app_url}/data_sources/integration_types/slack`);
165+
launchWebUrl(`${app_url}/code_time/integration_type/slack`);
166166
})
167167
);
168168

src/http/HttpClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const axios = require('axios');
1+
import axios from 'axios';
22
import { version, window } from 'vscode';
33
import { api_endpoint, app_url, TWENTY_SEC_TIMEOUT_MILLIS } from '../Constants';
44
import {

src/managers/FileManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getFileNameFromPath, logIt } from '../Util';
22
import { LocalStorageManager } from './LocalStorageManager';
33

4-
const fs = require('fs');
5-
const path = require('path');
4+
import * as fs from 'fs';
5+
import * as path from 'path';
66

77
let storageMgr: LocalStorageManager | undefined = undefined;
88

src/managers/KpmManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { getUserPreferences } from '../DataController';
33
import { getFirstWorkspaceFolder, logIt } from '../Util';
44
import { TrackerManager } from './TrackerManager';
55

6-
const fs = require('fs');
6+
import * as fs from 'fs';
7+
78
export class KpmManager {
89
private static instance: KpmManager;
910

src/managers/OsaScriptManager.ts

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/managers/StatusBarManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function updateStatusBarWithSummaryData() {
9191

9292
function showStatus(msg: string, tooltip: string | null) {
9393
if (!tooltip) {
94-
tooltip = 'Active code time today. Click to see more from Code Time.';
94+
tooltip = 'Code time today. Click to see more from Code Time.';
9595
}
9696

9797
const email = getItem('name');

src/managers/SyncManger.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import {updateFlowModeStatusBar} from './StatusBarManager';
33
import { isInFlowLocally, updateInFlowLocally } from './FlowManager';
44
import { commands } from 'vscode';
55

6-
const fs = require('fs');
6+
import * as fs from 'fs';
7+
78

89
export class SyncManager {
910
private static _instance: SyncManager;

src/managers/TrackerManager.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,14 @@ export class TrackerManager {
370370
this.eventVersions.set(event.fileName, event.version);
371371
if (this.eventVersions.size > 5) {
372372
// remove oldest entry in map to stay small
373-
this.eventVersions.delete(this.eventVersions.keys().next().value);
373+
try {
374+
const key = this.eventVersions.keys().next().value;
375+
if (key !== undefined) {
376+
this.eventVersions.delete(key);
377+
}
378+
} catch (e) {
379+
// ignore
380+
}
374381
}
375382
return false;
376383
}

swdc-vscode-2.8.0.vsix

-588 KB
Binary file not shown.

swdc-vscode-2.8.1.vsix

-588 KB
Binary file not shown.

swdc-vscode-2.8.2.vsix

590 KB
Binary file not shown.

yarn.lock

Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@
206206
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.76.0.tgz#967c0fbe09921818bbf201f1cbcb81b981c6249c"
207207
integrity sha512-CQcY3+Fe5hNewHnOEAVYj4dd1do/QHliXaknAEYSXx2KEHUzFibDZSKptCon+HPgK55xx20pR+PBJjf0MomnBA==
208208

209-
"@types/ws@^8.5.10":
210-
version "8.5.10"
211-
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787"
212-
integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==
209+
"@types/ws@^8.5.12":
210+
version "8.5.12"
211+
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e"
212+
integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==
213213
dependencies:
214214
"@types/node" "*"
215215

@@ -565,6 +565,13 @@ builtin-modules@^1.1.1:
565565
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
566566
integrity sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==
567567

568+
bundle-name@^4.1.0:
569+
version "4.1.0"
570+
resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889"
571+
integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==
572+
dependencies:
573+
run-applescript "^7.0.0"
574+
568575
cacheable-lookup@^5.0.3:
569576
version "5.0.4"
570577
resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005"
@@ -703,10 +710,10 @@ cross-spawn@^7.0.3:
703710
shebang-command "^2.0.0"
704711
which "^2.0.1"
705712

706-
date-fns@^3.6.0:
707-
version "3.6.0"
708-
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf"
709-
integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==
713+
date-fns@^4.1.0:
714+
version "4.1.0"
715+
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-4.1.0.tgz#64b3d83fff5aa80438f5b1a633c2e83b8a1c2d14"
716+
integrity sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==
710717

711718
debug@^4.3.1:
712719
version "4.3.4"
@@ -722,15 +729,28 @@ decompress-response@^6.0.0:
722729
dependencies:
723730
mimic-response "^3.1.0"
724731

732+
default-browser-id@^5.0.0:
733+
version "5.0.0"
734+
resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26"
735+
integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==
736+
737+
default-browser@^5.2.1:
738+
version "5.2.1"
739+
resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf"
740+
integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==
741+
dependencies:
742+
bundle-name "^4.1.0"
743+
default-browser-id "^5.0.0"
744+
725745
defer-to-connect@^2.0.0:
726746
version "2.0.1"
727747
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587"
728748
integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==
729749

730-
define-lazy-prop@^2.0.0:
731-
version "2.0.0"
732-
resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
733-
integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
750+
define-lazy-prop@^3.0.0:
751+
version "3.0.0"
752+
resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f"
753+
integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==
734754

735755
delayed-stream@~1.0.0:
736756
version "1.0.0"
@@ -1077,10 +1097,10 @@ is-core-module@^2.9.0:
10771097
dependencies:
10781098
has "^1.0.3"
10791099

1080-
is-docker@^2.0.0, is-docker@^2.1.1:
1081-
version "2.2.1"
1082-
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
1083-
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
1100+
is-docker@^3.0.0:
1101+
version "3.0.0"
1102+
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200"
1103+
integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==
10841104

10851105
is-extglob@^2.1.1:
10861106
version "2.1.1"
@@ -1094,6 +1114,13 @@ is-glob@^4.0.1, is-glob@^4.0.3:
10941114
dependencies:
10951115
is-extglob "^2.1.1"
10961116

1117+
is-inside-container@^1.0.0:
1118+
version "1.0.0"
1119+
resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4"
1120+
integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==
1121+
dependencies:
1122+
is-docker "^3.0.0"
1123+
10971124
is-number@^7.0.0:
10981125
version "7.0.0"
10991126
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
@@ -1106,12 +1133,12 @@ is-plain-object@^2.0.4:
11061133
dependencies:
11071134
isobject "^3.0.1"
11081135

1109-
is-wsl@^2.2.0:
1110-
version "2.2.0"
1111-
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
1112-
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
1136+
is-wsl@^3.1.0:
1137+
version "3.1.0"
1138+
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2"
1139+
integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==
11131140
dependencies:
1114-
is-docker "^2.0.0"
1141+
is-inside-container "^1.0.0"
11151142

11161143
isexe@^2.0.0:
11171144
version "2.0.0"
@@ -1330,14 +1357,15 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
13301357
dependencies:
13311358
wrappy "1"
13321359

1333-
open@^8.4.0:
1334-
version "8.4.2"
1335-
resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
1336-
integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==
1360+
open@^10.1.0:
1361+
version "10.1.0"
1362+
resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1"
1363+
integrity sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==
13371364
dependencies:
1338-
define-lazy-prop "^2.0.0"
1339-
is-docker "^2.1.1"
1340-
is-wsl "^2.2.0"
1365+
default-browser "^5.2.1"
1366+
define-lazy-prop "^3.0.0"
1367+
is-inside-container "^1.0.0"
1368+
is-wsl "^3.1.0"
13411369

13421370
p-cancelable@^2.0.0:
13431371
version "2.1.1"
@@ -1495,6 +1523,11 @@ reusify@^1.0.4:
14951523
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
14961524
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
14971525

1526+
run-applescript@^7.0.0:
1527+
version "7.0.0"
1528+
resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb"
1529+
integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==
1530+
14981531
run-parallel@^1.1.9:
14991532
version "1.2.0"
15001533
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
@@ -1836,10 +1869,10 @@ wrappy@1:
18361869
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
18371870
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
18381871

1839-
ws@^8.17.1:
1840-
version "8.17.1"
1841-
resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b"
1842-
integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==
1872+
ws@^8.18.0:
1873+
version "8.18.0"
1874+
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
1875+
integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
18431876

18441877
yallist@^4.0.0:
18451878
version "4.0.0"

0 commit comments

Comments
 (0)