Repository navigation
test: judge discovered paths from the workspace root, not the absolute path - #182
Merged
Merged
Conversation
…e path
The discovery test checked path.includes("dist/") on absolute paths, so it failed whenever the checkout itself sat under a folder whose name ends in dist. It now looks at each path's folders relative to the workspace. The include-folder walk never visits dist/, so a whole-project walk is added to actually exercise the dist exclusion.
cldmv-bot Bot
added a commit
that referenced
this pull request
Nov 15, 2026
# `@cldmv/fix-headers` v2.2.7 Changelog **Release Date**: November 2026 **Release Type**: Patch **Branch**: `release/2.2.7` --- ## Overview Version 2.2.7 changes how the package is tested, not what it does. Nothing under `src/` changed, so header handling, the `fixHeaders` API, the CLI and the published `dist/` behave exactly as in v2.2.6. The test suite now really runs against `src/` through the `fix-headers-dev` condition (the old config never passed it to the test workers), the same suite also runs against the built `dist/` with `npm run test:dist`, and one discovery test no longer fails when the checkout sits under a folder named `dist`. The rest is a `vitest` 5.1.0 bump and the `sync-release-notes` workflow. --- ## 🧪 Tests ### The `fix-headers-dev` condition reaches the test workers ([#179](#179)) The vitest config passed the condition through `test.nodeOptions`, which isn't a Vitest option, so the workers never got it. It now uses `devCondition()` from `@cldmv/configs`, which sets `resolve.conditions`, `ssr.resolve.conditions` and the workers' `execArgv` from the package's own `package.json`. ### `npm run test:dist` runs the suite against the build ([#181](#181)) The tests import the package by name (`@cldmv/fix-headers`) instead of `../src/index.mjs`. `npm run test:dist` builds the package and runs the suite with `--mode=dist`, which leaves the `fix-headers-dev` condition off, so those imports load `dist/`. A new `tests/resolve.test.vitest.mjs` checks that each run loaded the tree it meant to. `npm test` and `ci:coverage` now include the `dist/` run. ### Discovery test judges paths from the workspace root ([#182](#182)) The include/exclude discovery test checked `path.includes("dist/")` on absolute paths, so it failed whenever the checkout itself sat under a folder whose name ends in `dist`. It now looks at each path's folders relative to the workspace. Because the include-folder walk never visits `dist/`, the test also does a whole-project walk with only `excludeFolders`, so the `dist` exclusion is actually exercised. ## 🔧 CI & tooling - Added the v4 `sync-release-notes` workflow, which keeps GitHub Release pages in step with the files in `docs/changelog/` and reports draft releases and missing tags ([#187](#187)). ## 📚 Documentation - **NEW:** [docs/changelog/v2/v2.2.7.md](https://github.com/CLDMV/fix-headers/blob/v2.2.7/docs/changelog/v2/v2.2.7.md): this changelog. - README: the development requirements mention `npm test` (against `src/`) and `npm run test:dist` (against `dist/`) ([#181](#181)). - README What's New promoted to v2.2.7. ## 🔧 Dependencies Development only: - `vitest` and `@vitest/coverage-v8` 5.0.5 → 5.1.0 ([#183](#183)). - `@cldmv/configs` `^1.2.4` → `^1.4.0`, for `devCondition()` ([#179](#179)). --- ## Upgrade notes - No breaking changes; drop-in for v2.2.6. No library code changed, and header output is identical. <details> <summary>👥 Contributors</summary> - @Shinrai </details> --- <!-- coverage-start -->  | Metric | Coverage | |--------|----------| | Statements | 99.9% | | Branches | 98.8% | | Functions | 100.0% | | Lines | 99.9% | *Avg: **99.6%** · `13da7df` · 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.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
No bug fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
👥 Contributors