Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.3.0 #16

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to

## [Unreleased]

Nothing yet.

## [0.3.0] — 2024-07-23

### BREAKING CHANGES

> [!NOTE]
Expand Down Expand Up @@ -47,6 +51,10 @@ and this project adheres to
[kseistrup](https://aur.archlinux.org/account/kseistrup)
- `--help` text uses `:json` instead of `:raw` in one of the examples
(https://github.com/h4l/json.bash/pull/9)
- Updated `examples/jb-cli.sh` to use the current argument syntax — it was out
of date.
- `json.bash` now has a copyright/license/url comment in at the top. This should
make its origin clear when vendored into a downstream project as a dependency.

## [0.2.2] — 2023-08-07

Expand Down Expand Up @@ -96,6 +104,7 @@ No functional changes, `0.2.0` wasn't published because of a CI fail.
Initial release.

[unreleased]: https://github.com/h4l/json.bash/compare/v0.2.2...HEAD
[0.3.0]: https://github.com/h4l/json.bash/compare/v0.2.2...v0.3.0
[0.2.2]: https://github.com/h4l/json.bash/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/h4l/json.bash/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/h4l/json.bash/compare/v0.1.0...v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NOW = "${timestamp()}"
variable CI {
default = "false"
}
_DEFAULT_JSON_BASH_VERSION = "0.2.3-dev"
_DEFAULT_JSON_BASH_VERSION = "0.3.1-dev"
variable JSON_BASH_VERSION {
default = ""
}
Expand Down
16 changes: 8 additions & 8 deletions examples/jb-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Example: json.org https://json.org/example.html
EOT
printf "\njson.bash jb CLI:\n"

# jb's @=/file references combined with shell process substitution allow jb
# jb's @/file references combined with shell process substitution allow jb
# calls to nest:
jb menu:json@=<(
jb id=file value=File popup:json@=<(
jb menuitem:json[]@=<(
jb menu:json@<(
jb id=file value=File popup:json@<(
jb menuitem:json[]@<(
jb value=New onclick="CreateNewDoc()"; \
jb value=Open onclick="OpenDoc()"; \
jb value=Close onclick="CloseDoc()"
Expand All @@ -46,7 +46,7 @@ jb menu:json@=<(
# Or nest jb calls with command substitution
jb menu:json="$(
jb id=file value=File popup:json="$(
jb menuitem:json[]="$(
jb menuitem:json[$'\n']="$(
jb value=New onclick="CreateNewDoc()"; \
jb value=Open onclick="OpenDoc()"; \
jb value=Close onclick="CloseDoc()"
Expand All @@ -62,7 +62,7 @@ export menuitems=$(
)
# Or temporary files
tmp=$(mktemp -d)
jb menuitem:json[]@=menuitems > "${tmp:?}/popup" # the filename is used as the key
jb menuitem:json[$'\n']@menuitems > "${tmp:?}/popup" # the filename is used as the key
export menu=$(jb id=file value=File @"${tmp:?}"/popup:json)
# Environment variables can be explicitly passed without exporting globally
menu=${menu:?} jb @menu:json
Expand Down Expand Up @@ -92,9 +92,9 @@ Example: https://datatracker.ietf.org/doc/html/rfc8259#section-13
EOT
printf "\njson.bash jb CLI:\n"

jb Image:json@=<(
jb Image:json@<(
jb Width:number=800 Height:number=600 Title="View from 15th Floor" \
Thumbnail:json@=<(
Thumbnail:json@<(
jb url="http://www.example.com/image/481989943" height:number=125 \
width:number=100
) \
Expand Down
4 changes: 3 additions & 1 deletion json.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env bash
# shellcheck disable=SC2120
# Copyright 2023-2024 json.bash contributors. MIT license.
# https://github.com/h4l/json.bash
shopt -s extglob # required to match our auto glob patterns

JSON_BASH_VERSION=0.2.3-dev
JSON_BASH_VERSION=0.3.0

declare -g -A _json_defaults=()

Expand Down
Loading