Skip to content

module: convert schema-only core module on convertCJSFilenameToURL - #58612

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
himself65:himself65/2025/06/07/custom-hook
Jun 25, 2025
Merged

module: convert schema-only core module on convertCJSFilenameToURL#58612
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
himself65:himself65/2025/06/07/custom-hook

Conversation

@himself65

Copy link
Copy Markdown
Member

Fixes: #58607

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-botnodejs-github-bot added module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. labels Jun 7, 2025
@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch from 136b877 to 817052dCompareJune 7, 2025 09:13
@joyeecheung

Copy link
Copy Markdown
Member

From the issue description I don’t think its the validation that should be changed - it should be the URL that gets passed into the hooks that should be corrected (it should’ve been node:sea instead of sea, looks like somewhere in the CJS loader the conversion is missed since internally we use filenames and ids everywhere and only convert them to URLs when being passed into hooks).

@codecov

codecovBot commented Jun 7, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.10%. Comparing base (faada65) to head (ee2dc06).
Report is 12 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #58612 +/- ##
=======================================
Coverage 90.09% 90.10% =======================================
Files 640 640 Lines 188271 188275 +4 Branches 36923 36923 =======================================
+ Hits 169625 169641 +16 + Misses 11386 11344 -42 - Partials 7260 7290 +30 
Files with missing linesCoverage Δ
lib/internal/modules/customization_hooks.js100.00% <100.00%> (ø)

... and 34 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.

@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch from 22850d8 to a49f57bCompareJune 7, 2025 10:57
@himself65

Copy link
Copy Markdown
MemberAuthor

From the issue description I don’t think its the validation that should be changed - it should be the URL that gets passed into the hooks that should be corrected (it should’ve been node:sea instead of sea, looks like somewhere in the CJS loader the conversion is missed since internally we use filenames and ids everywhere and only convert them to URLs when being passed into hooks).

Yeah, I read the code and think the issue should be in convertCJSFilenameToURL ? updated the code now

@himself65himself65 changed the title module: skip check builtin module on validateLoadmodule: fix schema only core module on convertCJSFilenameToURLJun 7, 2025
@himself65himself65 changed the title module: fix schema only core module on convertCJSFilenameToURLmodule: convert schema-only core module on convertCJSFilenameToURLJun 7, 2025
@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch 3 times, most recently from 08ec6cc to d2b8035CompareJune 7, 2025 11:33
Comment threadlib/internal/modules/customization_hooks.js Outdated
Comment threadtest/module-hooks/test-module-hooks-builtin-require.js Outdated
Comment threadtest/module-hooks/test-module-hooks-builtin-require.js Outdated
Comment threadtest/module-hooks/test-module-hooks-builtin-require.js Outdated
Comment threadlib/internal/modules/customization_hooks.js Outdated
@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch from 2f30145 to 9bcd67aCompareJune 9, 2025 16:10
Comment threadtest/module-hooks/test-module-hooks-builtin-require.js Outdated
@himself65himself65 added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 9, 2025
@github-actionsgithub-actionsBot added request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Jun 9, 2025
@github-actions

Copy link
Copy Markdown
Contributor
Failed to start CI
 ⚠ No approving reviews found
✘ Refusing to run CI on potentially unsafe PR
https://github.com/nodejs/node/actions/runs/15542291850

@joyeecheung

Copy link
Copy Markdown
Member

#58612 (comment)@himself65 in case you missed it

@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch from 1bec580 to a79df89CompareJune 16, 2025 07:54
Comment threadtest/module-hooks/test-module-hooks-builtin-require.js Outdated
Comment threadtest/module-hooks/test-module-hooks-builtin-require.js Outdated
@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch from 628e6d7 to 4b27d6aCompareJune 16, 2025 16:14
@joyeecheungjoyeecheung added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci-failed An error occurred while starting CI via request-ci label, and manual interventon is needed. labels Jun 19, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 19, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@himself65himself65 added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
@himself65
himself65force-pushed the himself65/2025/06/07/custom-hook branch from 4b27d6a to ee2dc06CompareJune 24, 2025 10:19
@himself65himself65 added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@himself65himself65 added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@himself65himself65 added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 24, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@himself65himself65 added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@himself65himself65 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 25, 2025
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 25, 2025
@nodejs-github-bot
nodejs-github-bot merged commit a705e24 into nodejs:mainJun 25, 2025
72 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in a705e24

targos pushed a commit that referenced this pull request Jul 3, 2025
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #58612Fixes: #58607
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2025
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #58612Fixes: #58607
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 24, 2025
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #58612Fixes: #58607
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

moduleIssues and PRs related to the module subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

schemeless builtins crash CJS loader

3 participants

@himself65@nodejs-github-bot@joyeecheung