@@ -2617,6 +2617,24 @@ async function openAndClose() {
2617
2617
}
2618
2618
```
2619
2619
2620
+ <a id="DEP0138"></a>
2621
+ ### DEP0138: `process.mainModule`
2622
+ <!-- YAML
2623
+ changes:
2624
+ - version: REPLACEME
2625
+ pr-url: https://github.com/nodejs/node/pull/32232
2626
+ description: Documentation-only deprecation.
2627
+ -->
2628
+
2629
+ Type: Documentation-only
2630
+
2631
+ [`process.mainModule`][] is a CommonJS-only feature while `process` global
2632
+ object is shared with non-CommonJS environment. Its use within ECMAScript
2633
+ modules is unsupported.
2634
+
2635
+ It is deprecated in favor of [`require.main`][], because it serves the same
2636
+ purpose and is only available on CommonJS environment.
2637
+
2620
2638
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
2621
2639
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
2622
2640
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
@@ -2674,8 +2692,10 @@ async function openAndClose() {
2674
2692
[`os.networkInterfaces()`]: os.html#os_os_networkinterfaces
2675
2693
[`os.tmpdir()`]: os.html#os_os_tmpdir
2676
2694
[`process.env`]: process.html#process_process_env
2695
+ [`process.mainModule`]: process.html#process_process_mainmodule
2677
2696
[`punycode`]: punycode.html
2678
2697
[`require.extensions`]: modules.html#modules_require_extensions
2698
+ [`require.main`]: modules.html#modules_accessing_the_main_module
2679
2699
[`request.socket`]: http.html#http_request_socket
2680
2700
[`request.connection`]: http.html#http_request_connection
2681
2701
[`response.socket`]: http.html#http_response_socket
0 commit comments