Skip to content

release: v2.5.1 - build dist/ one file per module instead of bundling - #207

Merged
cldmv-bot[bot] merged 5 commits into
masterfrom
next
Nov 26, 2026
Merged

cldmv-bot[bot] merged 5 commits into
masterfrom
next

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

@cldmv/fix-headers v2.5.1 Changelog

Release Date: November 2026
Release Type: Patch
Branch: release/2.5.1


Overview

The published package is no longer bundled. dist/ mirrors src/ one file per module, and the CLI imports the library from those files instead of carrying a second copy of it. The library's behaviour, options and CLI flags are unchanged.


🐛 Bug Fixes

dist/ is built one file per module (#206)

The tsup build bundled the library into dist/index.mjs and a second full copy into bin/fix-headers.mjs. scripts/build.mjs now minifies each src/**/*.mjs in place into the same path under dist/ with esbuild (bundle: false), with its imports left as they are. dist/index.cjs is still the small CommonJS wrapper copied verbatim from src/index.cjs.

The package's bin now points at dist/cli.mjs, which imports ./index.mjs, and the bin/ folder is no longer published. The fix-headers command works as before; only a script that ran node_modules/@cldmv/fix-headers/bin/fix-headers.mjs by path needs to call dist/cli.mjs (or the fix-headers command) instead.

Fixes #205.

📚 Documentation

🔧 Dependencies

  • tsup removed from devDependencies; the build uses esbuild directly (#206).

Upgrade notes

  • No API or option changes. Call the CLI through the fix-headers command rather than the old bin/fix-headers.mjs path.
👥 Contributors

coverage

Metric Coverage
Statements 99.9%
Branches 98.9%
Functions 100.0%
Lines 99.9%

Avg: 99.6% · 053dd24 · Node lts/*

Co-authored-by: Shinrai [email protected]

Shinrai and others added 3 commits November 25, 2026 19:45
The tsup build bundled the library into dist/index.mjs and a second full
copy into bin/fix-headers.mjs. scripts/build.mjs now minifies every
src/**/*.mjs into the same path under dist/ with esbuild (bundle: false),
so dist/ mirrors src/ and dist/cli.mjs imports the library from its
sibling files. The package "bin" points at dist/cli.mjs and bin/ is gone.
tsup is dropped.

Resolves #205
Builds dist/ with esbuild (bundle: false) so it mirrors src/ file for
file; the CLI is dist/cli.mjs and imports the library instead of
bundling its own copy. tsup and bin/ are gone.

Resolves #205
@cldmv-bot cldmv-bot Bot added ! release → master v4 flow: persistent next → master release PR (carries the next feature release) release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected labels Nov 26, 2026
@cldmv-bot

cldmv-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

🔒 Dependency Review

  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses
  • ✅ 0 denied package(s)
  • ✅ 0 package(s) with OpenSSF Scorecard score < 3

Full job summary

@cldmv-bot cldmv-bot Bot added area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files type: dependencies Relates to dependency updates, version bumps, or package management labels Nov 26, 2026
@cldmv-bot

cldmv-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Bundle size increased

File Raw Δ Raw Gzipped Δ Gzipped
dist/cli.mjs 10.7 kB +10.7 kB (+100.0%) ⚠️ 3.9 kB +3.9 kB
dist/config/load.mjs 3.0 kB +3.0 kB (+100.0%) ⚠️ 1.4 kB +1.4 kB
dist/constants.mjs 652 B +652 B (+100.0%) ⚠️ 443 B +443 B
dist/core/file-discovery.mjs 3.4 kB +3.4 kB (+100.0%) ⚠️ 1.6 kB +1.6 kB
dist/core/fix-headers.mjs 7.6 kB +7.6 kB (+100.0%) ⚠️ 3.0 kB +3.0 kB
dist/core/ignore-rules.mjs 2.6 kB +2.6 kB (+100.0%) ⚠️ 1.3 kB +1.3 kB
dist/detect/project.mjs 2.2 kB +2.2 kB (+100.0%) ⚠️ 1020 B +1020 B
dist/detectors/c.mjs 1.4 kB +1.4 kB (+100.0%) ⚠️ 850 B +850 B
dist/detectors/css.mjs 525 B +525 B (+100.0%) ⚠️ 382 B +382 B
dist/detectors/go.mjs 818 B +818 B (+100.0%) ⚠️ 527 B +527 B
dist/detectors/html.mjs 453 B +453 B (+100.0%) ⚠️ 335 B +335 B
dist/detectors/index.mjs 4.1 kB +4.1 kB (+100.0%) ⚠️ 1.5 kB +1.5 kB
dist/detectors/json.mjs 467 B +467 B (+100.0%) ⚠️ 343 B +343 B
dist/detectors/markdown.mjs 661 B +661 B (+100.0%) ⚠️ 441 B +441 B
dist/detectors/node.mjs 1.3 kB +1.3 kB (+100.0%) ⚠️ 754 B +754 B
dist/detectors/php.mjs 687 B +687 B (+100.0%) ⚠️ 478 B +478 B
dist/detectors/python.mjs 529 B +529 B (+100.0%) ⚠️ 402 B +402 B
dist/detectors/rust.mjs 539 B +539 B (+100.0%) ⚠️ 394 B +394 B
dist/detectors/top-lines.mjs 1.3 kB +1.3 kB (+100.0%) ⚠️ 762 B +762 B
dist/detectors/yaml.mjs 497 B +497 B (+100.0%) ⚠️ 364 B +364 B
dist/drivers/go.mjs 484 B +484 B (+100.0%) ⚠️ 360 B +360 B
dist/drivers/index.mjs 1.7 kB +1.7 kB (+100.0%) ⚠️ 929 B +929 B
dist/drivers/node.mjs 682 B +682 B (+100.0%) ⚠️ 447 B +447 B
dist/drivers/php.mjs 355 B +355 B (+100.0%) ⚠️ 268 B +268 B
dist/drivers/python.mjs 1.1 kB +1.1 kB (+100.0%) ⚠️ 574 B +574 B
dist/drivers/rust.mjs 329 B +329 B (+100.0%) ⚠️ 248 B +248 B
dist/drivers/shared.mjs 2.2 kB +2.2 kB (+100.0%) ⚠️ 1.1 kB +1.1 kB
dist/header/dates.mjs 3.1 kB +3.1 kB (+100.0%) ⚠️ 1.3 kB +1.3 kB
dist/header/fields.mjs 1.8 kB +1.8 kB (+100.0%) ⚠️ 894 B +894 B
dist/header/parser.mjs 7.0 kB +7.0 kB (+100.0%) ⚠️ 3.1 kB +3.1 kB
dist/header/syntax.mjs 1.0 kB +1.0 kB (+100.0%) ⚠️ 611 B +611 B
dist/header/template.mjs 1016 B +1016 B (+100.0%) ⚠️ 568 B +568 B
dist/index.cjs 1.7 kB −27 B (-1.5%) ✅ 996 B −16 B
dist/index.mjs 256 B −52.2 kB (-99.5%) ✅ 214 B −18.2 kB
dist/utils/diff.mjs 1.4 kB +1.4 kB (+100.0%) ⚠️ 805 B +805 B
dist/utils/fs.mjs 1.3 kB +1.3 kB (+100.0%) ⚠️ 729 B +729 B
dist/utils/git.mjs 3.2 kB +3.2 kB (+100.0%) ⚠️ 1.4 kB +1.4 kB
dist/utils/text.mjs 431 B +431 B (+100.0%) ⚠️ 298 B +298 B
dist/utils/time.mjs 2.5 kB +2.5 kB (+100.0%) ⚠️ 1.2 kB +1.2 kB
Total 75.1 kB +20.9 kB 35.9 kB +16.5 kB

📊 Generated by bundle-size. Brotli sizes also measured but omitted from the table for brevity.

@cldmv-bot cldmv-bot Bot added the type: documentation Relates to docs, README updates, guides, or inline code comments label Nov 26, 2026
@cldmv-bot
cldmv-bot Bot merged commit 647d7e6 into master Nov 26, 2026
38 checks passed
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 ! release → master v4 flow: persistent next → master release PR (carries the next feature release) release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files type: dependencies Relates to dependency updates, version bumps, or package management 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.

Stop bundling: ship dist/ as one file per module, CLI imports the library

1 participant