FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

esm: handle more error types thrown from the loader thread by aduh95 · Pull Request #48247 · nodejs/node · GitHub

/ node Public

esm: handle more error types thrown from the loader thread - #48247

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
aduh95:loader-throw-funny
Jun 1, 2023
Merged

esm: handle more error types thrown from the loader thread#48247
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
aduh95:loader-throw-funny

Conversation

aduh95 commented May 30, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Refs: #48240

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/modules

nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels May 30, 2023
aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels May 31, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 31, 2023

Copy link
Copy Markdown
Collaborator

JakobJingleheimer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Awesome, thanks!

The new test-cases seem a bit verbose; could they be DRY'd up with a loop (for (const valid of […]) and possibly for (const invalid of […]))?

Comment on lines +51 to +54
if (status === 'success' || body === null ||
(typeof body !== 'object' &&
typeof body !== 'function' &&
typeof body !== 'symbol')) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit

Suggested change
if (status === 'success' || body === null ||
(typeof body !== 'object' &&
typeof body !== 'function' &&
typeof body !== 'symbol')) {
if (status === 'success' || body === null ||
(typeof body !== 'object' &&
typeof body !== 'function' &&
typeof body !== 'symbol')
) {

aduh95 commented May 31, 2023

Copy link
Copy Markdown
Contributor Author

The new test-cases seem a bit verbose; could they be DRY'd up with a loop (for (const valid of […]) and possibly for (const invalid of […]))?

There are on the same structure than almost every other test cases in that file, that seems fine to me. IMO test code should be WET code, not DRY.

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 1, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 1, 2023
nodejs-github-bot merged commit d28f1f1 into nodejs:main Jun 1, 2023

Copy link
Copy Markdown
Collaborator

Landed in d28f1f1

aduh95 deleted the loader-throw-funny branch June 1, 2023 10:08
targos pushed a commit that referenced this pull request Jun 4, 2023
PR-URL: #48247
Refs: #48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
targos mentioned this pull request Jun 4, 2023

Copy link
Copy Markdown
Contributor

This is blocked by another PR that needs to be backported to v18.x because it references missing code.

aduh95 commented Jul 9, 2023

Copy link
Copy Markdown
Contributor Author

For reference, backporting this is blocked until #44710 is backported.

Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48247
Refs: nodejs#48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48247
Refs: nodejs#48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
targos pushed a commit to targos/node that referenced this pull request Nov 11, 2023
PR-URL: nodejs#48247
Refs: nodejs#48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
targos pushed a commit that referenced this pull request Nov 23, 2023
PR-URL: #48247
Backport-PR-URL: #50669
Refs: #48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#48247
Backport-PR-URL: nodejs/node#50669
Refs: nodejs/node#48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
PR-URL: nodejs/node#48247
Backport-PR-URL: nodejs/node#50669
Refs: nodejs/node#48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL