Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
aduh95 authored Mar 13, 2020
commit 8da11915b669c89fd49a34e9d2806004424e8318
8 changes: 5 additions & 3 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2628,10 +2628,12 @@ changes:

Type: Documentation-only

[`process.mainModule`][] is a CJS-only feature while `process` global object is
shared with non-CJS environment.
[`process.mainModule`][] is a CommonJS-only feature while `process` global object is
shared with non-CommonJS environment. Its use within ECMAScript modules is
unsupported.

It's safe to use [`require.main`][] as a replacement.
It is deprecated in favor of [`require.main`][], because it serves the same
purpose and is only available on CommonJS environment.

[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
Expand Down