Repository navigation
fix: build dist/ one file per module instead of bundling - #206
Merged
Merged
Conversation
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
Shinrai
approved these changes
Nov 26, 2026
This was referenced Nov 26, 2026
cldmv-bot Bot
added a commit
that referenced
this pull request
Nov 26, 2026
# `@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](#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](#205). ## 📚 Documentation - **NEW:** [docs/changelog/v2/v2.5.1.md](https://github.com/CLDMV/fix-headers/blob/v2.5.1/docs/changelog/v2/v2.5.1.md): this changelog. - README What's New promoted to v2.5.1. ## 🔧 Dependencies - `tsup` removed from devDependencies; the build uses `esbuild` directly ([#206](#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. <details> <summary>👥 Contributors</summary> - @Shinrai </details> --- <!-- coverage-start -->  | Metric | Coverage | |--------|----------| | Statements | 99.9% | | Branches | 98.9% | | Functions | 100.0% | | Lines | 99.9% | *Avg: **99.6%** · `053dd24` · Node lts/** <!-- coverage-end --> <!-- co-authors --> Co-authored-by: Shinrai <[email protected]>
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.
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