mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
remove bun for database, bun isn't compatible with current entity setup, joins lead to circular includes
This commit is contained in:
parent
0484ce037e
commit
a55ee8a1bb
@ -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' }
|
||||
})
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user