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

errors: simplify ERR_REQUIRE_ESM message generation #35123

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

Trott
Copy link
Member

@Trott Trott commented Sep 9, 2020

Because of the condition that starts the if block, we know that
parentPath must be truthy. So there is no need to check for that in
the template string that generates the error message.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the errors Issues and PRs related to JavaScript errors originated in Node.js core. label Sep 9, 2020
@Trott Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 9, 2020

Because of the condition that starts the `if` block, we know that
`parentPath` must be truthy. So there is no need to check for that in
the template string that generates the error message.

PR-URL: nodejs#35123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
@Trott
Copy link
Member Author

Trott commented Sep 11, 2020

Landed in f54254a

@Trott Trott merged commit f54254a into nodejs:master Sep 11, 2020
@Trott Trott deleted the esm-no-check branch September 11, 2020 23:27
ruyadorno pushed a commit that referenced this pull request Sep 17, 2020
Because of the condition that starts the `if` block, we know that
`parentPath` must be truthy. So there is no need to check for that in
the template string that generates the error message.

PR-URL: #35123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
@ruyadorno ruyadorno mentioned this pull request Sep 21, 2020
4 tasks
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Because of the condition that starts the `if` block, we know that
`parentPath` must be truthy. So there is no need to check for that in
the template string that generates the error message.

PR-URL: #35123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Nov 3, 2020
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Because of the condition that starts the `if` block, we know that
`parentPath` must be truthy. So there is no need to check for that in
the template string that generates the error message.

PR-URL: #35123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Because of the condition that starts the `if` block, we know that
`parentPath` must be truthy. So there is no need to check for that in
the template string that generates the error message.

PR-URL: nodejs#35123
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants