Update outdated dependencies#95
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
tests/unit/**/*.test.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
tests/**/*.test.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
tests/**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (4)
📝 WalkthroughWalkthroughAdds ChangesError message localization and maintenance updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
16ce04f to
0cbf1f6
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/unit/binary-downloader.test.ts`:
- Around line 32-51: The test can leak the temporary directory if an expectation
throws; wrap the server/test block and subsequent assertions in a try/finally so
dir is always removed: create dir via fs.mkdtemp as now, run withServer and the
expect(downloadFile(...)) and fs.stat expectations inside the try, and call
await fs.rm(dir, {recursive: true, force: true}) in the finally block; reference
the local vars dir and destination and the helpers withServer and downloadFile
to locate where to add the try/finally and ensure cleanup always runs on
failure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3f246043-ded9-4914-b875-8edc751988bc
📒 Files selected for processing (5)
.coderabbit.yaml.gitattributes.github/workflows/e2e-cold-start.ymlsrc/main/services/binary/BinaryDownloader.tstests/unit/binary-downloader.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Cold start (windows)
- GitHub Check: Cold start (macos-arm64)
- GitHub Check: Cold start (linux)
- GitHub Check: Build Windows installer
- GitHub Check: check
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Favor strict typing, exhaustive checks, and discriminated unions. Useanyandunknownas escape hatches only — if you reach for one, justify it.
Use type inference from Zod schemas: definez.enum([...])→type Foo = z.infer<…>→const FOOS = fooSchema.optionsinstead of redeclaring as TypeScript union literals.
Files:
tests/unit/binary-downloader.test.tssrc/main/services/binary/BinaryDownloader.ts
tests/unit/**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Pure helpers with no I/O must live in their own module with a fixture-driven test alongside. Pattern:
tests/fixtures/yt-dlp-stderr/<kind>/*.txt+tests/unit/yt-dlp-errors.test.ts.
Files:
tests/unit/binary-downloader.test.ts
tests/**/*.test.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
When adding idempotent IPC registration (
ipcMain.removeHandler(),autoUpdater.removeAllListeners()), add the method asvi.fn()to matchingvi.mock('electron')blocks — otherwise tests fail at module-load.
Files:
tests/unit/binary-downloader.test.ts
tests/**
⚙️ CodeRabbit configuration file
Prioritize meaningful coverage, determinism, and whether tests validate behavior. Do not nitpick formatting or implementation style unless it makes the test unreliable.
Files:
tests/unit/binary-downloader.test.ts
.github/workflows/**
⚙️ CodeRabbit configuration file
Review GitHub Actions for least-privilege permissions, unsafe secret exposure, untrusted PR execution, shell quoting, release/tag correctness, artifact handling, and whether commands can fail silently.
Files:
.github/workflows/e2e-cold-start.yml
src/main/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/main/**/*.ts: Two-phase subtitle download: (1) video+audio with--no-write-subs --no-write-auto-subs; (2) subs only if phase 1 succeeds andsubtitleLanguagesnon-empty with--skip-download --write-subs --sub-langs <langs>. Phase 2 failure is soft.
Filterautomatic_captionsto-origkeys only (actual cached auto-captions) viaFormatProbeService.sanitizeSubtitleMap()to avoid hitting rate limits on live-translation-request keys.
Container format is NOT a subtitle concern:subtitleMode === 'embed'passes--merge-output-format mkv; sidecar/subfolder pass nothing.
Useprocess.resourcesPath/ffmpeg(.exe)in prod for embedded binaries,build/embedded/<host>/ffmpeg(.exe)in dev. Branch onapp.isPackaged.
On Linux, injectLD_LIBRARY_PATH=<dir>at spawn time for BtbN ffmpeg to locate shared library siblings (libav*.so.*). No rpath patching needed.
Files:
src/main/services/binary/BinaryDownloader.ts
src/{shared,main,renderer}/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
New shared modules go under
src/shared/so renderer + main both import without IPC. Modules with electron/node-only deps stay insrc/main/services/orsrc/renderer/...and surface their seam via re-exports of pure helpers.
Files:
src/main/services/binary/BinaryDownloader.ts
src/{main,renderer}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Emit
updater:availablewith{ version, currentVersion, installChannel }IPC payload 5s after launch. Renderer shows<UpdateBanner>between title bar and content; per-platform UX fromresolveAction(channel, platform).
Files:
src/main/services/binary/BinaryDownloader.ts
src/main/**
⚙️ CodeRabbit configuration file
This is Electron main-process code. Prioritize security, IPC boundaries, filesystem access, updater/download behavior, child process usage, path handling, and validation of renderer-provided input.
Files:
src/main/services/binary/BinaryDownloader.ts
🪛 ast-grep (0.43.0)
tests/unit/binary-downloader.test.ts
[info] 8-8: Make sure your server uses the https protocol
Context: http.createServer(handler)
Note: Security best practice.
(https-protocol-missing-typescript)
🔇 Additional comments (5)
.coderabbit.yaml (1)
4-5: LGTM!.gitattributes (1)
1-5: LGTM!.github/workflows/e2e-cold-start.yml (1)
114-114: LGTM!src/main/services/binary/BinaryDownloader.ts (1)
105-294: LGTM!tests/unit/binary-downloader.test.ts (1)
8-23: LGTM!
Summary
ytdlp-errorsmissingDependencyi18n key across catalogs and runtime locale JSONmsgmergeand Windowstaskkillunder Knip 6.16Validation
bun outdatedbunx vitest run --project node tests/unit/clean-url.test.ts tests/unit/i18n-contract.test.ts tests/unit/schemas.test.tsbun run checkbun run buildbun run dist:linux:dirELECTRON_DISABLE_SANDBOX=1 bunx electron --versionUser-Facing Changes
Internal / Refactor Changes
@tanstack/react-virtual,@url-sanitize/*, electron-updater, i18next, react/react-dom, shadcn; dev: electron, electron-builder, knip 6.16.x,@types/node,@types/react, concurrently, oxlint). Removed@types/extract-zip. overrides["@types/react"] 19.2.15 → 19.2.17.Risk Areas
Tests / Checks to Run
@types/reactoverride.