mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// macro code
|
||||
export function matchInFile(callExpression: BunAST.CallExpression) {
|
||||
export async function matchInFile(callExpression: BunAST.CallExpression) {
|
||||
const [filePathNode, matcherNode] = callExpression.arguments;
|
||||
let filePath: string;
|
||||
filePath = filePathNode.get();
|
||||
|
||||
let matcher: RegExp;
|
||||
matcher = matcherNode.get();
|
||||
const file: string = Bun.readFile(Bun.cwd + filePath);
|
||||
const file: string = await Bun.file(Bun.cwd + filePath).text();
|
||||
|
||||
return (
|
||||
<array>
|
||||
|
||||
Reference in New Issue
Block a user