Home

>

Tools

>

Ghost

>

Releases

>

4.45.0

Ghost Release: 4.45.0

Tag Name: v4.45.0

Release Date: 4/22/2022

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost 4.45.0 drops support for Node.js 12 (which reaches EOL on April 30) and fixes SQLite build issues by switching back to the now-maintained sqlite3 package. This release also includes significant improvements to newsletter subscription handling, offer tracking in subscriptions, and API version mismatch notifications. New features include a publishing flow labs flag and newsletter read permission.

Highlight of the Release

    • Dropped support for Node.js 12 (EOL on April 30)
    • Fixed SQLite build issues by switching back to the maintained sqlite3 package
    • Updated default newsletter subscription logic for members
    • Added tracking of offer IDs in subscriptions
    • Added newsletter read permission and endpoint
    • Implemented API version mismatch handling with email notifications
    • Added publishingFlow labs flag for testing publishing flow improvements

Migration Guide

Node.js 12 Support Dropped

Ghost 4.45.0 has dropped support for Node.js 12, which reaches end-of-life on April 30, 2022. To upgrade:

  1. Check your current Node.js version: node --version
  2. If running Node.js 12 or below, upgrade to Node.js 14 or later
  3. For managed hosting, check with your provider about their Node.js version support
  4. For self-hosted installations, update your Node.js version before upgrading Ghost

SQLite Changes

If you were experiencing SQLite build issues:

  1. The switch back to the maintained sqlite3 package should resolve most common build problems
  2. No action is required on your part beyond the normal upgrade process
  3. If you had implemented workarounds for SQLite build issues, they may no longer be necessary

API Version Compatibility

With the new version mismatch handling:

  1. Site owners and admins will now receive email notifications about API version mismatches
  2. No configuration is required as this feature is enabled by default
  3. The system will avoid sending duplicate notifications for the same version mismatch

Upgrade Recommendations

This release is recommended for all users, especially those running on Node.js 12 who need to upgrade their Node.js version before April 30, 2022.

Priority: Medium-High

  • Node.js users: If you're running Node.js 12, upgrading is critical as support has been dropped
  • Self-hosted users: This release fixes common SQLite build issues, making installation and upgrades smoother
  • Newsletter users: The improved newsletter subscription logic and management features provide significant benefits

Upgrade Steps

  1. Backup your Ghost installation and database
  2. Ensure you're running Node.js 14 or later
  3. Follow the standard Ghost upgrade process:
    • For Ghost CLI: ghost update
    • For manual installations: Follow the upgrade guide
  4. Test your site functionality after upgrading

Bug Fixes

Fixed SQLite Build Issues

  • Switched back to the original sqlite3 package which is now maintained again by the Ghost team
  • Previously had to use @vscode/sqlite3 which didn't come with prebuilt binaries, causing installation problems
  • This change should resolve common build issues users were experiencing when installing Ghost

Test and Dependency Fixes

  • Fixed snapshot tests that were using hardcoded version headers
  • Fixed linting issues related to skipped tests
  • Fixed date-fns missing as a dependency declaration in @tryghost/nql-lang
  • Added status code assertions to version test suite
  • Updated dependency references to use commit hashes where needed for proper version tracking

New Features

Newsletter Improvements

  • Newsletter Read Permission: Added a new permission and endpoint to retrieve individual newsletters, making the newsletter resource more consistent with other resources.
  • Default Newsletter Subscription Logic: Updated how members are subscribed to newsletters by default, now taking into account newsletter preferences for auto opt-in (subscribe_on_signup) and visibility.
  • Portal UI Refinements: Improved newsletter selection in the Portal UI and removed archived newsletters from Portal settings.
  • Multiple Newsletters UI: Added a feature flag for multiple newsletters UI.

Offer Tracking

  • Stored Offer IDs in Subscriptions: Added tracking of which offer led to a subscription by storing the offer_id in the subscriptions table.
  • Migration for Backfilling Offer IDs: Added a migration to backfill offer IDs in existing subscriptions based on offer redemptions.
  • Updated Members API: Enhanced the members API to return subscription offers from the stored offer_id.

API Version Compatibility

  • Version Mismatch Handling: Implemented a system to detect and handle API version mismatches between clients and the Ghost server.
  • Email Notifications: Added functionality to notify site owners and admins about version mismatches.
  • Version Notifications Storage: Added a version_notifications key to the settings table to track which version mismatches have already been notified.

Other Features

  • Publishing Flow Labs Flag: Added a new labs flag for testing improvements to the publishing workflow in Admin.
  • Stats Service: Replaced the internal stats service with @tryghost/stats-service for improved analytics handling.

Security Updates

No significant security fixes were included in this release.

Performance Improvements

MRR History Calculation

  • Updated the calculation of MRR (Monthly Recurring Revenue) history to use the dedicated mrr column
  • This change improves the accuracy and performance of financial reporting

Database Optimizations

  • The migration to backfill offer IDs in subscriptions uses optimized queries
  • For MySQL, a single UPDATE query is used
  • For SQLite, the migration runs at most one UPDATE query per offer

Impact Summary

Ghost 4.45.0 brings important infrastructure updates by dropping Node.js 12 support and fixing SQLite build issues, making the platform more stable and easier to install. The release significantly enhances newsletter management with improved subscription logic and a new read permission endpoint, while also adding valuable offer tracking capabilities that connect subscriptions to the offers that generated them.

The new API version mismatch handling system improves the developer experience by providing clear notifications when client and server versions are incompatible. Site owners will appreciate the email notifications about version mismatches, helping them keep their Ghost installation and clients in sync.

For content creators, the experimental publishing flow available through the new labs flag offers a glimpse of upcoming improvements to the content creation process. The refinements to the Portal UI for newsletter selection also enhance the member experience.

Overall, this release combines important infrastructure maintenance with practical features that improve both the developer and user experience, particularly for sites using newsletters and membership features.

Full Release Notes

Statistics:

File Changed61
Line Additions1,223
Line Deletions1,335
Line Changes2,558
Total Commits41

User Affected:

  • Need to upgrade to Node.js 14+ as Node 12 support has been dropped
  • Will experience fewer SQLite build issues with the switch back to the maintained `sqlite3` package
  • Can utilize the new newsletter read permission endpoint
  • Will receive notifications about API version mismatches between client and server

Contributors:

daniellockyernazrshbhgrgrenovate-botErisDSSimonBackxtpatelkevinansfieldallouisrenovate[bot]