Skip to content

Commit fbcf87f

Browse files
use 'node:...' for Node.js imports
1 parent cb50697 commit fbcf87f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/services/notifier.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { WebhookClient, EmbedBuilder } from "discord.js";
2-
import { env } from "../config/env";
2+
33
import { Question } from "./stackoverflow";
4+
import { env } from "../config/env";
45

56
const webhook = new WebhookClient({
67
id: env.DISCORD_WEBHOOK_ID,

src/services/persistence.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import fs from 'fs/promises';
2-
import { exec } from 'child_process';
3-
import path from 'path';
1+
import fs from 'node:fs/promises';
2+
import cp from 'node:child_process';
3+
import path from 'node:path';
44

55
const DATA_FILE = path.resolve(__dirname, '../../data/sentIds.json');
66

@@ -20,7 +20,7 @@ export async function saveSentIds(ids: Set<number>) {
2020
await fs.writeFile(DATA_FILE, JSON.stringify(arr, null, 2));
2121

2222
// Auto‑commit and push
23-
return new Promise<void>((resolve, reject) => exec(
23+
return new Promise<void>((resolve, reject) => cp.exec(
2424
`git add ${DATA_FILE} && git commit -m "chore: update sent question IDs" && git push`,
2525
(err, stdout, stderr) => {
2626
if (err) {

0 commit comments

Comments
 (0)