Skip to content

Commit ec852da

Browse files
authored
Merge pull request #223 from janezd/fix-turbopack-warnings
Silence turbopack warnings
2 parents 801a760 + 61d2957 commit ec852da

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

utils/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ const ConfigSchema = z.object({
8282

8383
export type AppConfig = z.infer<typeof ConfigSchema>;
8484

85-
const configFile = process.env.NOTES_CONFIG || path.resolve(cwd, "notes.config.yml");
85+
const configFile = process.env.NOTES_CONFIG ?
86+
/*turbopackIgnore: true*/ process.env.NOTES_CONFIG : path.resolve(cwd, "notes.config.yml");
8687

8788
const fileContents = () => {
8889
if (fs.existsSync(configFile)) {

utils/zip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const getUploadDir = async ({bookId, groupId, qId, accessToken}: {
5555
}
5656

5757
return {dir: path.resolve(
58-
CONFIG.uploadsPath,
58+
/* turbopackIgnore: true */ CONFIG.uploadsPath,
5959
...[bookSlug, group || "no-group", questionId].map(hash24),
6060
accessToken)};
6161
}
@@ -92,7 +92,7 @@ export const removeFile = async (
9292
else {
9393
try {
9494
const safeFile = path.basename(file);
95-
await fs.promises.rm(path.join(dir!, safeFile), {force: true});
95+
await fs.promises.rm(path.join(/* turbopackIgnore: true */ dir!, safeFile), {force: true});
9696
await db.run(`DELETE FROM uploads WHERE answerId = ? AND filename = ?`, [lastAttemptId, safeFile]);
9797
}
9898
catch (err) {

0 commit comments

Comments
 (0)