Skip to content

refactor: replace expand-tilde package by modernized local reimplementation - #96

Open
AFCMS wants to merge 1 commit into
pnpm:mainfrom
AFCMS:remove_expand_tilde
Open

AFCMS wants to merge 1 commit into
pnpm:mainfrom
AFCMS:remove_expand_tilde

Conversation

@AFCMS

@AFCMS AFCMS commented Oct 27, 2026 •

Copy link
Copy Markdown

Replace expand-tilde it's types and dependencies homedir-polyfill and parse-passwd by a modernised TypeScript function.

For reference, the original function implementation. I have extensive testing to make sure the new implementation behaves the same.

Summary by CodeRabbit

  • New Features
    • Path inputs now expand ~ to the home directory when available and ~+ to the current working directory. Other paths remain unchanged.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 795d50e2-f783-440d-88e3-e0ab10385903
Commits

Reviewing files that changed from the base of the PR and between 186022e and 6a8b1d9.

Files ignored due to path filters: 2
  • dist/index.js is excluded by !**/dist/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2
  • package.json
  • src/inputs/index.ts
Files with no reviewable changes: 1
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Recent review details
Context from checks skipped due to timeout: 1
  • GitHub Check: CodeRabbit
Additional comments: 2
src/inputs/index.ts: 2

2-2: LGTM!

64-83: LGTM!

Walkthrough

The input module replaces the expand-tilde dependency with a local helper. The helper expands ~+ from the current working directory and leading ~ from the home directory when available. The related package dependencies are removed.

Changes: Path expansion

Layer / File(s) Summary
Add and wire local path expansion
src/inputs/index.ts, package.json
The input module imports Node.js os and adds expandTilde for supported tilde paths. package.json removes expand-tilde and @types/expand-tilde.

Priority: Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: zkochan

Merge Risk: Minimal · up to 6a8b1

No verified merge-blocking risk remains in the reviewed change.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: replacing the expand-tilde package with a local implementation.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the paths at night,
Tilde trails turn left or right.
Home is found when it is near,
Working paths stay crisp and clear.
The old package hops away,
A local helper leads the way.

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

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