fix(node_modules): improve bumpNpmDeps and fix auto updates
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
d53b9f1e62
commit
49bf18803a
2 changed files with 8 additions and 3 deletions
|
@ -44,7 +44,7 @@ const updatePackageJson = async(workspaceDir: string, updates: object) => {
|
||||||
|
|
||||||
|
|
||||||
const prefetchNpmDeps = (workspaceDir: string): string => {
|
const prefetchNpmDeps = (workspaceDir: string): string => {
|
||||||
npmRun(['install', '--package-lock-only'], workspaceDir);
|
npmRun(['update', '--package-lock-only'], workspaceDir);
|
||||||
|
|
||||||
return spawnSync(
|
return spawnSync(
|
||||||
'prefetch-npm-deps',
|
'prefetch-npm-deps',
|
||||||
|
|
|
@ -18,8 +18,13 @@
|
||||||
};
|
};
|
||||||
text = ''
|
text = ''
|
||||||
# this command might fail but still updates the main lockfile
|
# this command might fail but still updates the main lockfile
|
||||||
npm i --package-lock-only || true
|
npm update --package-lock-only || true
|
||||||
prefetch-npm-deps ./package-lock.json
|
hash="$(prefetch-npm-deps ./package-lock.json)"
|
||||||
|
echo "$hash"
|
||||||
|
|
||||||
|
if [[ -f ./default.nix ]]; then
|
||||||
|
sed -i "s#npmDepsHash = .*#npmDepsHash = \"$hash\";#" ./default.nix
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue