Title: modules: fix sync hook short-circuit in require() in imported CJS by joyeecheung · Pull Request #62920 · nodejs/node · GitHub
Open Graph Title: modules: fix sync hook short-circuit in require() in imported CJS by joyeecheung · Pull Request #62920 · nodejs/node
X Title: modules: fix sync hook short-circuit in require() in imported CJS by joyeecheung · Pull Request #62920 · nodejs/node
Description: For imported CJS, if it's not customized by asynchronous hooks, make sure it won't use the quirky re-invented require in all cases. When the imported CJS module is customized by synchronous hooks, in the synthetic module evalutation step, avoid calling the respective default step again. Make the branching of loadCJSModuleWithModuleLoad() and loadCJSModuleWithSpecialRequire() more explicit, and fold the tentative fs read in the 'commonjs' translator into the share createCJSModuleWrap() helper instead of checking it twice in the same path. Refs: #55808 (comment) Fixes: #63060
Open Graph Description: For imported CJS, if it's not customized by asynchronous hooks, make sure it won't use the quirky re-invented require in all cases. When the imported CJS module is customized by synchronous...
X Description: For imported CJS, if it's not customized by asynchronous hooks, make sure it won't use the quirky re-invented require in all cases. When the imported CJS module is customized by syn...
Opengraph URL: https://github.com/nodejs/node/pull/62920
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/commits/:range(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:3c741580-8816-a7f5-9222-11d9e6229e99 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 98CA:3133FE:6342FFD:6663F57:6A655A77 |
| html-safe-nonce | 3c925de357ce809ac805652c9b7aa46836ce722ab2992a36c4cb86593808fc3b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OENBOjMxMzNGRTo2MzQyRkZEOjY2NjNGNTc6NkE2NTVBNzciLCJ2aXNpdG9yX2lkIjoiODkwMDY5MTc4MTM0NjQ4MjgwNyIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 8048e33957c8fe2d169bd89923a496d21cfec4587f2d7a6ef44f3e77b939404f |
| hovercard-subject-tag | pull_request:3575887477 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/62920/commits/539c680cdb03131e75fad614fe30ffb6707e7934 |
| twitter:image | https://avatars.githubusercontent.com/u/4299420?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4299420?s=400&v=4 |
| og:image:alt | For imported CJS, if it's not customized by asynchronous hooks, make sure it won't use the quirky re-invented require in all cases. When the imported CJS module is customized by synchronous... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 309153364422b3c499922d1a2a6404910a58ed8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width