Skip to content

fix(scripts): replace deprecated file.path with parentPath#211

Merged
BlackHole1 merged 1 commit intomainfrom
fix-node-22
Jan 9, 2026
Merged

fix(scripts): replace deprecated file.path with parentPath#211
BlackHole1 merged 1 commit intomainfrom
fix-node-22

Conversation

@BlackHole1
Copy link
Member

Node.js deprecated Dirent.path in favor of Dirent.parentPath. Update the download script to use the new property name.

Node.js deprecated Dirent.path in favor of Dirent.parentPath.
Update the download script to use the new property name.

Signed-off-by: Kevin Cui <bh@bugs.cc>
Copilot AI review requested due to automatic review settings January 9, 2026 02:32
@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed path resolution when applying executable permissions to downloaded binaries.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

The change modifies the path resolution mechanism in the download script. Specifically, the chmod destination path computation is updated to use file.parentPath instead of file.path, altering how the target directory for executable permission assignment is determined on binaries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format 'type(scope): subject' with 'fix' as type and 'scripts' as scope, and clearly describes the main change of replacing deprecated file.path with parentPath.
Description check ✅ Passed The description is directly related to the changeset, explaining that Node.js deprecated Dirent.path and needs to be replaced with parentPath in the download script.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3b3691 and d040357.

📒 Files selected for processing (1)
  • scripts/download.mjs
🔇 Additional comments (1)
scripts/download.mjs (1)

56-56: Change correctly updates the deprecated Dirent.path API to parentPath.

The modification from file.path to file.parentPath properly addresses the Node.js deprecation (DEP0178). The parentPath property is available in Node.js v18.20.0 and later, and is fully compatible with the project's dependency specification (@types/node ^20.6.5). No other usages of the deprecated path property were found in the codebase.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the download script to use the new Dirent.parentPath property instead of the deprecated Dirent.path property, ensuring compatibility with current Node.js versions.

  • Updated property name from file.path to file.parentPath to use the non-deprecated API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BlackHole1 BlackHole1 merged commit e45a229 into main Jan 9, 2026
8 checks passed
@BlackHole1 BlackHole1 deleted the fix-node-22 branch January 9, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant