refactor: remove unused dotenv calls (#2059)

As explained in the Vercel documentation vercel ignores dot files (see
https://github.com/vercel/vercel/discussions/3962#discussioncomment-4277). It
instead loads the env variables defined in the vercel instance. As a
result we can therefore remove dotenv.
This commit is contained in:
Rick Staa 2022-11-21 10:13:14 +01:00 committed by GitHub
parent 5df25a6472
commit 42a4b6f60a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 15 deletions

View file

@ -1,4 +1,3 @@
import * as dotenv from "dotenv";
import { renderStatsCard } from "../src/cards/stats-card.js";
import { blacklist } from "../src/common/blacklist.js";
import {
@ -11,8 +10,6 @@ import {
import { fetchStats } from "../src/fetchers/stats-fetcher.js";
import { isLocaleAvailable } from "../src/translations.js";
dotenv.config();
export default async (req, res) => {
const {
username,

View file

@ -1,4 +1,3 @@
import * as dotenv from "dotenv";
import { renderTopLanguages } from "../src/cards/top-languages-card.js";
import { blacklist } from "../src/common/blacklist.js";
import {
@ -11,8 +10,6 @@ import {
import { fetchTopLanguages } from "../src/fetchers/top-languages-fetcher.js";
import { isLocaleAvailable } from "../src/translations.js";
dotenv.config();
export default async (req, res) => {
const {
username,

View file

@ -1,4 +1,3 @@
import * as dotenv from "dotenv";
import { renderWakatimeCard } from "../src/cards/wakatime-card.js";
import {
clampValue,
@ -10,8 +9,6 @@ import {
import { fetchWakatimeStats } from "../src/fetchers/wakatime-fetcher.js";
import { isLocaleAvailable } from "../src/translations.js";
dotenv.config();
export default async (req, res) => {
const {
username,

View file

@ -1,6 +1,5 @@
// @ts-check
import axios from "axios";
import * as dotenv from "dotenv";
import githubUsernameRegex from "github-username-regex";
import { calculateRank } from "../calculateRank.js";
import { retryer } from "../common/retryer.js";
@ -12,8 +11,6 @@ import {
wrapTextMultiline,
} from "../common/utils.js";
dotenv.config();
/**
* Stats fetcher object.
*

View file

@ -1,5 +1,4 @@
// @ts-check
import * as dotenv from "dotenv";
import { retryer } from "../common/retryer.js";
import {
CustomError,
@ -9,8 +8,6 @@ import {
wrapTextMultiline,
} from "../common/utils.js";
dotenv.config();
/**
* Top languages fetcher object.
*