refactor: use Promise.withResolvers in node-only flows and tests#2378
refactor: use Promise.withResolvers in node-only flows and tests#2378ghostdevv merged 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request refactors promise construction across multiple files to use Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🔗 Linked issue
N/A
🧭 Context
This refactor replaces manually constructed deferred promises in Node-only code paths and related tests with
Promise.withResolvers.The goal is to make these flows easier to read, avoid external
resolvevariable capture, and align the codebase with the Node 24 runtime already required by the project.📚 Description
This change updates the connector CLI and interactive npm client to use
Promise.withResolversfor child-process and PTY lifecycle coordination, rather than wrapping those flows innew Promise(...)with externally assigned resolvers.It also updates the affected Nuxt component tests to use the same pattern for mocked loading states. The behavior is unchanged; this is a readability and consistency refactor focused on code paths that only run in environments where
Promise.withResolversis available.