Skip to content

Commit

Permalink
fix(scripts): Support jq version 1.6 (#10785)
Browse files Browse the repository at this point in the history
#10590 (comment)
> I also noticed we need `jq 1.7` minimum when running `scripts/npm-dist-tag.sh` and my machine had jq 1.6 out of the box.

## Description
Replace [`pick(...)`](https://jqlang.github.io/jq/manual/v1.7/#pick) with an equivalent expression that doesn't require version 1.7 (cf. [jq/NEWS.md](https://github.com/jqlang/jq/blob/jq-1.7/NEWS.md#language-changes:~:text=Adds%20new%20builtin%20pick(stream)) and jqlang/jq#2656 ).

### Security Considerations
None.

### Scaling Considerations
n/a

### Documentation Considerations
Deferred.

### Testing Considerations
Not covered.

### Upgrade Considerations
n/a
  • Loading branch information
gibson042 authored Dec 30, 2024
1 parent 3f302ba commit ca25dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/npm-dist-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ CMD="${1-"--help"}"
# Read current-directory package.json fields "name"/"version"/"private" into shell variables
# by evaluating single-quoted assignments like `<name>='...'`.
eval "$(jq < package.json -r --arg Q "'" '
pick(.name, .version, .private)
{ name: .name, version: .version, private: .private }
| to_entries
| .[]
# Replace a null/false value with empty string.
Expand Down

0 comments on commit ca25dd5

Please sign in to comment.