Skip to content

Updated gx to use pretty-cli's shipped types - #32067

Merged
ErisDS merged 1 commit into
mainfrom
codex/gx-pretty-cli-declarations
Oct 19, 2026
Merged

ErisDS merged 1 commit into
mainfrom
codex/gx-pretty-cli-declarations

Conversation

@ErisDS

@ErisDS ErisDS commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

ref https://linear.app/ghost/issue/PLA-537/consolidate-repository-tooling-and-introduce-gx

Use the declarations shipped in pretty-cli 3.4.0 so gx no longer needs missing-type suppressions, local command types or manual parse-result assertions. Follows framework#1059.

Validation:

  • pnpm --filter @internal/gx test: strict typecheck and all 94 command tests passed, including services commands.
  • pnpm test:types: all 43 projects and their build dependencies passed.
  • gx lint, repository formatting and lint, and pnpm gx --help passed.
  • Both Admin acceptance cases that failed in CI passed in a focused Chromium run (2 passed, 43 filtered out).
  • Local full pnpm check failed on timeouts across several workspaces, including gx, and a Shade editor assertion. Isolated gx and App SDK reruns passed.

@nx-cloud

nx-cloud Bot commented Oct 19, 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 92ec8de

Command Status Duration Result
nx run @tryghost/admin:test:acceptance --shard=1/3 ✅ Succeeded 6m 18s View ↗
nx run ghost:test:integration ✅ Succeeded 1m 55s View ↗
nx run @tryghost/admin:test:acceptance --shard=2/3 ✅ Succeeded 5m 8s View ↗
nx run ghost:test:e2e ✅ Succeeded 3m 48s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 16s View ↗
nx run @tryghost/koenig-lexical:test:acceptance... ✅ Succeeded 2m 25s View ↗
nx run-many -t test:unit -p @internal/gx,@inter... ✅ Succeeded 40s View ↗
nx run ghost:test:ci:unit ✅ Succeeded 1s View ↗
Additional runs (16) ✅ Succeeded ... View ↗

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


☁️ Nx Cloud last updated this comment at 2026-10-19 15:20:15 UTC

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: TryGhost/Ghost/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Essentials
  • Run ID: ecccae73-800a-47ad-b70c-6e59fc238d6a
📥 Commits

Reviewing files that changed from the base of the PR and between 728c20f and 92ec8de.

⛔ Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 1
  • tools/gx/cli.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout: 10
  • GitHub Check: E2E Tests (Main 1/10)
  • GitHub Check: E2E Tests (Main 10/10)
  • GitHub Check: E2E Tests (Main 9/10)
  • GitHub Check: E2E Tests (Main 3/10)
  • GitHub Check: E2E Tests (Main 5/10)
  • GitHub Check: E2E Tests (Main 4/10)
  • GitHub Check: E2E Tests (Main 7/10)
  • GitHub Check: E2E Tests (Main 8/10)
  • GitHub Check: App Playwright Acceptance Tests (@tryghost/admin 1/3)
  • GitHub Check: Acceptance tests (Node 24.20.0, mysql8)
🧰 Additional context used
📓 Path-based instructions: 2
Review lens: "where does this data become trusted?" Boundary data (HTTP input, external API/SDK responses, env/config, DB/filesystem reads, queue/webhook/event payloads) is `unknown` until validated — Zod by default.

⚙️ CodeRabbit configuration file

Files:

  • tools/gx/cli.ts
Prioritise concrete correctness, security, data-integrity, compatibility, and regression risks.

⚙️ CodeRabbit configuration file

Files:

  • tools/gx/cli.ts
🧠 Learnings: 1
📓 Common learnings
Learnt from: CR
Repo: TryGhost/Ghost

Timestamp: 2026-10-19T15:21:04.261Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md
Start with:

- [Monorepo structure](docs/codebase/monorepo-structure.md)

AGENTS.md: # AGENTS.md
## Task routing and important warnings
- **Ghost Core:** use the [server map](docs/codebase/monorepo-structure.md#ghost-core)

Source excerpt:
# Monorepo structure

## Workspace dependencies

External dependency versions are managed in the catalog in
[`pnpm-workspace.yaml`](../../pnpm-workspace.yaml). Use `catalog:` in workspace
manifests rather than adding the same version in several packages.

Walkthrough

The workspace catalog updates @tryghost/pretty-cli from version 3.3.18 to 3.4.0. In tools/gx, the changes remove TypeScript suppressions, local command type aliases, and runtime assertions on the parsed result. Command-path parsing and subsequent exit-code and output handling remain.

Suggested reviewers: acburdine

Priority: ⬇️ Low

Change: Refactor

Merge Risk: ⚪ Minimal · up to 92ec8

The typing cleanup preserves gx command behavior and introduces no established merge-blocking risk.

Pre-merge checks: Passed 6
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: gx now uses types shipped by pretty-cli.
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.
Type-Safe Boundaries Passed PASS. The PR updates @tryghost/pretty-cli types and removes local aliases, suppressions, and manual assertions from tools/gx CLI scripts. It introduces no any, unchecked as, @ts-ignore, or `…
New Files Are Typescript Passed The pull request adds no files. The changed-file inventory contains only modifications to existing YAML, lockfile, and TypeScript files. Therefore, it does not add a new .js, .jsx, .cjs, or .mjs sourc…
Description check Passed The pull request description directly matches the changes. It explains the upgrade to pretty-cli 3.4.0 and the removal of type suppressions, local command types, and parse-result assertions.
Full details: Type-Safe Boundaries

Explanation

PASS. The PR updates @tryghost/pretty-cli types and removes local aliases, suppressions, and manual assertions from tools/gx CLI scripts. It introduces no any, unchecked as, @ts-ignore, or @ts-nocheck, and it does not duplicate a Zod-described shape. The check explicitly excludes scripts and config files.

Full details: New Files Are Typescript

Explanation

The pull request adds no files. The changed-file inventory contains only modifications to existing YAML, lockfile, and TypeScript files. Therefore, it does not add a new .js, .jsx, .cjs, or .mjs source file.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.25%. Comparing base (166037f) to head (92ec8de).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #32067      +/-   ##
==========================================
+ Coverage   84.99%   85.25%   +0.25%     
==========================================
  Files        1383     1383              
  Lines       52106    52106              
  Branches     8971     8971              
==========================================
+ Hits        44290    44423     +133     
+ Misses       6708     6582     -126     
+ Partials     1108     1101       -7     
Flag Coverage Δ
e2e-tests 72.41% <ø> (+0.02%) ⬆️
unit-tests 67.85% <ø> (+0.04%) ⬆️

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.

ref https://linear.app/ghost/issue/PLA-537/consolidate-repository-tooling-and-introduce-gx

Use the published declarations so gx no longer needs missing-type
suppressions or its own command and parse-result type workarounds.
@ErisDS
ErisDS force-pushed the codex/gx-pretty-cli-declarations branch from 728c20f to 92ec8de Compare October 19, 2026 15:12
@ErisDS
ErisDS merged commit 86bae89 into main Oct 19, 2026
69 checks passed
@ErisDS
ErisDS deleted the codex/gx-pretty-cli-declarations branch October 19, 2026 15:37
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