From e8e1e67b0681ccacfa58fd57bb2cb697e84ced1d Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 7 Jun 2024 16:25:05 -0700 Subject: [PATCH] update lc lowest deps to actual lc deps --- .../node/update_resolutions_lowest.js | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js b/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js index 354be36113e7..be870cc53464 100644 --- a/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js +++ b/dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js @@ -17,17 +17,31 @@ if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.de }; } -if (currentPackageJson.dependencies["@langchain/community"] && !currentPackageJson.dependencies["@langchain/community"].includes("rc")) { +if (currentPackageJson.dependencies["@langchain/openai"] && !currentPackageJson.dependencies["@langchain/openai"].includes("rc")) { const minVersion = semver.minVersion( - currentPackageJson.dependencies["@langchain/community"] + currentPackageJson.dependencies["@langchain/openai"] ).version; currentPackageJson.resolutions = { ...currentPackageJson.resolutions, - "@langchain/community": minVersion, + "@langchain/openai": minVersion, }; currentPackageJson.dependencies = { ...currentPackageJson.dependencies, - "@langchain/community": minVersion, + "@langchain/openai": minVersion, + }; +} + +if (currentPackageJson.dependencies["@langchain/textsplitters"] && !currentPackageJson.dependencies["@langchain/textsplitters"].includes("rc")) { + const minVersion = semver.minVersion( + currentPackageJson.dependencies["@langchain/textsplitters"] + ).version; + currentPackageJson.resolutions = { + ...currentPackageJson.resolutions, + "@langchain/textsplitters": minVersion, + }; + currentPackageJson.dependencies = { + ...currentPackageJson.dependencies, + "@langchain/textsplitters": minVersion, }; }