-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
v4 backport: doc: unify dirname and filename description #10968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
doc/api/globals.md
Outdated
| The directory name of the current module. This the same as the | ||
| [`path.dirname()`][] of the [`__filename`][]. | ||
|
|
||
| `__dirname` isn't actually a global but rather local to each module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please avoid the use of contractions in the docs. s/isn't/is not/
I know this was like this already but while you're in here changing things :-)
|
PTAL @jasnell |
|
PR is docs only, CI is irrelevant |
f5c57c7 to
735119c
Compare
|
@sam-github needs a rebase |
997377a to
a78f0a4
Compare
__dirname is path.dirname(__filename), but its docs, specifically the attempt to describe javascript scope in terms of "running" and "executing" had drifted apart. Rework to describe one as a variation of the other, move the example, and just describe the names in terms of the module, and it's local variables rather than the ill defined execution concepts. Fix: nodejs#5525 PR-URL: nodejs#10527 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
a78f0a4 to
dd97788
Compare
|
@MylesBorins apologies for the delay, rebased |
|
landed in f97bfb227f |
#10527 (comment)