mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-21 02:40:08 +00:00
Add a negative lookahead to prevent .json to be changed (#3536)
This was breaking the REST manager as the fetch() Response object uses a .json method to get the JSON body
This commit is contained in:
@@ -10,7 +10,7 @@ for await (const dir of dirs) {
|
||||
}
|
||||
const content = await fs.promises.readFile(`dist/cjs${dir}/${file}`, 'utf-8')
|
||||
await fs.promises.rm(`dist/cjs${dir}/${file}`)
|
||||
fs.promises.writeFile(`dist/cjs${dir}/${file.slice(0, -3)}.cjs`, content.replace(/\.js/g, '.cjs'))
|
||||
fs.promises.writeFile(`dist/cjs${dir}/${file.slice(0, -3)}.cjs`, content.replace(/\.js(?!on)/g, '.cjs'))
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user