You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 fix: replace existsSync with async access() in ExtensionMetadataService
Replaced all sync fs operations (existsSync) with async alternatives using
fs/promises access(). This eliminates the last sync operations in the service.
Changes:
- Import access() and constants from fs/promises and fs
- Replace existsSync checks with try/catch on access()
- initialize(): Check directory existence with access() before mkdir
- load(): Check file existence with access() before readFile
Why ESLint didn't catch this:
- The 'local/no-sync-fs-methods' rule only catches fs.methodSync() usage
- Direct imports like 'import { existsSync } from "fs"' are not detected
- Rule needs enhancement to check ImportSpecifier nodes
Next steps:
- Enhance ESLint rule to catch direct imports of sync methods
- Or add src/utils/extensionMetadata.ts to allow list if sync is needed there
0 commit comments