Skip to content

Commit

Permalink
update lc lowest deps to actual lc deps
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jun 7, 2024
1 parent 616e075 commit e8e1e67
Showing 1 changed file with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down

0 comments on commit e8e1e67

Please sign in to comment.