remove bun for database, bun isn't compatible with current entity setup, joins lead to circular includes

This commit is contained in:
Einhornimmond 2025-05-03 07:47:58 +02:00 committed by einhornimmond
parent 0484ce037e
commit a55ee8a1bb
2 changed files with 0 additions and 28 deletions

View File

@ -1,26 +0,0 @@
import fs from 'node:fs'
import { latestDbVersion } from './src/config/detectLastDBVersion'
await Bun.build({
entrypoints: ['entity/index.ts'],
bundle: true,
target: 'bun',
packages: 'external',
outdir: './build',
plugins: [
{
// hardcode last db version string into index.ts, before parsing
name: 'replace-latest-db-version-import',
setup(build) {
build.onLoad({ filter: /index\.ts$/ }, async (args) => {
let source = await fs.promises.readFile(args.path, 'utf8')
source = source.replace(
/import\s*\{\s*latestDbVersion\s*\}\s*from\s*['"][^'"]+['"]/,
`const latestDbVersion = "${latestDbVersion}";`,
)
return { contents: source, loader: 'ts' }
})
},
},
],
})

View File

@ -16,7 +16,6 @@
"private": false,
"scripts": {
"build": "tsx ./esbuild.config.ts",
"build:bun": "bun ./bun.build.ts",
"typecheck": "tsc --noEmit",
"up": "cross-env TZ=UTC tsx src/index.ts up",
"down": "cross-env TZ=UTC tsx src/index.ts down",
@ -34,7 +33,6 @@
"@types/faker": "^5.5.9",
"@types/geojson": "^7946.0.13",
"@types/node": "^17.0.21",
"bun": "^1.2.11",
"esbuild": "^0.25.2",
"prettier": "^2.8.7",
"tsx": "^4.19.4",