Skip to content

module: fix incorrect formatting in require(esm) cycle error message #57453

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

haykam821
Copy link
Contributor

This pull request includes minor wording and punctuation tweaks to fix the formatting of the require(esm) cycle error message. The message still seems a bit confusing to me, but these changes should at least be an improvement.

I am not sure whether tests should be implemented for this change, as the original error message didn't have tests either, but I can try my hand at implementing some if that would be preferred.

Fixes: #57451

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Mar 14, 2025
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM

Do you mind adding a test for this as well? I didn't check, I guess we already have a spot where this is checked or at least triggered in tests and we can just test for the correct value to be there.

Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.21%. Comparing base (3329efe) to head (ce68ab6).
Report is 642 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57453   +/-   ##
=======================================
  Coverage   90.20%   90.21%           
=======================================
  Files         629      629           
  Lines      184948   184948           
  Branches    36204    36211    +7     
=======================================
+ Hits       166837   166843    +6     
+ Misses      11057    11045   -12     
- Partials     7054     7060    +6     
Files with missing lines Coverage Δ
lib/internal/modules/esm/loader.js 95.04% <100.00%> (ø)

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. lts-watch-v20.x PRs that may need to be released in v20.x labels Mar 14, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 14, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 7, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 7, 2025
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2025
@nodejs-github-bot nodejs-github-bot merged commit bc09144 into nodejs:main Apr 9, 2025
80 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in bc09144

JonasBa pushed a commit to JonasBa/node that referenced this pull request Apr 11, 2025
Fixes: nodejs#57451
PR-URL: nodejs#57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
RafaelGSS pushed a commit that referenced this pull request May 1, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
aduh95 pushed a commit that referenced this pull request May 6, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
RafaelGSS pushed a commit that referenced this pull request May 14, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
aduh95 pushed a commit that referenced this pull request May 16, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
aduh95 pushed a commit that referenced this pull request May 17, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
aduh95 pushed a commit that referenced this pull request May 17, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
aduh95 pushed a commit that referenced this pull request May 17, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
aduh95 pushed a commit that referenced this pull request May 19, 2025
Fixes: #57451
PR-URL: #57453
Reviewed-By: Marco Ippolito 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Jake Yuesong Li 
Reviewed-By: Luigi Pinca 
Reviewed-By: James M Snell 
@marco-ippolito
Copy link
Member

This commit requires a manual backport to v20.x

@marco-ippolito marco-ippolito added backport-requested-v20.x PRs awaiting manual backport to the v20.x-staging branch. and removed lts-watch-v20.x PRs that may need to be released in v20.x labels Jun 5, 2025
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 pending requests for changes, and a CI started. backport-requested-v20.x PRs awaiting manual backport to the v20.x-staging branch. 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.

Bad formatting in require(esm) module cycle error message
9 participants