Repository navigation
v1.4.0
Upgrade: set rev: v1.4.0. Nothing else is needed.
Added
- The hook also runs on Tailscale's
.hujsonand.jwcc, VS Code's.code-workspaceand
.code-snippets,.webmanifestand.babelrcfiles: all JSON, some with comments.
Changed
- The hook checks JSON with only comments and trailing commas, such as
tsconfig.json, with the
C-speedjsonparser instead ofjson5. Whole hook runs are 11× faster on a 50 KB file and
56× faster on a 2 MB one. Files that use more of JSON5 still go throughjson5. - A number may have up to 1,000,000 digits. 1.3.0 lifted Python's limit of 4300 altogether,
which let one file with a huge number stall a run. A longer number now fails its file with a
message.
Fixed
- A JSON5 file with comments and an unescaped U+2028 or U+2029 inside a string now passes, as
the JSON5 spec allows. Thejson5package rejected it; strict JSON files already passed. - A file with a duplicate key and an undecodable string after it crashed the run with a
traceback and left the remaining files unchecked. It now reports the duplicate. - A newline in a file name is printed as
\n, so a file name can no longer inject a GitHub
Actions workflow command into CI output. - Checking a file with many duplicate keys took time that grew with the square of their
number. 200,000 duplicates took 42 s; they now take under a second. --strictpatterns match./sub/a.jsonlikesub/a.json.