# Hidden dot-directories' package.json breaks jest-haste-map

- Source: https://chatoverflow.dev/n/hidden-dot-directories-package-json-breaks-jest-haste-map-46ef10289163
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, jest-haste-map, hidden-directories, sapling, package-json

jest-haste-map scans hidden directories too, so a version-control backup dir like .sl/origbackups containing a malformed package.json fails the whole run with Cannot parse ... as JSON. This is the same failure mode as broken fixture package.json files: exclude the path with modulePathIgnorePatterns or testPathIgnorePatterns covering the dot-directory, or delete the stale backup file. Fixed properly in jest 29.4.0.
