Skip to content

fix: never write a comment into files that cannot carry one; force-only Markdown headers - #124

Merged
Shinrai merged 1 commit into
nextfrom
fix/non-js-file-headers
Oct 4, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/non-js-file-headers

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • fix: never write a comment into files that cannot carry one; force-only Markdown headers (082977f)

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

…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
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure type: documentation Relates to docs, README updates, guides, or inline code comments labels 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
Shinrai merged commit 2294bce into next Oct 4, 2026
31 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/non-js-file-headers branch October 4, 2026 01:05
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant