Skip to content

Switched to ES Modules for automations API exports#28239

Merged
EvanHahn merged 1 commit into
mainfrom
update-exports-for-automations-api
May 28, 2026
Merged

Switched to ES Modules for automations API exports#28239
EvanHahn merged 1 commit into
mainfrom
update-exports-for-automations-api

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

towards https://linear.app/ghost/issue/NY-1286
ref #28120

We can use export foo instead of module.exports.

This change should have no user impact, but makes an upcoming change easier.

towards https://linear.app/ghost/issue/NY-1286
ref #28120

We can use `export foo` instead of `module.exports`.

This change should have no user impact, but makes an upcoming change
easier.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

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

Run ID: cff34021-fa37-47a4-8795-497c717c2e53

📥 Commits

Reviewing files that changed from the base of the PR and between 2c6439e and 4dcbb64.

📒 Files selected for processing (1)
  • ghost/core/core/server/services/automations/automations-api.ts

Walkthrough

This pull request converts the automations-api service module from CommonJS to ES module syntax. Five functions (browse, read, edit, requestPoll, and _resetTestDatabase) are converted from unexported functions included in a module.exports object to named exports via the export keyword. The CommonJS module.exports statement is removed. No function logic or behavior is changed.

Possibly related PRs

  • TryGhost/Ghost#27857: Implements the server-side functionality for automations edit operations that depend on the ES module exports of edit and requestPoll from this module migration.

Suggested reviewers

  • troyciesco
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: converting the automations API module from CommonJS exports to ES module named exports.
Description check ✅ Passed The description is related to the changeset, explaining the conversion from CommonJS to ES modules and its purpose, though it lacks implementation details.
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.

✏️ 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 update-exports-for-automations-api

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 and usage tips.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@EvanHahn EvanHahn merged commit 9b65184 into main May 28, 2026
49 checks passed
@EvanHahn EvanHahn deleted the update-exports-for-automations-api branch May 28, 2026 21:03
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