2024-10-31 15:35:03 -04:00
|
|
|
#bash
|
|
|
|
''
|
|
|
|
cd "$FLAKE/packages/some-sass-language-server" || return
|
|
|
|
|
|
|
|
latest=$(npm outdated --json | jq -r '.["some-sass-language-server"]["latest"]' || true)
|
|
|
|
|
2024-11-01 18:44:22 -04:00
|
|
|
if [[ "$latest" != "null" ]]; then
|
|
|
|
sed -i "s#\"some-sass-language-server\": \"[^\"]*\"#\"some-sass-language-server\": \"$latest\"#" ./package.json
|
2024-10-31 15:35:03 -04:00
|
|
|
|
2024-11-01 18:44:22 -04:00
|
|
|
npm update
|
2024-10-31 15:35:03 -04:00
|
|
|
|
2024-11-01 18:44:22 -04:00
|
|
|
npm_hash="$(prefetch-npm-deps ./package-lock.json)"
|
2024-10-31 15:35:03 -04:00
|
|
|
|
2024-11-01 18:44:22 -04:00
|
|
|
sed -i "s#npmDepsHash = .*#npmDepsHash = \"$npm_hash\";#" ./default.nix
|
|
|
|
fi
|
2024-10-31 15:35:03 -04:00
|
|
|
''
|