fix(core): let V8 drive extension ESM loads (#18997)

This now allows circular imports across extensions.

Instead of load + eval of all ESM files in declaration order, all files
are only loaded. Eval is done recursively by V8, only evaluating
files that are listed in `Extension::esm_entry_point` fields.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Luca Casonato 2023-05-09 12:37:13 +02:00 committed by GitHub
parent 723d4b0382
commit f34fcd16ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 640 additions and 605 deletions

3
cli/js/99_main.js Normal file
View file

@ -0,0 +1,3 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import "ext:cli/40_testing.js";
import "ext:cli/runtime/js/99_main.js";