Skip to content

Removed @actions/core dependency#27265

Closed
ErisDS wants to merge 1 commit intomainfrom
remove-actions-core-dep
Closed

Removed @actions/core dependency#27265
ErisDS wants to merge 1 commit intomainfrom
remove-actions-core-dep

Conversation

@ErisDS
Copy link
Copy Markdown
Member

@ErisDS ErisDS commented Apr 9, 2026

Summary

  • Removed the @actions/core devDependency from both package.json and ghost/core/package.json
  • Replaced core.setOutput in .github/scripts/bump-version.js with a minimal helper that writes directly to $GITHUB_OUTPUT
  • Replaced core.warning in ghost/core/test/utils/mocha-retry-reporter.js with a helper that prints the ::warning file=,line=,col=::message workflow command (with proper escaping)

Why

Renovate PR #27161 attempted to bump @actions/core to v3, which broke the Ghost-CLI CI job:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in
/home/runner/work/Ghost/Ghost/node_modules/@actions/core/package.json

v3 dropped the CJS entry point that our two usages rely on via require(). Since both usages are trivial — one setOutput call and one warning call — it's simpler to emit the workflow commands directly and drop the dependency entirely than to pin the version or migrate to ESM. This also closes #27161.

Testing

  • node .github/scripts/bump-version.js canary emits the expected BUILD_VERSION/GIT_COMMIT_HASH outputs
  • mocha-retry-reporter.js loads cleanly
  • yarn install runs clean and @actions/core is no longer present in yarn.lock

- Renovate PR #27161 attempted to bump @actions/core to v3, which broke the Ghost-CLI CI job because v3 dropped the CJS entry point that our scripts rely on via `require()`
- the package was only used in two places (bump-version.js for setOutput and mocha-retry-reporter.js for warning annotations), both of which are trivial to replace with direct workflow command output
- removing the dependency entirely is simpler than pinning or migrating to ESM, and avoids future breakage from upstream changes
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 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: 5c3f42d7-9675-4c0d-b970-60c7a7b7e386

📥 Commits

Reviewing files that changed from the base of the PR and between 88964ff and 0fe9da4.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • .github/scripts/bump-version.js
  • ghost/core/package.json
  • ghost/core/test/utils/mocha-retry-reporter.js
  • package.json
💤 Files with no reviewable changes (2)
  • package.json
  • ghost/core/package.json

Walkthrough

The @actions/core dependency (version 1.11.1) is removed from package.json files. Its usage is replaced with local helper implementations: in .github/scripts/bump-version.js, a setOutput helper writes to the $GITHUB_OUTPUT file or falls back to stdout logging; in ghost/core/test/utils/mocha-retry-reporter.js, an issueWarning helper formats warnings as GitHub Actions workflow commands with proper character escaping. The core functionality remains unchanged; only the implementation mechanism and dependency management are modified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.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 'Removed @actions/core dependency' clearly and concisely summarizes the main change in the pull request.
Description check ✅ Passed The description provides detailed context about why the dependency was removed, what was changed, and testing verification.
Linked Issues check ✅ Passed The PR successfully addresses issue #27161 by removing @actions/core rather than upgrading it, resolving the ESM-only compatibility issue.
Out of Scope Changes check ✅ Passed All changes are directly scoped to removing @actions/core and implementing minimal replacements for its two usages.

✏️ 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 remove-actions-core-dep

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.45%. Comparing base (02ba4c3) to head (0fe9da4).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #27265   +/-   ##
=======================================
  Coverage   73.45%   73.45%           
=======================================
  Files        1545     1545           
  Lines      123645   123663   +18     
  Branches    14956    14959    +3     
=======================================
+ Hits        90822    90841   +19     
+ Misses      31824    31803   -21     
- Partials      999     1019   +20     
Flag Coverage Δ
admin-tests 54.39% <ø> (+0.02%) ⬆️
e2e-tests 73.45% <ø> (+<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.

@ErisDS
Copy link
Copy Markdown
Member Author

ErisDS commented Apr 9, 2026

More copy-pasta than anticipated. Closing in favour of #27272

@ErisDS ErisDS closed this Apr 9, 2026
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