Repository navigation
fix: resolve ESM/CommonJS conflict in brainstorming server #774 - #784
Closed
sarbojitrana wants to merge 1 commit into
Closed
sarbojitrana wants to merge 1 commit into
sarbojitrana wants to merge 1 commit into
Conversation
Owner
|
Thanks @sarbojitrana! Clean fix — exactly the right approach. Cherry-picked your commit to the dev branch (preserving your authorship). Closing the PR since we applied it directly rather than merging. |
6 of 9 tasks
Fredma7c
added a commit
to Fredma7c/superpowers
that referenced
this pull request
Aug 16, 2026
Per-extension `eol=lf` rules only cover the extensions someone remembered to list. Every other text file falls back to git's platform default, which on Windows is CRLF on checkout — so a fresh Windows clone reports files as modified before anything has been touched, and `git diff --ignore-all-space` returns empty because the whole diff is line endings. 29 tracked files currently have no `eol=lf` rule: .txt (9), no extension (6, including LICENSE and .gitignore), .py (6), .yml (2), .yaml (2), .svg (1), .html (1), .cjs (1), .dot (1). The `.cjs` entry is the clearest illustration. Renaming `server.js` to `server.cjs` in 5.0.5 (obra#784) silently moved the brainstorm server out of `eol=lf` coverage, because the rules match extensions rather than intent. Adding `*.cjs` alone would fix that one instance and leave the next new file type to rediscover the same problem, so this sets `* text=auto eol=lf` as the default and keeps the explicit rules below it as documentation of which files specifically depend on LF. `text=auto` leaves git's binary detection in place, and the explicit `binary` markings for `*.png`, `*.jpg` and `*.gif` still take precedence. Existing checkouts pick this up with `git add --renormalize .` followed by a commit.
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #774
Resolves a runtime error in Node.js v25+ where the brainstorming server fails to start due to a module system mismatch.
Problem
The repository is configured with
"type": "module"(ESM), butserver.jsuses CommonJS (require).Node.js v25 enforces ESM strictly, resulting in:
Solution
server.js→server.cjsto explicitly use CommonJSstart-server.shto reference the new fileBefore the fix
After the fix