fix(node_modules): improve bumpNpmDeps and fix auto updates
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-01-04 23:48:28 -05:00
parent d53b9f1e62
commit 49bf18803a
2 changed files with 8 additions and 3 deletions

View file

@ -44,7 +44,7 @@ const updatePackageJson = async(workspaceDir: string, updates: object) => {
const prefetchNpmDeps = (workspaceDir: string): string => {
npmRun(['install', '--package-lock-only'], workspaceDir);
npmRun(['update', '--package-lock-only'], workspaceDir);
return spawnSync(
'prefetch-npm-deps',

View file

@ -18,8 +18,13 @@
};
text = ''
# this command might fail but still updates the main lockfile
npm i --package-lock-only || true
prefetch-npm-deps ./package-lock.json
npm update --package-lock-only || true
hash="$(prefetch-npm-deps ./package-lock.json)"
echo "$hash"
if [[ -f ./default.nix ]]; then
sed -i "s#npmDepsHash = .*#npmDepsHash = \"$hash\";#" ./default.nix
fi
'';
};
in