fix: build libs in CI job, remove noPropertyAccessFromIndexSignature#7355
fix: build libs in CI job, remove noPropertyAccessFromIndexSignature#7355Danziger wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
CI job will now run typecheck on all projects, including libs, to avoid PRs checks from passing but a library publish step from failing shortly after.
Detailed list of changes:
Root scripts & Nx
package.json—typecheckscript is nownx run-many -t typecheck --all --parallel=4so CI and local runs typecheck all projects with atypechecktarget, not only the CowSwap app.nx.json—defaultBaseis set at the root;sync.disabledTaskSyncGeneratorsincludes@nx/js:typescript-syncto avoid conflicting auto-generated TS project sync.tsconfig.json(repo root) — added to avoid nx cli errors when running some commandsRemoved
noPropertyAccessFromIndexSignatureDropped from these
tsconfig.jsonfiles soprocess.env.NODE_ENVand similar can use dot access withoutTS4111, without maintaining per-libProcessEnvaugmentations (this is what broke the previous publish process run).libs/abis/tsconfig.jsonlibs/hook-dapp-lib/tsconfig.jsonlibs/permit-utils/tsconfig.jsonlibs/ui-utils/tsconfig.jsonlibs/wallet-provider/tsconfig.jsonlibs/widget-lib/tsconfig.jsonExplicit
typechecktargets inproject.jsonOverrides use
nx:run-commandswithtsc --noEmit -p …(or a no-op where noted) so inference does not rely solely ontsc --build --emitDeclarationOnlyin problematic graphs:apps/cowswap-frontendtsc --noEmit -p apps/cowswap-frontend/tsconfig.app.jsonapps/explorertsc --noEmit -p apps/explorer/tsconfig.app.jsonapps/widget-configuratortsc --noEmit -p apps/widget-configurator/tsconfig.app.jsonapps/cowswap-frontend-e2etsc --noEmit -p apps/cowswap-frontend-e2e/tsconfig.jsonlibs/uitsc --noEmit -p libs/ui/tsconfig.lib.jsonlibs/tokenstsc --noEmit -p libs/tokens/tsconfig.lib.jsonlibs/snackbarstsc --noEmit -p libs/snackbars/tsconfig.lib.jsonlibs/multicalltsc --noEmit -p libs/multicall/tsconfig.lib.json(seeviem/oxbelow)libs/balances-and-allowancestsc --noEmit -p libs/balances-and-allowances/tsconfig.lib.json(same)libs/walletcommand:true— intentional placeholder untilviem/oxupstream typing issues are addressedOther libraries still use the Nx
@nx/jsinferredtypecheckwhere appropriate (tsc --build --emitDeclarationOnly).viem/oxand multicall-style libsFor
libs/multicallandlibs/balances-and-allowances,tsconfig.lib.jsonsets:moduleResolution: "bundler"— resolvesox/viemthrough packageexportsto.d.ts, notnode_modules.tssources.outDir: "../../dist/out-tsc"— declaration output (when emitted) goes underdist/, not next tosrc/.Typecheck uses
tsc --noEmitso declaration maps do not pulloxsources into the check.outDiron librarytsconfig.lib.json(declaration emit)Libraries that enable
declaration: truenow setoutDir: "../../dist/out-tsc"(or../../dist/out-tsc/walletfor wallet) sotsc --build --emitDeclarationOnlydoes not write.d.tsbesidesrc/. Touched libs include (non-exhaustive):abis,analytics,assets,balances-and-allowances,common-const,common-hooks,common-utils,core,ens,multicall, etc..gitignore(safety net)Ignores accidental emit artifacts if someone runs
tscwithout the intended config:libs/**/src/**/*.d.tswith!libs/wallet/src/types.d.ts**/jest.config.d.ts**/tsconfig*.tsbuildinfoShared ambient types
types/cow-protocol-ambient.d.ts—declare modulefor@cowprotocol/assets/*,@cowprotocol/assets/fonts/*(nested font paths),*.svg,*.png.libs/wallet/src/types.d.ts—/// <reference path="../../../types/cow-protocol-ambient.d.ts" />plus existingWindow.ethereum/@metamask/jazzicondeclarations.libs/ui/tsconfig.lib.json— includes../../types/cow-protocol-ambient.d.tsinfilessolibs/uitsc --noEmitresolves font imports.To Test
The CI job in Github should now run typecheck on all projects.