diff --git a/client/constants.ts b/client/constants.ts index c4f40ada..4f36d4bd 100644 --- a/client/constants.ts +++ b/client/constants.ts @@ -8,4 +8,3 @@ export const ROUTES = { export const INPUT = { PLACEHOLDER: '[ username / repo ]', }; - diff --git a/client/lib/gitlang/requests/languages.ts b/client/lib/gitlang/requests/languages.ts index 55b6b61e..bffb37ea 100644 --- a/client/lib/gitlang/requests/languages.ts +++ b/client/lib/gitlang/requests/languages.ts @@ -16,7 +16,7 @@ const localApi = async (owner: string, repos: string[]) => { }, }, ); - if (allLanguages?.data?.length > 0) { + if (allLanguages.data.length > 0) { return allLanguages.data; } return []; @@ -37,7 +37,7 @@ const serverApi = async (owner: string, repos: string[]) => { }, }, ); - if (allLanguages?.data?.length > 0) { + if (allLanguages.data.length > 0) { return allLanguages.data; } return []; diff --git a/client/lib/gitlang/requests/repositories.ts b/client/lib/gitlang/requests/repositories.ts index 149e2f8e..c5374614 100644 --- a/client/lib/gitlang/requests/repositories.ts +++ b/client/lib/gitlang/requests/repositories.ts @@ -13,7 +13,7 @@ const localApi = async (username: string) => { params: { username }, }, ); - if (allRepos?.data?.length > 0) { + if (allRepos.data.length > 0) { return allRepos.data; } return []; @@ -28,7 +28,7 @@ const serverApi = async (username: string) => { const allRepos: { data: [] } = await axios.get(ROUTES.REPOS, { params: { username }, }); - if (allRepos?.data?.length > 0) { + if (allRepos.data.length > 0) { return allRepos.data; } return []; diff --git a/package-lock.json b/package-lock.json index a816e50a..aefc68a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gitlang", - "version": "3.2.0", + "version": "4.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gitlang", - "version": "3.2.0", + "version": "4.0.0", "license": "MIT", "dependencies": { "@aws-sdk/client-secrets-manager": "^3.535.0", diff --git a/package.json b/package.json index b25957b3..d791c63d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitlang", - "version": "3.2.0", + "version": "4.0.0", "description": "View language usage per repo or total by username", "main": "client/src/index.ts", "scripts": { @@ -34,10 +34,10 @@ "@mikey-pro/eslint-config-svelte": "^7.2.1", "@types/dotenv-webpack": "^7.0.7", "@types/koa": "^2.15.0", - "@types/koa__cors": "^5.0.0", - "@types/koa__router": "^12.0.4", "@types/koa-bodyparser": "^4.3.12", "@types/koa-static": "^4.0.4", + "@types/koa__cors": "^5.0.0", + "@types/koa__router": "^12.0.4", "@types/node": "^20.11.28", "babel-loader": "^9.1.3", "css-loader": "^6.10.0", diff --git a/server/helpers/github/auth.ts b/server/helpers/github/auth.ts index 3f856f5e..a2b77ec5 100644 --- a/server/helpers/github/auth.ts +++ b/server/helpers/github/auth.ts @@ -18,7 +18,7 @@ const auth: () => Promise = async () => { new GetSecretValueCommand({ SecretId: secretName }), ); - if (data?.SecretString) { + if (data.SecretString) { secret = data.SecretString; }