refactor: update fs/promises imports to use node: prefix#2006
refactor: update fs/promises imports to use node: prefix#2006divyarathodgit wants to merge 1 commit intoasyncapi:masterfrom
Conversation
Updates outdated fs/promises imports across the codebase to use the modern node:fs/promises prefix, resolving SonarCloud warnings and ensuring compatibility with strict Node 24+ environments.
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis pull request updates import paths from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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 |
|
|
Thanks for the contribution. I’m closing this PR because, there is no existing issue linked in the PR. Please make sure to follow the contribution guidelines, which explain when issues are considered ready for implementation and when pull requests are appropriate. |



This PR standardizes the usage of the Node core modules by adding the node: prefix to fs/promises imports across the codebase.
The Problem:
Older imports like require('fs/promises') trigger warnings in SonarCloud and can cause resolution issues in stricter, modern Node environments (like Node 24). This addresses the issue recently raised by @varshitha in the #generator Slack channel regarding SonarCloud flagging these imports.
The Fix:
Updated apps/generator/scripts/build-templates.js
Updated packages/helpers/src/testing.js
Updated packages/helpers/test/testing.test.js (including Jest mocks).
Verification:
npm run test passes successfully in packages/helpers.
Summary by CodeRabbit