Files
oh-my-pi/packages/coding-agent/test/utils
oldschoola 5e1bff6b2b fix(utils): CMakeLists.txt returns cmake instead of text in getLanguageFromPath
The .txt extension match was winning over the basename check in
getLanguageFromPath, returning 'text' instead of 'cmake' for
CMakeLists.txt. Reordered the function to check basename special-cases
first (mirroring detectLanguageId's structure), so CMakeLists.txt,
Dockerfile, .env., .emacs, and justfile all fire before the extension
lookup.

Rewrote tests to defend observable contracts (special filenames, case
handling, lookup ordering) instead of re-stating the EXTENSION_LANG
table. Added contract test pinning that CMakeLists.txt resolves to
'cmake' not 'text'.

Updated CHANGELOG: moved from ### Added (test-only) to ### Fixed
(bug fix).
2026-06-23 10:25:12 -07:00
..
2026-06-23 08:18:29 +02:00