Repository navigation
fix: typecheck import.meta.env cross-package + audit routing key - #12
Merged
Merged
Conversation
…2339) El ambient env.d.ts solo se cargaba al typechear cada paquete en solitario; al compilar shared-layout-react el *source* de estos paquetes vía workspace link, el ambient no entraba → TS2339 'env does not exist on ImportMeta'. Se añade una directiva /// <reference path='./env.d.ts' /> en los archivos que usan import.meta.env para que el ambient viaje con el source en cualquier programa tsc. Se conserva el literal import.meta.env (un cast envolvente rompía el stub de vitest, que reescribe ese token). env.d.ts se versiona (antes untracked).
…-dms) El test esperaba 'maya_dms.document.delete' pero el contrato es <application_slug>.<entity>.<action> con el slug verbatim; todas las apps pasan 'maya-dms' (guion) y el payload/consumidor de maya_audit lo guardan así (AmqpContractTest afirma applicationSlug='maya-dms'). El test venía mal desde el commit inicial (nunca pasó). Se corrige la expectativa a 'maya-dms.document.delete'.
…brary/react-query) CI usa pnpm --frozen-lockfile (aislamiento estricto): un paquete solo ve sus deps declaradas. shared-i18n-react, shared-layout-react y shared-profile-react typecheaban/ejecutaban tests que importan vitest, @testing-library/react, @tanstack/react-query o usan el entorno jsdom sin declararlos — en local el hoisting de pnpm lo ocultaba. Estos fallos estaban enmascarados por el fail-fast del typecheck. Verificado con reinstalación limpia: typecheck + test + build verdes.
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.
Resuelve los 2 checks de CI que estaban rojos (preexistentes desde antes de 0.16):
shared-realtime-reactyshared-sidebar-reactusanimport.meta.env; el ambientenv.d.tsno se cargaba al compilar su source desdeshared-layout-react(workspace link) → TS2339. Fix: directiva/// <reference path='./env.d.ts' />para que el ambient viaje con el archivo; se conserva el literalimport.meta.env(un cast rompía el stub de vitest). Se versionan losenv.d.ts(antes untracked).AuditPublisherTest > routing keyesperabamaya_dms(underscore) pero el contrato usa el slug verbatimmaya-dms; el test venía mal desde el commit inicial. Fix de la expectativa.Verificado local: typecheck workspace verde, 445+ tests JS verdes, AuditPublisherTest 5/5. Tras merge → release.yml v0.18.0.