File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/bun-query-builder Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1+ import { readFile , writeFile } from 'node:fs/promises'
12import { dts } from 'bun-plugin-dtsx'
2- import { readFile , writeFile } from 'fs/promises'
33
44await Bun . build ( {
55 entrypoints : [ 'src/index.ts' ] ,
@@ -15,9 +15,10 @@ const content = await readFile(filePath, 'utf8')
1515
1616// Replace init_config(); with await init_config(); only in the init_src function body
1717const updatedContent = content . replace (
18- / ( v a r i n i t _ s r c = _ _ e s m \( a s y n c \( \) = > \{ [ \s \S ] * ?) ( \s + ) ( i n i t _ c o n f i g \( \) ; ) / ,
19- '$1$2await init_config();'
18+ // eslint-disable-next-line regexp/no-super-linear-backtracking
19+ / ( v a r i n i t _ s r c = _ _ e s m \( a s y n c \( \) = > \{ ) ( (?: (? ! \s + i n i t _ c o n f i g \( \) ; ) [ \s \S ] ) * ?) ( \s + ) ( i n i t _ c o n f i g \( \) ; ) / ,
20+ '$1$2$3await $4' ,
2021)
2122
2223await writeFile ( filePath , updatedContent )
23- console . log ( 'Fixed async init_config() call in build output' )
24+ console . log ( 'Fixed async init_config() call in build output' )
You can’t perform that action at this time.
0 commit comments