Skip to content

Removed unused options from labs Handlebars helper - #30323

Merged
EvanHahn merged 1 commit into
mainfrom
remove-unused-options-from-labs-fn
Aug 26, 2026
Merged

Removed unused options from labs Handlebars helper#30323
EvanHahn merged 1 commit into
mainfrom
remove-unused-options-from-labs-fn

Conversation

@EvanHahn

Copy link
Copy Markdown
Contributor

no ref

This change should have no user impact.

Four options were never used: errorMessage, errorContext, errorHelp, and async. We can remove them and simplify the function a bit.

no ref

This change should have no user impact.

Four options were never used: `errorMessage`, `errorContext`,
`errorHelp`, and `async`. We can remove them and simplify the function a
bit.
@nx-cloud

nx-cloud Bot commented Aug 26, 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 9cdd62d

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 22s View ↗
nx run ghost:test:integration ✅ Succeeded 3m 30s View ↗
nx run ghost:test:e2e ✅ Succeeded 3m 3s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 53s View ↗
nx run-many -t test:unit -p ghost ✅ Succeeded 33s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 21s View ↗
nx run-many -t lint -p ghost,ghost-monorepo ✅ Succeeded 21s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded 3s View ↗
nx run @tryghost/admin:build ✅ Succeeded 6s View ↗

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


☁️ Nx Cloud last updated this comment at 2026-08-26 14:47:12 UTC

@coderabbitai

coderabbitai Bot commented Aug 26, 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: QUIET

Plan: Pro Plus

Run ID: 86dc84d1-48d1-46c1-b111-169f96d354da

📥 Commits

Reviewing files that changed from the base of the PR and between 1f649bc and 9cdd62d.

📒 Files selected for processing (1)
  • ghost/core/core/shared/labs.js

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (12)
  • GitHub Check: Build E2E Public App Assets
  • GitHub Check: Acceptance tests (Node 22.23.1, mysql8)
  • GitHub Check: Legacy tests (Node 22.23.1, better-sqlite3)
  • GitHub Check: Build Docker Images
  • GitHub Check: Build Admin
  • GitHub Check: Check migration integrity
  • GitHub Check: Unit tests (Node 22.23.1)
  • GitHub Check: Acceptance tests (Node 22.23.1, better-sqlite3)
  • GitHub Check: Check app version bump
  • GitHub Check: Legacy tests (Node 22.23.1, mysql8)
  • GitHub Check: Lint
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (4)
New source files must be TypeScript: flag new JS files as a required change

⚙️ CodeRabbit configuration file

Files:

  • ghost/core/core/shared/labs.js
Prioritise concrete correctness, security, data-integrity, compatibility,

⚙️ CodeRabbit configuration file

Files:

  • ghost/core/core/shared/labs.js
New files are TypeScript: Fail if the PR adds a new .js/.jsx/.cjs/.mjs source file, unless it is: a DB

📄 CodeRabbit inference engine (Custom checks)

Files:

  • ghost/core/core/shared/labs.js
Always use `pnpm`, never npm or Yarn.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • ghost/core/core/shared/labs.js
🔇 Additional comments (1)
ghost/core/core/shared/labs.js (1)

112-112: LGTM!

Also applies to: 124-131, 146-146


Walkthrough

The enabledHelper contract no longer accepts custom error templates or an async option. Disabled-helper errors use the module-level standard message, context, and help templates. The helper now returns a synchronous Handlebars.SafeString without Promise wrapping.

Suggested reviewers: kevinansfield, 9larsons, erisds

Merge Risk: ⚪ Minimal · up to 9cdd6

This is a localized cleanup that removes unused options from the labs helper and is not expected to change user-facing behavior; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the removal of unused options from the Labs Handlebars helper.
Description check ✅ Passed The description accurately explains the removal of four unused options and the expected lack of 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.
Type-Safe Boundaries ✅ Passed PASS. The commit changes only ghost/core/core/shared/labs.js and removes optional error-template and async handling. It does not add a boundary-data read, Zod bypass, any, unchecked as, `@ts-noc…
New Files Are Typescript ✅ Passed The PR changes only ghost/core/core/shared/labs.js, and the diff status is M (modified), not added. The file exists in the parent revision, and the PR adds no .js, .jsx, .cjs, or .mjs sour…
Full details: Type-Safe Boundaries

Explanation

PASS. The commit changes only ghost/core/core/shared/labs.js and removes optional error-template and async handling. It does not add a boundary-data read, Zod bypass, any, unchecked as, @ts-nocheck, or @ts-ignore. The only production caller passes an internal options object, and the custom check excludes internal module calls from runtime-validation requirements. Existing reads from options remain unchanged.

Full details: New Files Are Typescript

Explanation

The PR changes only ghost/core/core/shared/labs.js, and the diff status is M (modified), not added. The file exists in the parent revision, and the PR adds no .js, .jsx, .cjs, or .mjs source file. The custom check does not fail for modified pre-existing JavaScript files.

✨ 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 remove-unused-options-from-labs-fn

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

@EvanHahn
EvanHahn enabled auto-merge (squash) August 26, 2026 14:41
@codecov

codecov Bot commented Aug 26, 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.67%. Comparing base (1f649bc) to head (9cdd62d).

Files with missing lines Patch % Lines
ghost/core/core/shared/labs.js 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #30323      +/-   ##
==========================================
+ Coverage   75.64%   75.67%   +0.03%     
==========================================
  Files        1650     1650              
  Lines      156785   156777       -8     
  Branches    19055    19066      +11     
==========================================
+ Hits       118596   118643      +47     
+ Misses      37210    37125      -85     
- Partials      979     1009      +30     
Flag Coverage Δ
e2e-tests 77.34% <25.00%> (+0.03%) ⬆️

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 merged commit 4bbfe93 into main Aug 26, 2026
55 checks passed
@EvanHahn
EvanHahn deleted the remove-unused-options-from-labs-fn branch August 26, 2026 14:49
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