From 3f7f70165a489ebba96f1b704e65b1899e173134 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:20:55 +0000 Subject: [PATCH] fix: use working directory for package.json Fixes #78 --- build/main.js | 5 +++-- src/main.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/main.js b/build/main.js index f2d4c32..8c0400a 100644 --- a/build/main.js +++ b/build/main.js @@ -25211,6 +25211,7 @@ async function run() { return; } const lockfilePath = join2(workDir, lockfileFilename); + const packageFilePath = join2(workDir, "package.json"); core7.info(`Using lockfile: ${lockfilePath}`); core7.info( `Comparing package lockfiles between ${baseRef} and ${currentRef}` @@ -25235,12 +25236,12 @@ async function run() { } const basePackageJson = tryGetJSONFromRef( baseRef, - "package.json", + packageFilePath, workspacePath ); const currentPackageJson = tryGetJSONFromRef( currentRef, - "package.json", + packageFilePath, workspacePath ); let parsedCurrentLock; diff --git a/src/main.ts b/src/main.ts index 9a16c86..353f891 100644 --- a/src/main.ts +++ b/src/main.ts @@ -60,6 +60,7 @@ async function run(): Promise { return; } const lockfilePath = join(workDir, lockfileFilename); + const packageFilePath = join(workDir, 'package.json'); core.info(`Using lockfile: ${lockfilePath}`); core.info( @@ -88,12 +89,12 @@ async function run(): Promise { const basePackageJson = tryGetJSONFromRef( baseRef, - 'package.json', + packageFilePath, workspacePath ); const currentPackageJson = tryGetJSONFromRef( currentRef, - 'package.json', + packageFilePath, workspacePath );