chore(react): export process in exports internal#1719
Conversation
|
📝 WalkthroughWalkthroughAdds the preact symbol Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/react/runtime/lazy/internal.js(1 hunks)packages/react/runtime/src/internal.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1238
File: packages/react/runtime/src/debug/component-stack.ts:70-90
Timestamp: 2025-07-18T04:27:18.291Z
Learning: The component-stack.ts file in packages/react/runtime/src/debug/component-stack.ts is a direct fork from https://github.com/preactjs/preact/blob/main/debug/src/component-stack.js. The team prefers to keep it aligned with the upstream Preact version and may contribute improvements back to Preact in the future.
📚 Learning: 2025-07-18T04:27:18.291Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1238
File: packages/react/runtime/src/debug/component-stack.ts:70-90
Timestamp: 2025-07-18T04:27:18.291Z
Learning: The component-stack.ts file in packages/react/runtime/src/debug/component-stack.ts is a direct fork from https://github.com/preactjs/preact/blob/main/debug/src/component-stack.js. The team prefers to keep it aligned with the upstream Preact version and may contribute improvements back to Preact in the future.
Applied to files:
packages/react/runtime/src/internal.ts
🔇 Additional comments (2)
packages/react/runtime/lazy/internal.js (1)
25-25: Avoid shadowing the globalprocess(alias and re-export instead)Destructuring
processcreates a local binding that shadows Node’s global — alias the imported value and re-export it to preserve the public export without a localprocessidentifier.Apply:
- process, + process: preactProcess,Then add:
export { preactProcess as process };Confirm that target[sExportsReactInternal] actually exposes a
processproperty at runtime (otherwise the export will be undefined).packages/react/runtime/src/internal.ts (1)
37-42: LGTM: internal surface parity with lazy bridge.Adding
processalongsideoptions/Componentaligns the TS surface with the lazy internal export; no logic changes.
CodSpeed Performance ReportMerging #1719 will not alter performanceComparing Summary
|
Web Explorer#5103 Bundle Size — 362.79KiB (0%).6b0d731(current) vs 2800dce main#5090(baseline) Bundle metrics
Bundle size by type
|
| Current #5103 |
Baseline #5090 |
|
|---|---|---|
236.88KiB |
236.88KiB |
|
94.02KiB |
94.02KiB |
|
31.89KiB |
31.89KiB |
Bundle analysis report Branch hzy:p/hzy/internal-export-proces... Project dashboard
Generated by RelativeCI Documentation Report issue
React Example#5110 Bundle Size — 238.2KiB (0%).6b0d731(current) vs 2800dce main#5097(baseline) Bundle metrics
|
| Current #5110 |
Baseline #5097 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
163 |
163 |
|
67 |
67 |
|
46.88% |
46.88% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #5110 |
Baseline #5097 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
92.45KiB |
92.45KiB |
Bundle analysis report Branch hzy:p/hzy/internal-export-proces... Project dashboard
Generated by RelativeCI Documentation Report issue
Summary by CodeRabbit
Checklist