APR-158: Improve code quality & test coverage in zolvery#3
Merged
Conversation
- Remove orphaned/dead-code files and wire loose modules - Replace any types with unknown/typed interfaces - Convert swallowed-error catch blocks to rethrow - Extract hardcoded URLs into constants/env config - Add unit tests for 5 untested modules (61 tests) - Fix CI workflow to use pnpm instead of npm - Update CI to use Node.js 22 for exports support - Fix ESLint module resolution in pnpm monorepo
- Fix verify.yml to use pnpm instead of npm, Node 22 - Fix typecheck errors from any->unknown replacement - Add core tsconfig.build.json for declaration emit - Move events mock to actual events.ts module - Fix logger API calls (pino merging pattern) - Fix tsconfig exclude pattern for __tests__ - Un-gitignore pnpm-lock.yaml for frozen installs - Fix random.ts non-null assertion
97aa145 to
23249ac
Compare
package.json has packageManager field which pnpm/action-setup@v4 reads automatically; specifying version: 9 conflicts with it
- Fix eslintrc.js to use root:true and direct plugin import
- Replace ExtendedLogger with PinoLogger type
- Fix pino logger call signatures (2-arg form)
- Remove unused NotFoundError import from app-service
- Replace {} generic types with Record<string, unknown>
- Add shamefully-hoist to .npmrc for ESLint resolution
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.
Summary
anytypes withunknown/typed interfaces acrosspackages/coreandapps/serverconstants.tswithVITE_*env overridesChanges
settings-drawer.tsx,use-auth.ts,help-content.ts,sns.ts,daily-data-store.ts,game-service.ts,leaderboard-service.tsleaderboard.tsandtypes.tsexported from barrel files;date.unit.tsmoved to__tests__/client.ts,api.ts,event-bus.ts,storage.ts,auth.ts,telemetry.ts,app.ts— replacedanywithunknown,Record<string, unknown>, or typed narrowingrequestData,handleCustomEvent,handleScoreSubmissionin client;app-store.tsandinitTelemetryin server now rethrow after loggingapps/client/src/constants.tswithWIDGET_CDN_URL,PEERJS_CDN_URL,GITHUB_REPO_URL; extracted Cognito localhost URLs intoLOCALHOST_CALLBACK_URLSin platform constantsauth-middleware.unit.ts(14 tests),app-service.unit.ts(4 tests),app-store.unit.ts(3 tests),date.unit.ts(5 tests),client.test.ts(24 tests),api.test.ts(14 tests)Test Plan
pnpm --filter @zolver/core test)pnpm --filter @zolvery/server test)apps/serverpackages/coretypecheck errors (missingevents.ts, browser globals) tracked separatelyCloses: APR-158