Skip to content

Conversation

@lucianoedipo
Copy link
Member

📋 Descrição

Implementação da estratégia de reuso e padrões definida para o super workspace ANPD.

🎯 Objetivos

  • Migração para uso de bibliotecas compartilhadas (@anpdgovbr/shared-*)
  • Padronização de configurações (TypeScript, ESLint, Prettier)
  • Atualização de metadados e versionamento
  • Integração com stack híbrida (Git Submodules + PNPM Workspaces + Turborepo)

📦 Mudanças Principais

Dependências

  • Atualização para usar @anpdgovbr/shared-* packages
  • Migração de workspace:* protocol
  • Configuração de registry npm.anpd.gov.br

Configuração

  • Herança de tsconfig.base.json
  • Uso de eslint.config.mjs centralizado
  • Padronização de .prettierrc.json

Metadados

  • Atualização de author e contributors
  • Configuração de bugs/homepage/repository
  • Versionamento SemVer

🧪 Status dos Testes

  • ✅ Build local executado com sucesso
  • ✅ Lint executado
  • ✅ Typecheck OK

📚 Documentação Relacionada

🔗 PRs Relacionados

Parte da iniciativa de consolidação do super workspace ANPD.

Repos afetados:

  • anpdgovbr/backlog-dim
  • anpdgovbr/rbac
  • anpdgovbr/rh-profile-updater-app
  • anpdgovbr/shared-types
  • anpdgovbr/shared-ui

✅ Checklist

  • Código revisado
  • Build passa localmente
  • Testes passando
  • Documentação atualizada
  • CI/CD passa
  • Aprovação de 2+ revisores

… funcional, nível de senioridade, status de integração, tipo de unidade e tipo de vínculo
- Moved TipoUnidade type definitions to enums for better consistency and maintainability.
- Updated imports in departments.types.ts, departments.utils.ts, department.dto.ts, and job-titles.types.ts to use the new enum.
- Refactored utility functions to return enum values instead of string literals for TipoUnidade.
- Removed redundant TipoUnidade definitions from job-titles.types.ts and tipo-unidade.const.ts.
- Adjusted the enum values to use hyphens instead of underscores for COORDENACAO_GERAL and SECRETARIA_GERAL.
- Ensured type safety and consistency across the application by utilizing the new enum in all relevant files.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +4 to +8
export enum FamiliaFuncional {
GESTAO = "gestao",
ADMINISTRATIVO = "administrativo",
JURIDICO = "juridico",
CONTROLE_INTERNO = "controle_interno",

Choose a reason for hiding this comment

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

P1 Badge Preserve existing FamiliaFuncional literals

The new enum assigns CONTROLE_INTERNO the literal "controle_interno". Prior versions exposed this value as "controle-interno" and existing datasets and validation helpers still emit the hyphenated form. Changing the serialized value to use an underscore will cause isFamiliaFuncional/assertFamiliaFuncional to reject all previously valid data and break any consumer persisting the old string, yet the package version only bumps a patch. Unless a migration is performed across all downstream services, this literal needs to stay "controle-interno" to remain backward compatible.

Useful? React with 👍 / 👎.

Comment on lines +4 to +7
export enum NivelSenioridade {
DIRETOR = "diretor",
COORDENADOR_GERAL = "coordenador_geral",
COORDENADOR = "coordenador",

Choose a reason for hiding this comment

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

P1 Badge Keep NivelSenioridade values backward compatible

The enum now exposes COORDENADOR_GERAL with the serialized value "coordenador_geral", replacing the previously published literal "coordenador-geral". Any stored job records, JSON schemas, or code using the hyphenated string will now fail validation and coercion, but the change ships under a beta patch version. To avoid breaking consumers, the enum should keep the hyphenated literal and only adjust the property name if needed.

Useful? React with 👍 / 👎.

- Adicionar .turbo/ ao .gitignore
- Atualizar workflows CI para self-hosted runners (Node 22, PNPM 10)
- Atualizar .changeset/config.json

Relacionado: feat/reuso-padroes-mvp
@lucianoedipo lucianoedipo merged commit e5fecd5 into main Nov 12, 2025
3 of 5 checks passed
@lucianoedipo lucianoedipo deleted the feat/reuso-padroes-mvp branch November 12, 2025 13:07
@lucianoedipo lucianoedipo restored the feat/reuso-padroes-mvp branch November 15, 2025 18:20
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.

2 participants