René's URL Explorer Experiment


Title: module: run require.resolve through module.registerHooks() by joyeecheung · Pull Request #62028 · nodejs/node · GitHub

Open Graph Title: module: run require.resolve through module.registerHooks() by joyeecheung · Pull Request #62028 · nodejs/node

X Title: module: run require.resolve through module.registerHooks() by joyeecheung · Pull Request #62028 · nodejs/node

Description: Previously, require.resolve() called Module._resolveFilename() directly, bypassing any resolve hooks registered via module.registerHooks(). This patch fixes that.

Open Graph Description: Previously, require.resolve() called Module._resolveFilename() directly, bypassing any resolve hooks registered via module.registerHooks(). This patch fixes that.

X Description: Previously, require.resolve() called Module._resolveFilename() directly, bypassing any resolve hooks registered via module.registerHooks(). This patch fixes that.

Opengraph URL: https://github.com/nodejs/node/pull/62028

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6798efc7-97d4-a356-2f5b-7c80aae411f0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8560:39CFC7:2AC16F:3BB31B:6A4C9E71
html-safe-nonce5beb86a6340bbcc8be9e6d0ab31945faa8c87cba8875391dfe8d2065832595ed
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTYwOjM5Q0ZDNzoyQUMxNkY6M0JCMzFCOjZBNEM5RTcxIiwidmlzaXRvcl9pZCI6IjU4NDA0NjUwNDM5MjYwNjQ3NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac145fe3e76cee708cdf7dfc9577d22ae687ee007b63f6a23e76fa4133de0fb29f
hovercard-subject-tagpull_request:3336293330
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodejs/node/pull/62028/files
twitter:imagehttps://avatars.githubusercontent.com/u/4299420?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4299420?s=400&v=4
og:image:altPreviously, require.resolve() called Module._resolveFilename() directly, bypassing any resolve hooks registered via module.registerHooks(). This patch fixes that.
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseae90d426644ca15e89bacceb72e51f4e9dbf85f7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/pull/62028/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F62028%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fpull%2F62028%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/pull/62028/files
Reloadhttps://github.com/nodejs/node/pull/62028/files
Reloadhttps://github.com/nodejs/node/pull/62028/files
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 964 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodejs%2Fnode%2Fissues%2Fnew%2Fchoose
nodejs-github-bothttps://github.com/nodejs-github-bot
nodejs:mainhttps://github.com/nodejs/node/tree/main
joyeecheung:fix-require-resolvehttps://github.com/joyeecheung/node/tree/fix-require-resolve
Conversation 8 https://github.com/nodejs/node/pull/62028
Commits 3 https://github.com/nodejs/node/pull/62028/commits
Checks 38 https://github.com/nodejs/node/pull/62028/checks
Files changed https://github.com/nodejs/node/pull/62028/files
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
module: run require.resolve through module.registerHooks() https://github.com/nodejs/node/pull/62028/files#top
Show all changes 3 commits https://github.com/nodejs/node/pull/62028/files
5e065ef module: run require.resolve through module.registerHooks() joyeecheung Feb 27, 2026 https://github.com/nodejs/node/pull/62028/commits/5e065efb7eaf6b708ab54b700cc98fb8df4d6ec9
75ec142 fixup! module: run require.resolve through module.registerHooks() joyeecheung Feb 28, 2026 https://github.com/nodejs/node/pull/62028/commits/75ec142f76f743afa72c9e42fcba8f716081f803
c1a6de3 fixup! fixup! module: run require.resolve through module.registerHooks() joyeecheung Mar 2, 2026 https://github.com/nodejs/node/pull/62028/commits/c1a6de374f39ccf9c654ed14567ee9669d933506
Clear filters https://github.com/nodejs/node/pull/62028/files
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
loader.js https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
loader.js https://github.com/nodejs/node/pull/62028/files#diff-f6796082f599554ec3a29c47cf026cb24fc5104884f2632e472c05fe622d778b
translators.js https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
helpers.js https://github.com/nodejs/node/pull/62028/files#diff-fddf8a06747f8c9e83cd2a3ebee0f53dbd790567ce018044e70bd0ffbbcc815e
require-resolve-caller.js https://github.com/nodejs/node/pull/62028/files#diff-e40bf07e52753b36265c042194d26b970bdb54b04aab8371fef1de9104f2ca8f
require-resolve-paths-caller.js https://github.com/nodejs/node/pull/62028/files#diff-aeab7a6727573b8cde928b74124a63ad78aadcc6e855d00392fb7817e0e2ad3e
test-module-hooks-resolve-require-resolve-builtin.js https://github.com/nodejs/node/pull/62028/files#diff-885b7d3fdebfaac7f7ad94b54d90f3ca54e7dc61a0ea02782f5bb1c915d253a2
test-module-hooks-resolve-require-resolve-consistency.js https://github.com/nodejs/node/pull/62028/files#diff-32f8420de2ee4b8c3d9b614afd7975b2cb2e3bde3648dc3d2dc76871c7efb570
test-module-hooks-resolve-require-resolve-create-require.js https://github.com/nodejs/node/pull/62028/files#diff-33a4946042b905a05c7db6192a115d3611ef3344b7c12e788074b32e17bd978a
test-module-hooks-resolve-require-resolve-fallthrough.js https://github.com/nodejs/node/pull/62028/files#diff-85ca35fdea6cb0aa3ee6f872d747adaafc79db2aa97b5a437d40a8bf291bd7ce
test-module-hooks-resolve-require-resolve-imported-cjs.js https://github.com/nodejs/node/pull/62028/files#diff-ebcf0f62689dbf476da0156192f54d4f89b2f0bc5c9c737b3e407fcb6ff5aa66
test-module-hooks-resolve-require-resolve-loaded-with-source.js https://github.com/nodejs/node/pull/62028/files#diff-7b7e8c0993789c4704c178197484eb0911bfa787d22c1bf547d745a2d778471a
test-module-hooks-resolve-require-resolve-paths.js https://github.com/nodejs/node/pull/62028/files#diff-6b98caab46772dfb48d5d55d8555d2a73a06ced926c54d0f176bd24f5bb5005e
test-module-hooks-resolve-require-resolve-redirect.js https://github.com/nodejs/node/pull/62028/files#diff-50e8c55b974078f7c9b00b94b0039ed870f85ea0bb9e541b88f0cf08c43ac696
test-repl.js https://github.com/nodejs/node/pull/62028/files#diff-784d0be462dc5940151d8bf3ba1463d103d9d91d25e220ea53b9fe290438ada3
lib/internal/modules/cjs/loader.jshttps://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/lib/internal/modules/cjs/loader.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
https://github.com/nodejs/node/pull/62028/files#diff-5b5902273122e094ff474fda358605ffa45a4a58b51cd0bf4c1acb93779df142
lib/internal/modules/esm/loader.jshttps://github.com/nodejs/node/pull/62028/files#diff-f6796082f599554ec3a29c47cf026cb24fc5104884f2632e472c05fe622d778b
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/lib/internal/modules/esm/loader.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/62028/files#diff-f6796082f599554ec3a29c47cf026cb24fc5104884f2632e472c05fe622d778b
https://github.com/nodejs/node/pull/62028/files#diff-f6796082f599554ec3a29c47cf026cb24fc5104884f2632e472c05fe622d778b
lib/internal/modules/esm/translators.jshttps://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/lib/internal/modules/esm/translators.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
https://github.com/nodejs/node/pull/62028/files#diff-b1de5e9ce1e9b411001c63d11a5092dbba32e1586269a20dc11408375eb2f16c
lib/internal/modules/helpers.jshttps://github.com/nodejs/node/pull/62028/files#diff-fddf8a06747f8c9e83cd2a3ebee0f53dbd790567ce018044e70bd0ffbbcc815e
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/lib/internal/modules/helpers.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
https://github.com/nodejs/node/pull/62028/files#diff-fddf8a06747f8c9e83cd2a3ebee0f53dbd790567ce018044e70bd0ffbbcc815e
https://github.com/nodejs/node/pull/62028/files#diff-fddf8a06747f8c9e83cd2a3ebee0f53dbd790567ce018044e70bd0ffbbcc815e
https://github.com/nodejs/node/pull/62028/files#diff-fddf8a06747f8c9e83cd2a3ebee0f53dbd790567ce018044e70bd0ffbbcc815e
https://github.com/nodejs/node/pull/62028/files#diff-fddf8a06747f8c9e83cd2a3ebee0f53dbd790567ce018044e70bd0ffbbcc815e
test/fixtures/module-hooks/require-resolve-caller.jshttps://github.com/nodejs/node/pull/62028/files#diff-e40bf07e52753b36265c042194d26b970bdb54b04aab8371fef1de9104f2ca8f
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/test/fixtures/module-hooks/require-resolve-caller.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
test/fixtures/module-hooks/require-resolve-paths-caller.jshttps://github.com/nodejs/node/pull/62028/files#diff-aeab7a6727573b8cde928b74124a63ad78aadcc6e855d00392fb7817e0e2ad3e
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/test/fixtures/module-hooks/require-resolve-paths-caller.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
test/module-hooks/test-module-hooks-resolve-require-resolve-builtin.jshttps://github.com/nodejs/node/pull/62028/files#diff-885b7d3fdebfaac7f7ad94b54d90f3ca54e7dc61a0ea02782f5bb1c915d253a2
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/test/module-hooks/test-module-hooks-resolve-require-resolve-builtin.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
test/module-hooks/test-module-hooks-resolve-require-resolve-consistency.jshttps://github.com/nodejs/node/pull/62028/files#diff-32f8420de2ee4b8c3d9b614afd7975b2cb2e3bde3648dc3d2dc76871c7efb570
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/test/module-hooks/test-module-hooks-resolve-require-resolve-consistency.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
test/module-hooks/test-module-hooks-resolve-require-resolve-create-require.jshttps://github.com/nodejs/node/pull/62028/files#diff-33a4946042b905a05c7db6192a115d3611ef3344b7c12e788074b32e17bd978a
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/test/module-hooks/test-module-hooks-resolve-require-resolve-create-require.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
test/module-hooks/test-module-hooks-resolve-require-resolve-fallthrough.jshttps://github.com/nodejs/node/pull/62028/files#diff-85ca35fdea6cb0aa3ee6f872d747adaafc79db2aa97b5a437d40a8bf291bd7ce
View file https://github.com/joyeecheung/node/blob/c1a6de374f39ccf9c654ed14567ee9669d933506/test/module-hooks/test-module-hooks-resolve-require-resolve-fallthrough.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodejs/node/pull/62028/{{ revealButtonHref }}
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
Please reload this pagehttps://github.com/nodejs/node/pull/62028/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.