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

module: fixing url change in load sync hook chain #56402

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

awto
Copy link

@awto awto commented Dec 29, 2024

Fixes: #56376

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Dec 29, 2024
Copy link
Contributor

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

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

Thanks for this! It looks okay to me. The test is fine, but I think it could be improved/simplified.

I'm gonna tag the original author of this for review since she has more context than me.

lib/internal/modules/cjs/loader.js Show resolved Hide resolved
test/module-hooks/test-module-hooks-load-url-change.js Outdated Show resolved Hide resolved
@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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jan 2, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 2, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.11%. Comparing base (0dbbaba) to head (7d63559).
Report is 50 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56402      +/-   ##
==========================================
+ Coverage   88.53%   89.11%   +0.57%     
==========================================
  Files         657      662       +5     
  Lines      190718   191585     +867     
  Branches    36603    36873     +270     
==========================================
+ Hits       168861   170732    +1871     
+ Misses      15024    13701    -1323     
- Partials     6833     7152     +319     
Files with missing lines Coverage Δ
lib/internal/modules/cjs/loader.js 98.11% <100.00%> (ø)

... and 114 files with indirect coverage changes

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

Can you add a test for import('foo') as well?

test/module-hooks/test-module-hooks-load-url-change.js Outdated Show resolved Hide resolved
Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

LGTM, thanks, I'd still prefer to see a test for import, but this is only touching CJS loader, so it's fine to leave that to a follow-up.

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 7, 2025
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

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

@awto awto requested a review from joyeecheung January 8, 2025 12:09
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 9, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 9, 2025
@nodejs-github-bot
Copy link
Collaborator

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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CJS nextLoader callback in loader hook doesn't use changed URL
8 participants