Skip to content
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

doc/api/: fixed 2 little issues in modules.md #27853

Closed
Changes from all commits
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
4 changes: 2 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ To get the exact filename that will be loaded when `require()` is called, use
the `require.resolve()` function.

Putting together all of the above, here is the high-level algorithm
in pseudocode of what `require.resolve()` does:
in pseudocode of what `require()` does:

```txt
require(X) from module at path Y
Expand Down Expand Up @@ -342,7 +342,7 @@ If the given path does not exist, `require()` will throw an [`Error`][] with its
<!--type=misc-->

It is convenient to organize programs and libraries into self-contained
directories, and then provide a single entry point to that library.
directories, and then provide a single entry point to those directories.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would delete this sentence entirely. The next sentence is sufficient (although consider changing folder to directory in that sentence). This sentence mostly just gets in the way.

Copy link
Contributor Author

@Alex-Temny Alex-Temny May 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi.
sorry for the late response and thanks for the commit. I agree that the suggested version is better.
What should I do now?
Should I now push the changes to the fork and synchronize this Pull Request with other changes that have landed in master by following instructions given at https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#setting-up-your-local-environment, right?
I'm pretty new to GitHub.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I now push the changes to the fork and synchronize this Pull Request with other changes that have landed in master by following instructions given at https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#setting-up-your-local-environment, right?

Yes, I believe so. If you run into a problem, let me know. (We can try to walk you through it, or just do it for you.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again.
I've tried to do what I described above ("...synchronize this Pull Request with other changes that have landed in master...").
Hope, it worked.
If it didn't work and you can "just do it for you.", please do it )

There are three ways in which a folder may be passed to `require()` as
an argument.

Expand Down