This commit is contained in:
2024-09-02 20:44:47 +02:00
parent c89638262f
commit 5d00a5a090
28 changed files with 160 additions and 2122 deletions

25
script.cjs Normal file
View File

@@ -0,0 +1,25 @@
const fs = require('node:fs')
const path = require('node:path')
const filesToModify = [
'node_modules/drizzle-orm/pg-core/columns/timestamp.js',
'node_modules/drizzle-orm/pg-core/columns/timestamp.cjs',
]
filesToModify.forEach((file) => {
const filePath = path.join(__dirname, file)
console.log(`Checking path: ${filePath}`)
if (fs.existsSync(filePath)) {
let fileContent = fs.readFileSync(filePath, 'utf8')
fileContent = fileContent.replace(
'return value.toISOString()',
'return value',
)
fs.writeFileSync(filePath, fileContent, 'utf8')
console.log(`Modified: ${file}`)
}
else {
console.error(`File not found: ${filePath}`)
}
})