Skip to content

Commit

Permalink
fix slack link and bump dependencies (#513)
Browse files Browse the repository at this point in the history
* fix slack link and bump dependencies

* update tooltip
  • Loading branch information
xavluiz authored Oct 31, 2024
1 parent 38c14eb commit 8efc317
Show file tree
Hide file tree
Showing 14 changed files with 92 additions and 148 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swdc-vscode",
"displayName": "Code Time",
"version": "2.8.1",
"version": "2.8.2",
"publisher": "softwaredotcom",
"description": "Code Time is an open source plugin that provides programming metrics right in Visual Studio Code.",
"author": {
Expand Down Expand Up @@ -139,13 +139,13 @@
"dependencies": {
"@swdotcom/editor-flow": "1.1.3",
"@types/uuid": "^9.0.8",
"@types/ws": "^8.5.10",
"@types/ws": "^8.5.12",
"axios": "^1.7.4",
"date-fns": "^3.6.0",
"date-fns": "^4.1.0",
"node-cache": "^5.1.2",
"open": "^8.4.0",
"open": "^10.1.0",
"swdc-tracker": "1.5.7",
"uuid": "^9.0.1",
"ws": "^8.17.1"
"ws": "^8.18.0"
}
}
8 changes: 4 additions & 4 deletions src/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import {getBooleanJsonItem, getJsonItem, setJsonItem, storeJsonData} from './man
import { formatISO } from 'date-fns';
import { initializeWebsockets, websocketAlive } from './websockets';

const open = require('open');
const fs = require('fs');
const os = require('os');
const path = require('path');
import open from 'open';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
const outputChannel = window.createOutputChannel('CodeTime');

export const alpha = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
Expand Down
4 changes: 2 additions & 2 deletions src/command-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function createCommands(

cmds.push(
commands.registerCommand('codetime.connectSlack', () => {
launchWebUrl(`${app_url}/data_sources/integration_types/slack`);
launchWebUrl(`${app_url}/code_time/integration_type/slack`);
})
);

Expand All @@ -162,7 +162,7 @@ export function createCommands(

cmds.push(
commands.registerCommand('codetime.manageSlackConnection', () => {
launchWebUrl(`${app_url}/data_sources/integration_types/slack`);
launchWebUrl(`${app_url}/code_time/integration_type/slack`);
})
);

Expand Down
2 changes: 1 addition & 1 deletion src/http/HttpClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const axios = require('axios');
import axios from 'axios';
import { version, window } from 'vscode';
import { api_endpoint, app_url, TWENTY_SEC_TIMEOUT_MILLIS } from '../Constants';
import {
Expand Down
4 changes: 2 additions & 2 deletions src/managers/FileManager.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getFileNameFromPath, logIt } from '../Util';
import { LocalStorageManager } from './LocalStorageManager';

const fs = require('fs');
const path = require('path');
import * as fs from 'fs';
import * as path from 'path';

let storageMgr: LocalStorageManager | undefined = undefined;

Expand Down
3 changes: 2 additions & 1 deletion src/managers/KpmManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { getUserPreferences } from '../DataController';
import { getFirstWorkspaceFolder, logIt } from '../Util';
import { TrackerManager } from './TrackerManager';

const fs = require('fs');
import * as fs from 'fs';

export class KpmManager {
private static instance: KpmManager;

Expand Down
98 changes: 0 additions & 98 deletions src/managers/OsaScriptManager.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/managers/StatusBarManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function updateStatusBarWithSummaryData() {

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

const email = getItem('name');
Expand Down
3 changes: 2 additions & 1 deletion src/managers/SyncManger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {updateFlowModeStatusBar} from './StatusBarManager';
import { isInFlowLocally, updateInFlowLocally } from './FlowManager';
import { commands } from 'vscode';

const fs = require('fs');
import * as fs from 'fs';


export class SyncManager {
private static _instance: SyncManager;
Expand Down
9 changes: 8 additions & 1 deletion src/managers/TrackerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,14 @@ export class TrackerManager {
this.eventVersions.set(event.fileName, event.version);
if (this.eventVersions.size > 5) {
// remove oldest entry in map to stay small
this.eventVersions.delete(this.eventVersions.keys().next().value);
try {
const key = this.eventVersions.keys().next().value;
if (key !== undefined) {
this.eventVersions.delete(key);
}
} catch (e) {
// ignore
}
}
return false;
}
Expand Down
Binary file removed swdc-vscode-2.8.0.vsix
Binary file not shown.
Binary file removed swdc-vscode-2.8.1.vsix
Binary file not shown.
Binary file added swdc-vscode-2.8.2.vsix
Binary file not shown.
97 changes: 65 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.76.0.tgz#967c0fbe09921818bbf201f1cbcb81b981c6249c"
integrity sha512-CQcY3+Fe5hNewHnOEAVYj4dd1do/QHliXaknAEYSXx2KEHUzFibDZSKptCon+HPgK55xx20pR+PBJjf0MomnBA==

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

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

bundle-name@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889"
integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==
dependencies:
run-applescript "^7.0.0"

cacheable-lookup@^5.0.3:
version "5.0.4"
resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005"
Expand Down Expand Up @@ -703,10 +710,10 @@ cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"

date-fns@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf"
integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==
date-fns@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-4.1.0.tgz#64b3d83fff5aa80438f5b1a633c2e83b8a1c2d14"
integrity sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==

debug@^4.3.1:
version "4.3.4"
Expand All @@ -722,15 +729,28 @@ decompress-response@^6.0.0:
dependencies:
mimic-response "^3.1.0"

default-browser-id@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26"
integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==

default-browser@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf"
integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==
dependencies:
bundle-name "^4.1.0"
default-browser-id "^5.0.0"

defer-to-connect@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587"
integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==

define-lazy-prop@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
define-lazy-prop@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f"
integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==

delayed-stream@~1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -1077,10 +1097,10 @@ is-core-module@^2.9.0:
dependencies:
has "^1.0.3"

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

is-extglob@^2.1.1:
version "2.1.1"
Expand All @@ -1094,6 +1114,13 @@ is-glob@^4.0.1, is-glob@^4.0.3:
dependencies:
is-extglob "^2.1.1"

is-inside-container@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4"
integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==
dependencies:
is-docker "^3.0.0"

is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
Expand All @@ -1106,12 +1133,12 @@ is-plain-object@^2.0.4:
dependencies:
isobject "^3.0.1"

is-wsl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
is-wsl@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2"
integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==
dependencies:
is-docker "^2.0.0"
is-inside-container "^1.0.0"

isexe@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -1330,14 +1357,15 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
dependencies:
wrappy "1"

open@^8.4.0:
version "8.4.2"
resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==
open@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1"
integrity sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==
dependencies:
define-lazy-prop "^2.0.0"
is-docker "^2.1.1"
is-wsl "^2.2.0"
default-browser "^5.2.1"
define-lazy-prop "^3.0.0"
is-inside-container "^1.0.0"
is-wsl "^3.1.0"

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

run-applescript@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb"
integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==

run-parallel@^1.1.9:
version "1.2.0"
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
Expand Down Expand Up @@ -1836,10 +1869,10 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==

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

yallist@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit 8efc317

Please sign in to comment.