Skip to content

errors: simplify ERR_REQUIRE_ESM message generation - #35123

Merged
Trott merged 1 commit into
nodejs:masterfrom
Trott:esm-no-check
Sep 11, 2020
Merged

errors: simplify ERR_REQUIRE_ESM message generation#35123
Trott merged 1 commit into
nodejs:masterfrom
Trott:esm-no-check

Conversation

@Trott

@TrottTrott commented Sep 9, 2020

Copy link
Copy Markdown
Member

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-botnodejs-github-bot added the errors Issues and PRs related to JavaScript errors originated in Node.js core. label Sep 9, 2020
@TrottTrott added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 9, 2020
@github-actionsgithub-actionsBot 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

nodejs-github-bot commented Sep 9, 2020

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
MemberAuthor

Landed in f54254a

@Trott
Trott merged commit f54254a into nodejs:masterSep 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>
@ruyadornoruyadorno 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>
@MylesBorinsMylesBorins 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

errorsIssues 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

@Trott@nodejs-github-bot@guybedford@addaleax@juanarbol