Skip to content

Updated Handlebars to v4.7.9#27081

Merged
kevinansfield merged 1 commit intomainfrom
codex/handlebars-dependency-update
Apr 2, 2026
Merged

Updated Handlebars to v4.7.9#27081
kevinansfield merged 1 commit intomainfrom
codex/handlebars-dependency-update

Conversation

@kevinansfield
Copy link
Copy Markdown
Member

@kevinansfield kevinansfield commented Apr 2, 2026

What

  • bump ghost/core's explicit handlebars dependency from 4.7.8 to 4.7.9
  • update the split helper and its unit test to use Ghost's frontend Handlebars runtime consistently when multiple handlebars copies are present

Why

Ghost core frontend helpers rely on SafeString constructor identity. If one helper creates SafeString values from a different handlebars module instance than another helper checks with instanceof, those values stop matching even though they look identical. Using the shared frontend Handlebars runtime keeps helper behavior consistent across dependency layouts.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e9fd3d4c-0e11-4484-9f60-da44e59f5a8f

📥 Commits

Reviewing files that changed from the base of the PR and between 35cbbbf and 4564c27.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • ghost/core/core/frontend/helpers/match.js
  • ghost/core/core/frontend/helpers/split.js
  • ghost/core/package.json
  • ghost/core/test/unit/frontend/helpers/split.test.js

Walkthrough

The changes standardize SafeString imports across helpers and tests in the frontend layer. Previously, some helpers and tests imported SafeString directly from the handlebars package. These changes update imports in the split helper and its test to use SafeString from a shared frontend runtime service instead. A clarifying comment was added to the match helper explaining this shared import approach. Additionally, the handlebars dependency in package.json was updated from version 4.7.8 to 4.7.9.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: updating Handlebars to v4.7.9, which is the primary modification across all files in the changeset.
Description check ✅ Passed The description clearly relates to the changeset, explaining both the version bump and the SafeString import updates to use the shared frontend Handlebars runtime for consistency.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 codex/handlebars-dependency-update

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

@kevinansfield kevinansfield force-pushed the codex/handlebars-dependency-update branch from d724b24 to ff452d9 Compare April 2, 2026 15:07
no issue
Ghost core uses SafeString instanceof checks in frontend helpers, so this update also aligns split with the shared frontend Handlebars runtime to avoid constructor mismatches when multiple handlebars copies are installed.
@kevinansfield kevinansfield force-pushed the codex/handlebars-dependency-update branch from ff452d9 to 4564c27 Compare April 2, 2026 15:19
@kevinansfield kevinansfield marked this pull request as ready for review April 2, 2026 15:20
@kevinansfield kevinansfield enabled auto-merge (squash) April 2, 2026 15:20
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.20%. Comparing base (6132ee0) to head (4564c27).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #27081   +/-   ##
=======================================
  Coverage   73.19%   73.20%           
=======================================
  Files        1531     1531           
  Lines      121796   121796           
  Branches    14695    14698    +3     
=======================================
+ Hits        89154    89164   +10     
+ Misses      31625    31615   -10     
  Partials     1017     1017           
Flag Coverage Δ
admin-tests 54.38% <ø> (ø)
e2e-tests 73.20% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@kevinansfield kevinansfield merged commit 93f5831 into main Apr 2, 2026
75 of 77 checks passed
@kevinansfield kevinansfield deleted the codex/handlebars-dependency-update branch April 2, 2026 15:55
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