refactor(interactive): remove dead __dirname/__filename after wrapper retirement#430
Conversation
… retirement These were only consumed by the ably-interactive wrapper logic removed in #419. With the wrapper gone, both constants and the fileURLToPath import are unused. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughFollow-up cleanup to PR #419, which retired the Changes
Review Notes
|
There was a problem hiding this comment.
Review: Removing dead __dirname/__filename code
This is a clean, minimal cleanup. The three removed lines (fileURLToPath import, __filename, __dirname) have no remaining references in the file, and the kept imports (path, fs) are still actively used at line 901–904 for the oclif manifest lookup.
No issues found. The change is correct and safe.
- Dead code removed: confirmed via grep — zero remaining references to
__dirname,__filename, orfileURLToPathin the file. - Live imports kept:
pathandfsare still used forpath.join(this.config.root, ...)andfs.existsSync/fs.readFileSync. - Validation steps in the PR description (build, lint, unit tests) all reported clean.
LGTM.
Small follow-up to #419.
When the
ably-interactivewrapper was retired, the__filename/__dirnameconstants it relied on insrc/commands/interactive.tswere left behind, along with the now-unusedfileURLToPathimport. They were dead code.This removes all three lines.
pathandfsare kept — they're still used for the oclif manifest lookup later in the file.ESLint did not flag these (so
mainstays green), but they're genuine leftovers, so worth tidying.Validation
pnpm prepare— build + manifest OKpnpm exec eslint src/commands/interactive.ts— cleanpnpm test test/unit/commands/interactive.test.ts— 7 passed🤖 Generated with Claude Code