Jens-G opened a new pull request, #3891: URL: https://github.com/apache/thrift/pull/3891
`jsonReplace` and `npmlockReplace` in `build/veralign.sh` read the version with jq and took any jq failure for a missing version, so a JSON file that jq cannot parse or open was reported with the wrong cause: | File that jq cannot parse or open | Before | After | |---|---|---| | `package.json` | `ERROR: version tag not found` | `ERROR: jq could not read the file` | | `package-lock.json` | `NOT FOUND: 0.26.0 in version and packages[""].version` | `ERROR: jq could not read the file` | jq's own message, such as `jq: parse error: Unfinished JSON term at EOF at line 2, column 0`, still appears right above the row. Both functions now check the file with `jq empty` before they read the version. ### Verification I ran the script before and after the change on an exported tree, with and without `DRYRUN`: - A malformed or missing `package.json` or `package-lock.json` gets the new message. - Everything else keeps its old message: a `package.json` without a version, a lockfile with another version, and JSON that is `[]`, `null` or empty. - Every case still ends in exit 1 with no temporary file left. - A bump from 0.26.0 writes the same 146 lines as before, and a full `DRYRUN` prints the same output. - shellcheck reports the same findings as before, and codespell is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
