Skip to content

Commit

Permalink
Preserve scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed May 21, 2024
1 parent bc894b2 commit 69cfe37
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/lib/bashy-node/node-project/fix-package-json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ function do-fix {
local pkg
pkg="$(jval <"${filePath}" --input=read \
deps:json="${finalDeps}" '
(.scripts // {}) as $scripts
|
{
name: .name,
version: .version,
Expand All @@ -134,6 +136,14 @@ function do-fix {
dependencies: $deps
}
end
|
if $scripts == {}
then .
else . + {
BLANK_LINE_3: "",
scripts: $scripts
}
end
')" \
|| return "$?"

Expand Down

0 comments on commit 69cfe37

Please sign in to comment.