File tree 3 files changed +20
-0
lines changed 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1578,6 +1578,17 @@ changes:
1578
1578
1579
1579
Identical to ` -e ` but prints the result.
1580
1580
1581
+ ### ` --print-pending-tla `
1582
+
1583
+ <!-- YAML
1584
+ added: REPLACEME
1585
+ -->
1586
+
1587
+ Print pending top-level await in the graph.
1588
+
1589
+ <!-- TODO(joyeecheung): do a PR separately for this flag because we can also
1590
+ fix https://github.com/nodejs/node/issues/42868 with it -->
1591
+
1581
1592
### ` --prof `
1582
1593
1583
1594
<!-- YAML
@@ -2556,6 +2567,7 @@ Node.js options that are allowed are:
2556
2567
* ` --policy-integrity `
2557
2568
* ` --preserve-symlinks-main `
2558
2569
* ` --preserve-symlinks `
2570
+ * ` --print-pending-tla `
2559
2571
* ` --prof-process `
2560
2572
* ` --redirect-warnings `
2561
2573
* ` --report-compact `
Original file line number Diff line number Diff line change @@ -352,6 +352,13 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
352
352
" ES module syntax, try again to evaluate them as ES modules" ,
353
353
&EnvironmentOptions::detect_module,
354
354
kAllowedInEnvvar );
355
+ AddOption (" --print-pending-tla" ,
356
+ " Print pending top-level await. If --experimental-require-module "
357
+ " is true, evaluate asynchronous graphs loaded by `require()` but "
358
+ " do not run the microtasks, in order to to find and print "
359
+ " top-level await in the graph" ,
360
+ &EnvironmentOptions::print_pending_tla,
361
+ kAllowedInEnvvar );
355
362
AddOption (" --diagnostic-dir" ,
356
363
" set dir for all output files"
357
364
" (default: current working directory)" ,
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ class EnvironmentOptions : public Options {
105
105
bool abort_on_uncaught_exception = false ;
106
106
std::vector<std::string> conditions;
107
107
bool detect_module = false ;
108
+ bool print_pending_tla = false ;
108
109
std::string dns_result_order;
109
110
bool enable_source_maps = false ;
110
111
bool experimental_fetch = true ;
You can’t perform that action at this time.
0 commit comments