Support with { type: "macro"} in bun build (#3059)

* [bun macro] Support `assert { type: "macro" }` and `with {type: "macro"}`

* [bun macro] Pass through input as arguments instead of a JSNode

* Fix hang when loading many entry points simultaneously with macros

* do not clone

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2023-05-24 19:37:57 -07:00
committed by GitHub
parent 63740a382b
commit 88d9bac5ec
4 changed files with 160 additions and 51 deletions

View File

@@ -457,7 +457,7 @@ static JSValue fetchSourceCode(
}
default: {
auto provider = Zig::SourceProvider::create(res->result.value);
return rejectOrResolve(JSC::JSSourceCode::create(vm, JSC::SourceCode(provider)));
return rejectOrResolve(JSC::JSSourceCode::create(vm, JSC::SourceCode(WTFMove(provider))));
}
}
}