From 00cc8bc55d223101a85eab66735041faa3629fbe Mon Sep 17 00:00:00 2001 From: Uri Yemini <95576653+Urook@users.noreply.github.com> Date: Thu, 5 Oct 2023 13:21:08 +0300 Subject: [PATCH] Use Proper Type Definitions Where Possible (#371) --- package.json | 5 +++-- src/BitBucketOnPrem.ts | 6 +++--- src/UrlAssembler.d.ts | 4 ---- src/parseRepo.d.ts | 2 +- src/slash.d.ts | 4 ---- yarn.lock | 12 ++++++++++++ 6 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 src/UrlAssembler.d.ts delete mode 100644 src/slash.d.ts diff --git a/package.json b/package.json index 0388a441..b22e7f2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "explorook", - "version": "1.15.9", + "version": "1.15.10", "description": "Rookout's site addon to support local files and folders", "main": "dist/index.js", "scripts": { @@ -95,6 +95,7 @@ "@types/lodash": "^4.14.182", "@types/node-fetch": "^2.6.1", "@types/semver": "^7.5.3", + "@types/url-assembler": "^2.1.2", "aws-lambda": "^1.0.5", "copyfiles": "^2.3.0", "cross-env": "^5.2.0", @@ -133,7 +134,7 @@ "patch-package": "^6.4.0", "postinstall-postinstall": "^2.1.0", "semver": "7.5.4", - "slash": "^2.0.0", + "slash": "3.0.0", "url-assembler": "^2.1.1", "uuid": "^3.2.1", "walk": "^2.3.13" diff --git a/src/BitBucketOnPrem.ts b/src/BitBucketOnPrem.ts index 0588ca3c..9d465843 100644 --- a/src/BitBucketOnPrem.ts +++ b/src/BitBucketOnPrem.ts @@ -1,8 +1,8 @@ import _ = require("lodash"); import UrlAssembler = require("url-assembler"); -import {notify} from "./exceptionManager"; +import { notify } from "./exceptionManager"; import { getStoreSafe } from "./explorook-store"; -import {getLogger} from "./logger"; +import { getLogger } from "./logger"; const logger = getLogger("bitbucket"); const isNode = () => !(typeof window !== "undefined" && window !== null); @@ -523,7 +523,7 @@ export const getCommitDetailsFromBitbucket = async ({url, accessToken, projectKe projectKey, repoName, commit - }); + }).toString(); const res = await fetchNoCache(commitQuery, { headers: { Authorization: `Bearer ${accessToken}` diff --git a/src/UrlAssembler.d.ts b/src/UrlAssembler.d.ts deleted file mode 100644 index dbca51e4..00000000 --- a/src/UrlAssembler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "url-assembler" { - function UrlAssembler(str: string): any; - export = UrlAssembler; -} diff --git a/src/parseRepo.d.ts b/src/parseRepo.d.ts index e1a5885f..2325a472 100644 --- a/src/parseRepo.d.ts +++ b/src/parseRepo.d.ts @@ -1 +1 @@ -declare module 'parse-repo'; \ No newline at end of file +declare module "parse-repo"; diff --git a/src/slash.d.ts b/src/slash.d.ts deleted file mode 100644 index b93358d0..00000000 --- a/src/slash.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "slash" { - function Slash(str: string): string; - export = Slash; -} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index dbda92e8..2a9f0b1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -698,6 +698,13 @@ "@types/mime" "^1" "@types/node" "*" +"@types/url-assembler@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@types/url-assembler/-/url-assembler-2.1.2.tgz#29eddddbe19ed0cfd8b2684c6b1c0dd358399002" + integrity sha512-Dxp3Z8hS90Cvezg1ofr+Xt0oylCr4T6chcOH4RskipvLZPn/eZcSsHllFkPXYg+6XZKmJu9t41T8wOWdlKoVfw== + dependencies: + "@types/qs" "*" + "@types/verror@^1.10.3": version "1.10.4" resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.4.tgz#805c0612b3a0c124cf99f517364142946b74ba3b" @@ -6755,6 +6762,11 @@ simple-update-notifier@2.0.0: dependencies: semver "^7.5.3" +slash@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"