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:
Nayeem Rahman 2023-06-25 08:35:31 +01:00 committed by GitHub
parent a181ceb0e3
commit 28a4f3d0f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 290 additions and 326 deletions

View file

@ -26,7 +26,7 @@ async fn main() -> Result<(), AnyError> {
PermissionsContainer::allow_all(),
WorkerOptions {
module_loader: Rc::new(FsModuleLoader),
extensions: vec![hello_runtime::init_ops_and_esm()],
extensions: vec![hello_runtime::init_ext()],
..Default::default()
},
);