-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
chore(build): replace node:fs repeated import #13467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe update standardizes file system function usage in the build script by replacing direct imports of Changes
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
scripts/build.js (1)
165-165
: Usepath.join
for constructing file paths
Consider replacing string interpolation withpath.join(pkgDir, 'package.json')
for better cross-platform compatibility:- fs.readFileSync(`${pkgDir}/package.json`, 'utf-8') + fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf-8')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/build.js
(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
scripts/build.js (4)
rollup.config.js (1)
pkg
(45-45)scripts/release.js (2)
pkg
(81-83)pkg
(457-457)scripts/dev.js (2)
pkg
(63-63)targets
(43-43)scripts/utils.js (3)
pkg
(18-18)targets
(9-24)targets
(9-24)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules
- GitHub Check: Header rules
- GitHub Check: Pages changed
🔇 Additional comments (2)
scripts/build.js (2)
173-173
: Unifiedfs.existsSync
usage
Direct import ofexistsSync
has been replaced withfs.existsSync
, aligning with the singlefs
import and eliminating redundant imports.
236-236
: Consistentfs.existsSync
incheckFileSize
Switched tofs.existsSync
instead of a direct import; this change maintains consistency in module usage.
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
The 19th line has already imported fs, remove 21 duplicate imports.
Summary by CodeRabbit
fs
namespace. No changes to functionality or user experience.