Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
After changing ctx: any to ctx: HookContext in helper functions, TypeScript errors occurred because HookContext.result is unknown, HookContext.ql is unknown, and HookContext.input/previous use Record<string, unknown>. Added minimal type casts at variable assignment points: - ctx.result → ctx.result as Record<string, any> - ctx.input?.doc || ctx.result → (...) as Record<string, any> - ctx.ql.find/doc.create/etc → (ctx.ql as any).find/doc.create/etc - ctx.previous.Field → (ctx.previous as Record<string, any>).Field Files fixed: quote.hook.ts, pricebook.hook.ts, product.hook.ts, opportunity.hook.ts, offer.hook.ts, performance_review.hook.ts, roi.hook.ts, knowledge.hook.ts, campaign.hook.ts, employee.hook.ts Reduces TypeScript errors from 300 to 1 (pre-existing unrelated error). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cord<string, any> in hook helper functions Update type annotations across 18 hook files: - ctx: any → ctx: HookContext in helper functions - campaign: any, employee: any, etc. → Record<string, any> for data record params - Keep db: any and ql: any as-is for non-HookContext parameters Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ROADMAP.md: fix last-updated date, add Phase 15 section, add version entry - CONTRIBUTING.md: add typecheck/ROADMAP to pre-submission checklist - DEVELOPMENT_WORKFLOW.md: update hook examples to use HookContext Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…ns, document workspace exclusions - CI workflow: add pnpm typecheck step - code-quality workflow: fix src/ → packages/ references, use typecheck instead of build - package.json: align @typescript-eslint/parser ^6.21.0 → ^7.18.0 with plugin - pnpm-workspace.yaml: add comment explaining core/server exclusion Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 19:54:41.517 Running build in Washington, D.C., USA (East) – iad1 (Turbo Build Machine) |
Regenerate lockfile to match @typescript-eslint/parser ^7.18.0 in package.json. Fixes Vercel build failure: ERR_PNPM_OUTDATED_LOCKFILE. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Fixed in |
There was a problem hiding this comment.
Pull request overview
This pull request addresses repository-wide quality improvements focused on CI/CD gaps, type safety in hook helpers, ESLint version alignment, and documentation accuracy. The changes systematically improve code quality and developer experience across multiple dimensions.
Changes:
- Added missing
pnpm typecheckstep to CI workflow and fixed code-quality.yml paths from non-existentsrc/to correctpackages/directory - Migrated 18 hook files from
ctx: anytoctx: HookContextin helper functions, improving type safety while maintaining compatibility with ObjectQL broker - Aligned
@typescript-eslint/parserversion from ^6.21.0 to ^7.18.0 to match@typescript-eslint/eslint-plugin^7.18.0, eliminating version mismatch
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Added TypeScript type checking step to CI pipeline |
.github/workflows/code-quality.yml |
Fixed all grep paths from src/ to packages/ and replaced build with typecheck |
package.json |
Bumped @typescript-eslint/parser from ^6.21.0 to ^7.18.0 for version alignment |
pnpm-lock.yaml |
Regenerated lockfile to reflect parser version upgrade and remove obsolete v6 dependencies |
pnpm-workspace.yaml |
Added explanatory comments for core/server package exclusions |
ROADMAP.md |
Updated header date, added Phase 15 tracking section, added version history entry |
DEVELOPMENT_WORKFLOW.md |
Updated hook example code to use HookContext instead of any |
CONTRIBUTING.md |
Added typecheck and ROADMAP update steps to pre-submission checklist |
| 18 hook files (crm, hr, marketing, products, support) | Changed helper function signatures from ctx: any to ctx: HookContext and data params to Record<string, any> |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Description
Addresses repository-wide quality improvements identified by a full codebase scan: CI gaps,
anytype proliferation in hook helpers, mismatched ESLint versions, stale docs, and broken workflow paths.Type of Change
Related Issues
Related to #221
Changes Made
CI/CD
pnpm typecheckstep toci.yml— was missing entirelycode-quality.yml: replace non-existentsrc/paths withpackages/, swappnpm buildforpnpm typecheckType Safety — Hook Helpers
ctx: any→ctx: HookContextin helper functions across 18 hook files (CRM, HR, Marketing, Products, Support)campaign: any,employee: anyetc. →Record<string, any>for data record paramsHookContextwas already imported in every file but unused in helpers:ESLint
@typescript-eslint/parser^6.21.0→^7.18.0to match@typescript-eslint/eslint-plugin^7.18.0pnpm-lock.yamlto reflect the parser version bump (fixes VercelERR_PNPM_OUTDATED_LOCKFILEbuild failure)Documentation
DEVELOPMENT_WORKFLOW.md: remove hardcoded "1,759 tests" count; update hook examples to useHookContextCONTRIBUTING.md: addpnpm typecheckand ROADMAP update to pre-submission checklistpnpm-workspace.yaml: document whycore/serverare excluded (tsconfig path aliases, not workspace protocol)ROADMAP.md: fix stale date, add Phase 15 tracking section, add version history entryTesting
pnpm test) — 192 files, 3,799 testsnpm run lint)npm run build)Screenshots
N/A
Checklist
Additional Notes
Pre-existing typecheck error (
@hotcrm/aimodule not found inenhanced_lead_scoring.action.ts) is unchanged and unrelated.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.