Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

### Changed
- Split documentation into its own npm workspace under `docs/`: VitePress dependencies and `docs:*` scripts moved out of the root `package.json` so the published npm package stays slim. CI workflows, release script and contributing docs updated for the new `cd docs && npm ci` workflow; `make docs/{install,dev,build,preview}` shortcuts added
- Guard root `package.json` against accidental regression of the docs-split: assert no `dependencies`/`devDependencies`/`peerDependencies`/`scripts` blocks ever return to the published manifest
- Centralize all ANSI escape emission through the existing `_BASHUNIT_COLOR_*` constants. `src/coverage.sh` and the `--watch` screen-clear in `src/main.sh` no longer hardcode escape sequences (#247)
- Speed up coverage report generation by collapsing the per-line non-executable pattern checks in `bashunit::coverage::is_executable_line` into a single combined `grep` invocation (#636)
- Speed up coverage report generation further by combining executable + hit counting into a single source-file pass (`bashunit::coverage::compute_file_coverage`) shared across text/lcov/html reporters, removing per-line `get_line_hits` scans of the coverage data file (#636)
Expand Down
14 changes: 14 additions & 0 deletions tests/unit/package_json_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ function test_package_json_excludes_docs_dependencies() {
assert_not_contains '"vue"' "$pkg"
}

function test_package_json_declares_no_dependencies_block() {
local pkg
pkg=$(cat "$PKG_FILE")
assert_not_matches '"dependencies"[[:space:]]*:' "$pkg"
assert_not_matches '"devDependencies"[[:space:]]*:' "$pkg"
assert_not_matches '"peerDependencies"[[:space:]]*:' "$pkg"
}

function test_package_json_declares_no_scripts_block() {
local pkg
pkg=$(cat "$PKG_FILE")
assert_not_matches '"scripts"[[:space:]]*:' "$pkg"
}

function test_docs_package_json_marked_private() {
local pkg
pkg=$(cat "$DOCS_PKG_FILE")
Expand Down
Loading