mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
Reland "refactor(core): cleanup feature flags for js source inclusion" (#19519)
Relands #19463. This time the `ExtensionFileSourceCode` enum is preserved, so this effectively just splits feature `include_js_for_snapshotting` into `exclude_js_sources` and `runtime_js_sources`, adds a `force_include_js_sources` option on `extension!()`, and unifies `ext::Init_ops_and_esm()` and `ext::init_ops()` into `ext::init()`.
This commit is contained in:
parent
a181ceb0e3
commit
28a4f3d0f5
33 changed files with 290 additions and 326 deletions
|
@ -122,7 +122,7 @@ fn get_asset_texts_from_new_runtime() -> Result<Vec<AssetText>, AnyError> {
|
|||
// the assets are stored within the typescript isolate, so take them out of there
|
||||
let mut runtime = JsRuntime::new(RuntimeOptions {
|
||||
startup_snapshot: Some(compiler_snapshot()),
|
||||
extensions: vec![deno_cli_tsc::init_ops()],
|
||||
extensions: vec![deno_cli_tsc::init_ext()],
|
||||
..Default::default()
|
||||
});
|
||||
let global = runtime
|
||||
|
@ -787,7 +787,7 @@ pub fn exec(request: Request) -> Result<Response, AnyError> {
|
|||
|
||||
let mut runtime = JsRuntime::new(RuntimeOptions {
|
||||
startup_snapshot: Some(compiler_snapshot()),
|
||||
extensions: vec![deno_cli_tsc::init_ops(
|
||||
extensions: vec![deno_cli_tsc::init_ext(
|
||||
request,
|
||||
root_map,
|
||||
remapped_specifiers,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue