From 621c1353e56c8ee597e5e193d62981e128cac343 Mon Sep 17 00:00:00 2001 From: Timur Moziev Date: Sun, 28 Jul 2024 07:23:01 +0000 Subject: [PATCH] add version check result output --- src/actions/nodejs.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/actions/nodejs.ts b/src/actions/nodejs.ts index e68ea7c..29204c2 100644 --- a/src/actions/nodejs.ts +++ b/src/actions/nodejs.ts @@ -321,6 +321,11 @@ export async function checkNodejsPackageJsonDependencies( const fetchedVersions = await fetchNpmPackagesVersion(dependencyKeys); for (const pkg of dependencyKeys) { + if (fetchedVersions[pkg] !== contents.dependencies[pkg]) { + console.log( + `Updating dep '${pkg}' from ${contents.dependencies[pkg]} to ${fetchedVersions[pkg]}`, + ); + } contents.dependencies[pkg] = fetchedVersions[pkg]; } } catch (error) { @@ -358,6 +363,11 @@ export async function checkNodejsPackageJsonDevDependencies( const fetchedVersions = await fetchNpmPackagesVersion(devDependencies); for (const pkg of devDependencies) { + if (fetchedVersions[pkg] !== contents.devDependencies[pkg]) { + console.log( + `Updating dev-dep '${pkg}' from ${contents.devDependencies[pkg]} to ${fetchedVersions[pkg]}`, + ); + } contents.devDependencies[pkg] = fetchedVersions[pkg]; } } catch (error) {