Skip to content

Added types for database connection object - #29891

Merged
EvanHahn merged 1 commit into
mainfrom
data-db-types
Aug 13, 2026
Merged

Added types for database connection object#29891
EvanHahn merged 1 commit into
mainfrom
data-db-types

Conversation

@EvanHahn

@EvanHahn EvanHahn commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

no ref

This change should have no user impact. It adds a type declaration for core/server/data/index.js.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c3da8af-3f63-4a1b-b991-06278408f33b

📥 Commits

Reviewing files that changed from the base of the PR and between 74eeda5 and d7d1c3b.

📒 Files selected for processing (3)
  • ghost/core/core/server/data/db/index.d.ts
  • ghost/core/core/server/services/email-analytics/index.ts
  • ghost/core/test/utils/automations-fixtures.ts
💤 Files with no reviewable changes (1)
  • ghost/core/test/utils/automations-fixtures.ts

Walkthrough

The database declaration now exports a typed knex instance using Knex’s Knex type. The email analytics service changes its database import to a namespace import. The automation fixture removes the TypeScript suppression for its database import.

Possibly related PRs

  • TryGhost/Ghost#29819: Updates the database import style in email-analytics/index.ts following module export changes.

Suggested reviewers: troyciesco

Mergeability Score: ⚪ Minimal · up to d7d1c

This is a localized typing and cleanup change with no identified user or production impact; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding types for the database connection object.
Description check ✅ Passed The description accurately states that the change adds a type declaration and has no user impact.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch data-db-types

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Aug 11, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit e398296

Command Status Duration Result
nx run ghost-monorepo:lint:boundaries ✅ Succeeded <1s View ↗
nx run-many -t lint -p ghost,ghost-monorepo ✅ Succeeded 1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-13 17:16:22 UTC

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.40%. Comparing base (74eeda5) to head (e398296).

Files with missing lines Patch % Lines
ghost/core/core/server/data/db/index.d.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29891   +/-   ##
=======================================
  Coverage   75.40%   75.40%           
=======================================
  Files        1608     1609    +1     
  Lines      142276   142278    +2     
  Branches    17607    17610    +3     
=======================================
+ Hits       107281   107284    +3     
+ Misses      33921    33920    -1     
  Partials     1074     1074           
Flag Coverage Δ
e2e-tests 77.45% <25.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@EvanHahn
EvanHahn force-pushed the data-db-types branch 2 times, most recently from 9d97584 to b4a63f8 Compare August 12, 2026 14:32
Base automatically changed from email-analytics-queries-di-and-tests to main August 13, 2026 16:27
no ref

This change should have no user impact.

It adds a type declaration for `core/server/data/index.js`, and also
fixes some small type errors that were present.
@github-actions

Copy link
Copy Markdown
Contributor

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 31723782190 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

@EvanHahn
EvanHahn merged commit aac8c2a into main Aug 13, 2026
121 of 137 checks passed
@EvanHahn
EvanHahn deleted the data-db-types branch August 13, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant