fix: never write a comment into files that cannot carry one; force-only Markdown headers - #124
Merged
Merged
Conversation
…ly Markdown headers
A file is now given a header only when an enabled detector handles its
extension. Everything else is skipped and left unchanged, even when it is
named with --input or its extension is added through includeExtensions:
strict .json (a comment broke package.json with ERR_INVALID_PACKAGE_CONFIG),
files with no extension, extensions no enabled detector handles, and a
disabled detector's extensions. Before, all of these fell back to a JS
/** */ block.
Markdown gets a new force-only `markdown` detector (.md, .markdown). It is
used only when forced with --force-detector markdown (forcedDetectors:
["markdown"] in the API or a config file); naming a .md file with --input
does not force it. A forced header is an HTML comment placed below any YAML
front matter, and re-runs update it in place.
Skipped files are reported in the result's `skipped` ({ file, reason }) and
`filesSkipped`, not in filesScanned/changes; the CLI summary adds
`skipped=<n>` and prints a `skipped: <file> (<reason>)` line per file.
forcedDetectors rejects unknown ids and ids that do not need forcing.
The README gains a Supported file types table that matches the detectors,
and documents --force-detector / forcedDetectors.
Fixes #122
Fixes #120
This was referenced Oct 4, 2026
Shinrai
added a commit
that referenced
this pull request
Oct 4, 2026
The non-JS file, repeatable --input and dependency-folder fixes land in the same release as #117. Describe each fix, the reported skips, and the behaviour changes an existing setup could notice.
Shinrai
approved these changes
Oct 4, 2026
This was referenced Oct 4, 2026
Shinrai
added a commit
that referenced
this pull request
Oct 4, 2026
## 🚀 What's Changed ### 💥 Breaking Changes _No breaking changes_ ### ✨ Features _No new features_ ### 🐛 Bug Fixes - fix(discovery): never walk dependency folders, at any depth (#126) (adb3d7c) - fix(cli): process every --input value instead of only the last (#125) (be9b89b) - fix: never write a comment into files that cannot carry one; force-only Markdown headers (#124) (082977f) ### 📦 Dependencies _No dependency updates_ ### 🔧 Other Changes _No other changes_ <details> <summary>👥 Contributors</summary> - @Shinrai </details>
Shinrai
added a commit
that referenced
this pull request
Oct 4, 2026
…#121) ## 🚀 What's Changed ### 💥 Breaking Changes _No breaking changes_ ### ✨ Features _No new features_ ### 🐛 Bug Fixes - fix(discovery): never walk dependency folders, at any depth (#121) (adb3d7c) - fix(cli): process every --input value instead of only the last (#121) (be9b89b) - fix: never write a comment into files that cannot carry one; force-only Markdown headers (#121) (082977f) ### 📦 Dependencies _No dependency updates_ ### 🔧 Other Changes - docs: cover #124, #125 and #126 in the v2.1.4 notes and What's New (#121) (13c8859) - docs: add the v2.1.4 changelog and restructure the README (#121) (0358f40) - docs(changelog): backfill changelogs for v1.0.0–v1.3.12, v2.1.1 and v2.1.2 (#121) (caa7c1e) <details> <summary>👥 Contributors</summary> - @Shinrai </details>
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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors