Skip to content

Commit

Permalink
refactor: import only readFile insteadof all fs
Browse files Browse the repository at this point in the history
  • Loading branch information
ralmn committed Nov 10, 2024
1 parent 94a9ecf commit 721a23c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/configuration/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import pm2 from "@pm2/io";
import type Counter from "@pm2/io/build/main/utils/metrics/counter";
import type Gauge from "@pm2/io/build/main/utils/metrics/gauge";
import { Scraper } from "@the-convocation/twitter-scraper";
import * as fs from "fs/promises";
import { readFile } from "fs/promises";
import { createRestAPIClient, mastodon } from "masto";
import ora from "ora";

Expand Down Expand Up @@ -165,9 +165,9 @@ export const configuration = async (): Promise<{
}

let mentionsMapping: MentionMapping[] = [];
//accessSync

try {
const content = (await fs.readFile(MENTION_MAPPING_PATH)).toString();
const content = (await readFile(MENTION_MAPPING_PATH)).toString();
mentionsMapping = JSON.parse(content) as MentionMapping[];
} catch (e) {
const log = ora({
Expand Down

0 comments on commit 721a23c

Please sign in to comment.