Repository navigation
chore(main): migrate to scoped Google Drive API package - #493
Merged
Merged
Conversation
Contributor
Greptile SummaryThe PR replaces the broad
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| main/services/google-drive.ts | Migrates OAuth2 and Drive client construction to scoped package exports while preserving connection, backup, retention, and shutdown behavior. |
| package.json | Replaces the broad Google APIs dependency with the scoped Drive package. |
| package-lock.json | Locks the scoped Drive package and its transitive authentication dependencies while removing the broad package. |
| tests/google-drive.test.ts | Adds runtime API-contract checks and verifies refreshed access-token persistence retains the refresh token. |
Reviews (2): Last reviewed commit: "Merge branch 'main' into fm/flocafe-417-..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Review the scout worktree with git status and git log; return to a clean default-branch base, carry over only intended changes, create branch fm/flocafe-417-googleapis-scope-scout, implement the recommended @googleapis/drive migration from the report, preserve OAuth/token/Drive behavior and local restore boundaries, add offline API-contract and refresh-token regression coverage, measure packaged size, run the required checks, then append done: PR checks green after the no-mistakes run. The implementation decision is the official @googleapis/drive package rather than electron-builder filtering, with no direct google-auth-library dependency and no route/frontend/workflow changes.
What Changed
googleapiswith the scoped@googleapis/drivepackage while preserving OAuth, Drive backup, folder, retention, and token-refresh behavior.Risk Assessment
✅ Low: The focused migration preserves existing OAuth2 and Drive v3 call shapes, exports the required APIs, and removes only the direct all-APIs dependency and auth dependency.
Testing
The focused Electron test passed after dependency setup, exercising the @googleapis/drive runtime contract, refresh-token persistence, offline disconnect/local cleanup, encrypted token lifecycle, and shutdown boundaries. No UI artifact was applicable; temporary node_modules were removed and the worktree remained clean.
Evidence: Google Drive targeted evidence
@googleapis/drive API contract, refresh-token preservation, offline disconnect, encrypted token lifecycle, and shutdown checks all passed; exit_code=0.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm ci --ignore-scriptsnpm run test:google-drivenpm ls --depth=0 @googleapis/drive googleapis google-auth-librarygit diff --checkFinal worktree status and transient-install cleanup✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix: Lint and static analysis clean
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.