Skip to content

Commit b241eb7

Browse files
committed
Merge branch 'release/5.40.0'
2 parents 057189a + 8ef746a commit b241eb7

11 files changed

Lines changed: 85 additions & 32 deletions

.vscode/settings.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
{
2-
"doppler": {
3-
"autocomplete": {
4-
"enable": null
5-
},
6-
"hover": {
7-
"enable": null
8-
}
9-
},
2+
"$schema": "https://raw.githubusercontent.com/wraith13/vscode-schemas/refs/heads/master/en/latest/schemas/settings/user.json",
3+
"doppler.autocomplete.enable": true,
4+
"doppler.hover.enable": true,
105
"workbench.colorCustomizations": {
6+
"activityBar.background": "#9DC08B",
7+
"activityBar.foreground": "#374633",
8+
"activityBar.inactiveForeground": "#2c3829",
119
"titleBar.activeBackground": "#9DC08B",
12-
"titleBar.border": "#9DC08B",
1310
"titleBar.activeForeground": "#374633",
11+
"titleBar.border": "#9DC08B",
1412
"titleBar.inactiveBackground": "#acc99c",
15-
"titleBar.inactiveForeground": "#556252",
16-
"activityBar.background": "#9DC08B",
17-
"activityBar.foreground": "#374633",
18-
"activityBar.inactiveForeground": "#2c3829"
13+
"titleBar.inactiveForeground": "#556252"
1914
}
20-
}
15+
}

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
# Changelog
44

5+
## 5.40.0 (2026-03-27)
6+
7+
_Commits from: v5.39.2..HEAD_
8+
9+
### 📂 Unscoped changes
10+
11+
#### Other changes
12+
13+
- Merge tag 'v5.39.0' into develop ([d3c7956](https://github.com/tomgrv/devcontainer-features/commit/d3c79568c025f8a75000b5d058c1375c34d6b8c6))
14+
- Merge tag 'v5.39.1' into develop ([5cc9646](https://github.com/tomgrv/devcontainer-features/commit/5cc96466899a2829f6d13fc6df4f2e3c7ce21ea3))
15+
- Merge tag 'v5.39.2' into develop ([083e77e](https://github.com/tomgrv/devcontainer-features/commit/083e77e6a128778b7e79ea592d9ecc6e48900032))
16+
- ♻️ simplify doppler settings structure ([53e7a8e](https://github.com/tomgrv/devcontainer-features/commit/53e7a8e1eb07024c4f1828feff5f7087fd7bd45c))
17+
18+
### 📦 common-utils changes
19+
20+
#### Bug Fixes
21+
22+
- 🐛 enhance argument parsing for dispatch and args scripts ([fcda5a3](https://github.com/tomgrv/devcontainer-features/commit/fcda5a322eb85f9aafd020b9ea770f64598a4b51))
23+
- 🐛 improve error handling for missing source in json loader ([da4adde](https://github.com/tomgrv/devcontainer-features/commit/da4adde8478ea014d3c38844c9fd8fa8ccf34481))
24+
- 🐛 improve parameter handling in dispatch script ([8ae8fa5](https://github.com/tomgrv/devcontainer-features/commit/8ae8fa5ddfa89730ee28987be289ffaad5203794))
25+
- 🐛 improve schema loading and error handling in JSON validation ([5259f49](https://github.com/tomgrv/devcontainer-features/commit/5259f49a7b65fb89c17534892655629c79ed410c))
26+
- 🐛 remove unused preserve function call in dispatch script ([e91d5c3](https://github.com/tomgrv/devcontainer-features/commit/e91d5c3a5a42623968b6f8411ca54fcd7eb5ce90))
27+
528
## 5.39.2 (2026-03-25)
629

730
_Commits from: v5.39.1..HEAD_
@@ -661,4 +684,4 @@ _Commits from: v5.25.0..HEAD_
661684

662685
---
663686

664-
_Generated on 2026-03-25 by [tomgrv/devcontainer-features](https://github.com/tomgrv/devcontainer-features)_
687+
_Generated on 2026-03-27 by [tomgrv/devcontainer-features](https://github.com/tomgrv/devcontainer-features)_

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tomgrv/devcontainer-features",
3-
"version": "5.39.2",
3+
"version": "5.40.0",
44
"description": "Configure dev environment with devcontainer, gitflow, gitversion, git aliases & hooks. Can be used a devcontainer features",
55
"keywords": [
66
"dev",

src/common-utils/_normalize-json.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ for file in $files; do
3131

3232
# Validate JSON
3333
zz_log i "Normalizing {U $file}..."
34-
list=$(validate-json ${allow:+-a} ${cache:+-c} ${debug:+-d} ${fallback:+-f "$fallback"} ${local:+-l "$local"} ${import:+-i} ${schema:+-s"$schema"} $file)
34+
list=$(./src/common-utils/_validate-json.sh ${allow:+-a} ${cache:+-c} ${debug:+-d} ${fallback:+-f "$fallback"} ${local:+-l "$local"} ${import:+-i} ${schema:+-s"$schema"} $file)
3535

3636
if test -z "$list"; then
3737
zz_log e "JSON {U $file} not valid, cannot normalize" && exit 1
@@ -54,7 +54,7 @@ for file in $files; do
5454
$lst | split("\n")
5555
| map(select(length > 0))
5656
| map(
57-
split(".") | map(fromjson? // .)
57+
split("\".\"") | map(ltrimstr("\"") | rtrimstr("\""))
5858
);
5959
def xpath($ary):
6060
. as $in

src/common-utils/_validate-json.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,16 @@ validate() {
455455
zz_log "${lvl}" "{Blue End Parsing, all valid!}" >&2
456456
}
457457

458+
# if no schema loaded, open file and check if it contains a $schema property with a valid url, and load it if found
459+
if [ -z "$schema" ]; then
460+
461+
schema=$(zz_json $json | jq -r '."$schema" // empty')
462+
463+
if test -n "$schema"; then
464+
zz_log i "Found schema reference in JSON file: {U $schema}"
465+
fi
466+
fi
467+
458468
# if local flag is set, get schema from json file name
459469
if [ -n "$local" ] && [ -z "$schema" ]; then
460470

@@ -501,12 +511,17 @@ if [ -n "$fallback" ] && [ -z "$schema" ]; then
501511
zz_log w "Using fallback schema {UYellow $schema}"
502512
fi
503513

514+
# Check if schema is readable
515+
if test -z "$schema"; then
516+
zz_log e "Schema is missing" && exit 1
517+
fi
518+
504519
# Download schema file and add id to it if not present
505520
schema=$(zz_json -s "$schema")
506521

507522
# Check if schema is readable
508523
if test -z "$schema"; then
509-
zz_log e "Schema is missing" && exit 1
524+
zz_log e "Schema is empty" && exit 1
510525
fi
511526

512527
# if schema is not a valid JSON, return error

src/common-utils/_zz_args.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ if test $# -lt 1; then
2626
x for flags x with value (e.g., -f value, -h being reserved for help)
2727
- for sequential arguments in the order defined, without flags
2828
+ to capture all remaining arguments as a single variable with spaces as separators
29-
& to capture all remaining arguments as a single variable with newlines as separators" >&2
29+
& to capture all remaining arguments as a multiple-line variable
30+
# to capture all remaining arguments with escaped spaces" >&2
3031
return 1
3132
fi
3233

@@ -56,6 +57,9 @@ while read argname datatype varname help; do
5657
elif [ "$argname" = "&" ]; then
5758
line="<$datatype...>>"
5859
helpinfo="$helpinfo\n\t$(printf '%-12s : %s' "$name" "$help")"
60+
elif [ "$argname" = "#" ]; then
61+
line="<$datatype...>>"
62+
helpinfo="$helpinfo\n\t$(printf '%-12s : %s' "$name" "$help")"
5963
else
6064
if [ "$datatype" = "-" ]; then
6165
line="[-$argname]"
@@ -132,6 +136,21 @@ else
132136
echo "$arg='$lines'"
133137
done
134138

139+
# Process remaining '#' parameters
140+
for arg in $(echo $varnames | grep -E "^#" | cut -f2); do
141+
lines=""
142+
while [ "$#" -gt "0" ]; do
143+
# spaces that are not escaped should be preserved as part of the argument
144+
if [ -z "$lines" ]; then
145+
lines="$(printf '%s' "$1" | sed 's/ /\\ /g')"
146+
else
147+
lines="$lines $(printf '%s' "$1" | sed 's/ /\\ /g')"
148+
fi
149+
shift 1
150+
done
151+
echo "$arg='$lines'"
152+
done
153+
135154
# Process remaining '+' parameters
136155
for arg in $(echo $varnames | grep -E "^\+" | cut -f2); do
137156
if [ "$#" -gt "0" ]; then

src/common-utils/_zz_dispatch.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ set -e
88

99
# Parse arguments and display help if needed
1010
eval $(
11-
zz_args "Dispatch Utility" $0 "$@" <<- help
11+
./src/common-utils/_zz_args.sh "Dispatch Utility" $0 "$@" <<- help
1212
- caller caller Caller script path
1313
- subcmd subcmd Target script to execute
1414
d debug debug Enable debug mode
15-
& params params Remaining arguments passed to the target script
15+
# params params Remaining arguments passed to the target script
1616
help
1717
)
1818

@@ -51,14 +51,13 @@ else
5151
target="${caller_dir}/${name}"
5252
fi
5353

54-
echo $(preserve $params)
55-
54+
# Check if target exists and is executable, then dispatch
5655
if [ -x "${target}" ]; then
5756
zz_log i "Dispatching to executable target: ${target}" >&2
58-
exec "${target}" $(echo $@)
57+
eval exec "${target}" $params
5958
elif [ -f "${target}" ]; then
6059
zz_log i "Dispatching to subshell target: ${target}" >&2
61-
exec sh "${target}" $(echo $@)
60+
eval exec sh "${target}" $params
6261
else
6362
# Nothing found: show help and available utilities in the same directory
6463
zz_log w "No dispatch target found" && usage

src/common-utils/_zz_json.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ if test -n "$(echo $source | grep -E '^http')"; then
2222
elif test -f "$source"; then
2323
zz_log i "Loading file {U $source}"
2424
cat $source
25-
else
25+
elif test -n "$source"; then
2626
zz_log e "File {U $source} not found" && exit 1
27+
else
28+
zz_log e "No source provided" && exit 1
2729
fi | sed -e 's:^[[:blank:]]*//.*$::g' 2>/dev/null | jq --arg source "$source" --arg schema "${schema:+true}" 'if . == null then {} else . end | if ($source != "" and has("$id")) or $schema == "" then . else . + {"$id": $source} end'

src/common-utils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "common-utils",
33
"name": "Common Utils",
44
"description": "Common utils for tomgrv/devcontainer-features",
5-
"version": "5.39.2",
5+
"version": "5.40.0",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/common-utils": {}
88
},

0 commit comments

Comments
 (0)