Skip to content

Conversation

@tomusdrw
Copy link
Member

Summary

The publish job failed because update_versions.js uses require, but the project is configured as an ES module, causing Node.js to throw a ReferenceError.

Changes

  • Renamed the inline script file from update_versions.js to update_versions.cjs in the cat command.
  • Updated the node execution command to run update_versions.cjs.

Testing

This forces Node.js to treat the script as CommonJS, allowing require to work correctly regardless of the package.json "type" field.

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

The GitHub Actions publish workflow's "Update versions" step is updated to use update_versions.cjs instead of update_versions.js, with the corresponding node invocation command adjusted accordingly.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
\.github/workflows/publish\.yml
Updated script filename from update_versions.js to update_versions.cjs and adjusted node execution command from node update_versions.js to node update_versions.cjs in the "Update versions" step.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: renaming the script file to use .cjs extension to fix the CI publish job.
Description check ✅ Passed The description is directly related to the changeset, explaining the root cause (ES module configuration issue), the specific changes made, and the intended testing/resolution.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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

@tomusdrw tomusdrw merged commit 173c341 into main Jan 20, 2026
4 checks passed
@tomusdrw tomusdrw deleted the fix-publish-esm branch January 20, 2026 21:15
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.

2 participants