Skip to content

fix: do not run lunaria when making a merge commit#1440

Merged
danielroe merged 4 commits intonpmx-dev:mainfrom
alexdln:fix/allow-bypass-verify-on-merge
Feb 12, 2026
Merged

fix: do not run lunaria when making a merge commit#1440
danielroe merged 4 commits intonpmx-dev:mainfrom
alexdln:fix/allow-bypass-verify-on-merge

Conversation

@alexdln
Copy link
Copy Markdown
Member

@alexdln alexdln commented Feb 12, 2026

I noticed during a meeting that when resolving merge-conflicts with --continue, Lunaria crashes (it often can't find the file combination for large changes). But when using --continue - you can't use --no-verify to bypass it.

I've added an option to bypass it via an env variable (NO_VERIFY=1) until we figure it out better

NO_VERIFY=1 git merge --continue

or something similar if passing variables is not supported in the system/terminal

cross-env NO_VERIFY=1 git merge --continue

@ghostdevv fyi

image

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 12, 2026 11:18pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 12, 2026 11:18pm
npmx-lunaria Ignored Ignored Feb 12, 2026 11:18pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The lunaria.ts file has been modified to include a runtime guard that prevents the lunaria build from executing during a Git merge operation. The implementation imports existsSync from the fs module and checks for the presence of a .git/MERGE_HEAD file. When a merge is detected, the build process logs a message and exits with code 0. The remainder of the build workflow, including JSON file preparation, lunaria creation, and HTML/status generation, remains structurally unchanged.

🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ⚠️ Unable to check for merge conflicts: Failed to fetch base branch: From https://github.com/npmx-dev/npmx.dev
! [rejected] main -> main (non-fast-forward)
+ 11c33f2...0475e6f main -> origin/main (forced update)
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly relates to the changeset. It explains the issue (Lunaria crashes during merge conflict resolution) and describes the implemented solution (adding a guard to skip Lunaria when a Git merge is in progress).

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch fix/allow-bypass-verify-on-merge
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


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

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe
Copy link
Copy Markdown
Member

I've found that running git commit --no-verify works fine to complete a merge if you encounter this.

@alexdln
Copy link
Copy Markdown
Member Author

alexdln commented Feb 12, 2026

Yes, but some people strongly prefer --continue (it seems like a better option)

@ghostdevv
Copy link
Copy Markdown
Contributor

Yes, but some people strongly prefer --continue (it seems like a better option)

yea it works, it'd just be nice if the hooks wouldn't break in that case since I think merge is "more correct" (and certainly easier)

Comment thread package.json Outdated
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
"pre-commit": "[ -n \"$NO_VERIFY\" ] && exit 0\nnpx lint-staged"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any worry about this potentially not working on Windows? I don't have a windows machine to test it unfortunately

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Windows, everything works 😅

It is standard POSIX shell, should work properly on all systems

@danielroe
Copy link
Copy Markdown
Member

passing an env variable seems like just as much work. in honesty, what if we update lunaria not to break in this case? we could detect if we're in the middle of a merge commit, and bail? 💡

@danielroe
Copy link
Copy Markdown
Member

pushing something

@danielroe
Copy link
Copy Markdown
Member

wdyt?

@danielroe danielroe changed the title fix: allow no-verify on merge --continue fix: do not run lunaria when making a merge commit Feb 12, 2026
@danielroe danielroe requested a review from ghostdevv February 12, 2026 23:17
@alexdln
Copy link
Copy Markdown
Member Author

alexdln commented Feb 12, 2026

Perfect

@danielroe danielroe merged commit 323bb30 into npmx-dev:main Feb 12, 2026
18 checks passed
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.

3 participants