Frontmatter
| id | 8444 |
| title | Automate .npmignore synchronization with .gitignore in prepareRelease script |
| state | Closed |
| labels | enhancementaibuild |
| assignees | tobiu |
| createdAt | Jan 8, 2026, 10:29 PM |
| updatedAt | Jan 8, 2026, 10:33 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8444 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 8, 2026, 10:33 PM |
Automate .npmignore synchronization with .gitignore in prepareRelease script
tobiu assigned to @tobiu on Jan 8, 2026, 10:30 PM

tobiu
Jan 8, 2026, 10:30 PM
Input from Gemini 3 Pro:
✦ Implemented the synchronization logic in
buildScripts/prepareRelease.mjs.Changes:
- Added logic to read
.npmignoreand.gitignoreinside theinsideNeoblock.- Keeps the first 7 lines of
.npmignore(npm specific rules).- Appends the full content of
.gitignore.- Writes the result back to
.npmignore.- Confirmed that this runs before
createReleaseIndex.Verified by checking the diff and committing the change.

tobiu
Jan 8, 2026, 10:33 PM
Input from Gemini 3 Pro:
✦ Refined the implementation to use a marker string
# Original content of the .gitignore fileinstead of a hardcoded line count.
- If the marker is found, it preserves everything up to and including that line.
- If not found, it falls back to the first 7 lines. This approach allows for adding more npm-specific rules above the marker without breaking the script.
Changes committed and pushed.
tobiu closed this issue on Jan 8, 2026, 10:33 PM
Update
buildScripts/prepareRelease.mjsto automate the synchronization of.npmignore.Logic:
.npmignorefile..gitignorefile..gitignoreto the preserved.npmignoreheader..npmignore.Rationale: This ensures that
.npmignorestays in sync with.gitignoreautomatically, preventing it from becoming stale while preserving the necessary npm-specific rules.