-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
887 additions
and
642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
dependency_range_tests/scripts/langchain/node/update_resolutions_lowest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const fs = require("fs"); | ||
const semver = require("semver"); | ||
|
||
const communityPackageJsonPath = "package.json"; | ||
|
||
const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); | ||
|
||
if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { | ||
const minVersion = semver.minVersion( | ||
currentPackageJson.dependencies["@langchain/core"] | ||
).version; | ||
currentPackageJson.overrides = { | ||
...currentPackageJson.overrides, | ||
"@langchain/core": minVersion, | ||
}; | ||
currentPackageJson.dependencies = { | ||
...currentPackageJson.dependencies, | ||
"@langchain/core": minVersion, | ||
}; | ||
} | ||
|
||
if (currentPackageJson.dependencies["@langchain/openai"] && !currentPackageJson.dependencies["@langchain/openai"].includes("rc")) { | ||
const minVersion = semver.minVersion( | ||
currentPackageJson.dependencies["@langchain/openai"] | ||
).version; | ||
currentPackageJson.overrides = { | ||
...currentPackageJson.overrides, | ||
"@langchain/openai": minVersion, | ||
}; | ||
currentPackageJson.dependencies = { | ||
...currentPackageJson.dependencies, | ||
"@langchain/openai": minVersion, | ||
}; | ||
} | ||
|
||
if (currentPackageJson.dependencies["@langchain/textsplitters"] && !currentPackageJson.dependencies["@langchain/textsplitters"].includes("rc")) { | ||
const minVersion = semver.minVersion( | ||
currentPackageJson.dependencies["@langchain/textsplitters"] | ||
).version; | ||
currentPackageJson.overrides = { | ||
...currentPackageJson.overrides, | ||
"@langchain/textsplitters": minVersion, | ||
}; | ||
currentPackageJson.dependencies = { | ||
...currentPackageJson.dependencies, | ||
"@langchain/textsplitters": minVersion, | ||
}; | ||
} | ||
|
||
fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
dependency_range_tests/scripts/node/update_resolutions_lowest.js
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
dependency_range_tests/scripts/with_standard_tests/anthropic/node/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "dependency-range-tests", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Tests dependency ranges for LangChain.", | ||
"dependencies": { | ||
"semver": "^7.5.4" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...dency_range_tests/scripts/with_standard_tests/anthropic/node/update_resolutions_lowest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const fs = require("fs"); | ||
const semver = require("semver"); | ||
|
||
const communityPackageJsonPath = "/app/monorepo/libs/langchain-anthropic/package.json"; | ||
|
||
const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); | ||
|
||
if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { | ||
const minVersion = semver.minVersion( | ||
currentPackageJson.dependencies["@langchain/core"] | ||
).version; | ||
currentPackageJson.overrides = { | ||
...currentPackageJson.overrides, | ||
"@langchain/core": minVersion, | ||
}; | ||
currentPackageJson.dependencies = { | ||
...currentPackageJson.dependencies, | ||
"@langchain/core": minVersion, | ||
}; | ||
} | ||
|
||
fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); |
15 changes: 15 additions & 0 deletions
15
dependency_range_tests/scripts/with_standard_tests/anthropic/node/update_workspace_deps.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const fs = require("fs"); | ||
|
||
const communityPackageJsonPath = "/app/monorepo/libs/langchain-anthropic/package.json"; | ||
const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); | ||
|
||
// Anthropic has other workspaces as devDependencies, but tagged as `workspace:*` for the version. | ||
// Update these to be `latest` for the test. | ||
if (currentPackageJson.devDependencies["@langchain/community"]) { | ||
currentPackageJson.devDependencies = { | ||
...currentPackageJson.devDependencies, | ||
"@langchain/community": "latest", | ||
}; | ||
} | ||
|
||
fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); |
Oops, something went wrong.