diff --git a/scripts/lib/bashy-node/node-project/fix-package-json b/scripts/lib/bashy-node/node-project/fix-package-json index 27b32f3..da94651 100755 --- a/scripts/lib/bashy-node/node-project/fix-package-json +++ b/scripts/lib/bashy-node/node-project/fix-package-json @@ -112,6 +112,8 @@ function do-fix { local pkg pkg="$(jval <"${filePath}" --input=read \ deps:json="${finalDeps}" ' + (.scripts // {}) as $scripts + | { name: .name, version: .version, @@ -134,6 +136,14 @@ function do-fix { dependencies: $deps } end + | + if $scripts == {} + then . + else . + { + BLANK_LINE_3: "", + scripts: $scripts + } + end ')" \ || return "$?"