Skip to content

refatoração: ajuste de caminhos de importação para uso de caminhos ab…#60

Merged
LCapistrano25 merged 3 commits into
developerfrom
refact/absolute-path
May 29, 2026
Merged

refatoração: ajuste de caminhos de importação para uso de caminhos ab…#60
LCapistrano25 merged 3 commits into
developerfrom
refact/absolute-path

Conversation

@lucasfontinele

Copy link
Copy Markdown
Collaborator

…solutos

@LCapistrano25 LCapistrano25 self-requested a review May 29, 2026 21:38
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
77.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at src/infrastructure/repositories/supabase/__mocks__/supabase.client.ts.
  • Update several Babel-related package-lock entries from dev to devOptional.

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.

@LCapistrano25 LCapistrano25 merged commit 8a13762 into developer May 29, 2026
7 of 8 checks passed
@LCapistrano25 LCapistrano25 deleted the refact/absolute-path branch May 29, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants