refatoração: ajuste de caminhos de importação para uso de caminhos ab…#60
Conversation
|
|
There was a problem hiding this comment.
Pull request overview
This PR refactors imports across the Supabase infrastructure layer, domain repository interfaces, and transaction-related domain files to use the @/ absolute path alias instead of relative paths. It also extracts the inline Supabase mock used by repository tests into a shared Jest manual mock under __mocks__/supabase.client.ts, and updates a handful of package-lock.json entries from "dev": true to "devOptional": true.
Changes:
- Convert relative imports (
../...) to absolute@/...imports across Supabase auth service, repositories, domain interfaces, and transaction entity/value object. - Replace inline
jest.mock(..., factory)in account/category/transaction repository tests with a shared manual mock atsrc/infrastructure/repositories/supabase/__mocks__/supabase.client.ts. - Update several Babel-related package-lock entries from
devtodevOptional.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/infrastructure/services/supabase-auth.service.ts | Switch Supabase client import to @/ alias. |
| src/infrastructure/services/supabase-auth.service.test.ts | Use absolute imports and absolute path in jest.mock. |
| src/infrastructure/repositories/supabase/transaction/transaction.repository.ts | Use absolute import for Supabase client. |
| src/infrastructure/repositories/supabase/transaction/transaction.repository.test.ts | Replace inline mock factory with jest.mock referencing manual mock. |
| src/infrastructure/repositories/supabase/category/category.repository.ts | Use absolute import for Supabase client. |
| src/infrastructure/repositories/supabase/category/category.repository.test.ts | Use absolute imports and manual mock. |
| src/infrastructure/repositories/supabase/account/account.repository.ts | Use absolute import for Supabase client. |
| src/infrastructure/repositories/supabase/account/account.repository.test.ts | Use absolute imports and manual mock. |
| src/infrastructure/repositories/supabase/mocks/supabase.client.ts | New shared Jest manual mock for the Supabase client. |
| src/domain/value-objects/transaction-summary.ts | Convert relative imports to absolute. |
| src/domain/value-objects/transaction-summary.test.ts | Convert domain imports to absolute. |
| src/domain/repositories/ITransactionRepository.ts | Convert Transaction import to absolute. |
| src/domain/repositories/ICategoryRepository.ts | Convert Category import to absolute. |
| src/domain/repositories/IAccountRepository.ts | Convert Account import to absolute. |
| src/domain/entities/transaction/transaction.ts | Convert all relative imports (including sibling props) to absolute. |
| package-lock.json | Change several Babel-related entries from dev to devOptional. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.





…solutos