fix(perf_hooks): align default import export keys - #9885
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change maps Changesperf_hooks default namespace compatibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change makes node:perf_hooks default imports expose a Node-compatible cached namespace while preserving shared exports and existing namespace behavior. The implementation and targeted validation indicate no remaining merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 5 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed on |
The
node-suite/globals/native-module-default-export-keysrow in #9202 fails because Perry binds thenode:perf_hooksdefault import to the ESM namespace object, whose enumerabledefaultexport does not exist on Node's CommonJSmodule.exportsvalue.Create the default import as a cached
perf_hooks.defaultnamespace with the CommonJS key surface, while keepingimport * as hookson the ESM namespace. Member reads and calls route back to the base module, preservinghooks.default.performance === hooks.performanceand the existingconstantsobject behavior.Validation:
node-suite/globals/native-module-default-export-keys: 1/1 parity pass against Node 26.5.1node-suite/perf_hooks/importsfixtures: exact Node outputperry-dispatchandperry-hirsuites: passcargo test -p perry-runtime -- --test-threads=1: 3,227 passed, 4 ignored; doc tests greenscripts/run_lint_gates.sh: all 64 gates passed; 2 CI-expression gates skipped locallyNo version bump.
Addresses
node-suite/globals/native-module-default-export-keysin #9202.Summary by CodeRabbit
node:perf_hooksdefault imports to match Node.js behavior.perf_hooks.default, includingperformanceandconstants.