@@ -725,21 +725,22 @@ var DISABLE_EXCEPTION_THROWING = false;
725
725
726
726
// By default we handle exit() in node, by catching the Exit exception. However,
727
727
// this means we catch all process exceptions. If you disable this, then we no
728
- // longer do that, and exceptions work normally, which can be useful for libraries
729
- // or programs that don't need exit() to work.
730
-
728
+ // longer do that, and exceptions work normally, which can be useful for
729
+ // libraries or programs that don't need exit() to work.
730
+ //
731
731
// Emscripten uses an ExitStatus exception to halt when exit() is called.
732
732
// With this option, we prevent that from showing up as an unhandled
733
733
// exception.
734
734
// [link]
735
735
var NODEJS_CATCH_EXIT = true ;
736
736
737
- // Catch unhandled rejections in node. Without this, node may print the error,
738
- // and that this behavior will change in future node, wait a few seconds, and
739
- // then exit with 0 (which hides the error if you don't read the log). With
740
- // this, we catch any unhandled rejection and throw an actual error, which will
741
- // make the process exit immediately with a non-0 return code.
742
- // This should be fixed in Node 15+.
737
+ // Catch unhandled rejections in node. This only effect versions of node older
738
+ // than 15. Without this, old version node will print a warning, but exit
739
+ // with a zero return code. With this setting enabled, we handle any unhandled
740
+ // rejection and throw an exception, which will cause the process exit
741
+ // immediately with a non-0 return code.
742
+ // This not needed in Node 15+ so this setting will default to false if
743
+ // MIN_NODE_VERSION is 150000 or above.
743
744
// [link]
744
745
var NODEJS_CATCH_REJECTION = true ;
745
746
@@ -1785,6 +1786,12 @@ var MIN_EDGE_VERSION = 0x7FFFFFFF;
1785
1786
// [link]
1786
1787
var MIN_CHROME_VERSION = 75 ;
1787
1788
1789
+ // Specifies minimum node version to target for the generated code. This is
1790
+ // distinct from the minimum version required run the emscripten compiler.
1791
+ // This version aligns with the current Ubuuntu TLS 20.04 (Focal).
1792
+ // Version is encoded in MMmmVV, e.g. 1814101 denotes Node 18.14.01.
1793
+ var MIN_NODE_VERSION = 101900 ;
1794
+
1788
1795
// Tracks whether we are building with errno support enabled. Set to 0
1789
1796
// to disable compiling errno support in altogether. This saves a little
1790
1797
// bit of generated code size in applications that do not care about
0 commit comments