Atualizar ambiente, aprimorar hooks e scripts - #48
Merged
Merged
Conversation
Add customizable storage in auth hook
Contributor
|
@matbrgz is attempting to deploy a commit to the H3rmel Team on Vercel. A member of the Team first needs to authorize it. |
h3rmel
self-requested a review
June 12, 2025 14:32
h3rmel
approved these changes
Jun 27, 2025
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.
🎯 Objetivo
Consolidar diversas melhorias ao projeto, incluindo:
Requisitos de ambiente: passar a exigir Node.js ≥18 e pnpm ≥9.15.3;
Fluxo de contribuições: atualizar
CONTRIBUTING.mdeREADME.mdcom as novas instruções de setup;Qualidade de código: adicionar Husky + Commitlint + lint-staged para pré-commits e mensagens;
CLI: reforçar checagem de versão de Node e pnpm em
guara-cli;Hooks:
useAxios: novos métodos para configurar cabeçalhos, baseURL, timeout, interceptors e cancelamento de requisição;useBetterAuth: novo hook para fluxo de autenticação completo (login, logout, refresh, updateUser);useFetch,useCookie,useLocalStorage,useSessionStorage,useNotifications,useNextAuth, etc.);Registry:
__registry__/index.tsxe emscripts/build-registry.mts;types/docs.d.ts,types/lucide-react.d.ts,types/unist.d.ts);Scripts de validação: criar
scripts/check-node.mjsescripts/check-pnpm.mjspara verificar versões mínimas;Dependências: bump de versões em
package.jsone lockfile.📝 Descrição das principais alterações
Ambientação
.nvmrccom18e.npmrccomengine-strict=true.preinstallempackage.jsonpara rodarcheck-nodeecheck-pnpm.CONTRIBUTING.md,README.md,content/docs/**) agora instruem uso de Node.js 18+ e pnpm 9.15.3+.Ferramentas de qualidade
pre-commit(lint-staged) ecommit-msg(commitlint).package.jsonpara só-allow-pnpm viapnpm dlx only-allow pnpm.Melhorias na CLI (
packages/cli)nvm install/nvm use.packages/cli.Aprimoramento dos Hooks
useAxios: suporte asetHeaders,resetHeaders,setBaseURL,resetBaseURL,setTimeout,resetTimeout,setConfig,resetConfig,setInterceptors,resetInterceptors,cancelRequest,resetError,resetData.useBetterAuth: novo hook genérico para gerenciar token, usuário, login, logout, refresh, interceptor automático e persistência em storage customizável.useFetch,useCookie,useLocalStorage,useSessionStorage,useNotificationseuseNextAuth, para garantir inferência correta deTData,TBodye opções.Registro de Hooks (Registry)
__registry__/index.tsxe scriptbuild-registrypara indexar corretamenteRegistryItem.types/docs.d.ts,types/lucide-react.d.ts,types/unist.d.ts.Scripts utilitários
scripts/check-node.mjsescripts/check-pnpm.mjspara checar versões mínimas de ambiente antes de instalar.Dependências
@commitlint/cli,@commitlint/config-conventional,prettier-plugin-tailwindcss, entre outras;better-auth,formik,motion,next-auth,posthog-js, etc.pnpm-lock.yamlcom 23 adições e 5 deleções correspondentes).pnpm installpara atualizar o lockfile e garantir que o ambiente local respeite o Node 18+ e pnpm 9.15.3+.