diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7eeac497481f..9688ce873994 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,3 +43,20 @@ jobs: uses: ./.github/workflows/test-exports.yml secrets: inherit + + platform-compatibility: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: "yarn" + - name: Install dependencies + run: yarn install --immutable + - name: Build `@langchain/core` + run: yarn build --filter=@langchain/core \ No newline at end of file diff --git a/examples/package.json b/examples/package.json index 80d6edd06752..5be71f5be945 100644 --- a/examples/package.json +++ b/examples/package.json @@ -57,7 +57,7 @@ "@langchain/pinecone": "workspace:*", "@langchain/qdrant": "workspace:*", "@langchain/redis": "workspace:*", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/textsplitters": "workspace:*", "@langchain/weaviate": "workspace:*", "@langchain/yandex": "workspace:*", diff --git a/langchain-core/package.json b/langchain-core/package.json index c0ebe813c0a4..501fabe33879 100644 --- a/langchain-core/package.json +++ b/langchain-core/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain-core/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/core", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "clean": "rm -rf .turbo dist/", "build:deps": "yarn turbo build", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rimraf dist/tests dist/**/tests", @@ -56,7 +56,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@types/mustache": "^4", diff --git a/langchain/package.json b/langchain/package.json index 44211a3a0b14..02479401abba 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -570,7 +570,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain/", "scripts": { "build": "yarn turbo:command build:internal --filter=langchain", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking --gen-maps", "build:deps": "yarn run turbo:command build --filter=@langchain/openai --filter=@langchain/textsplitters --filter=@langchain/cohere --concurrency=1", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rimraf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rimraf dist-cjs", @@ -610,7 +610,7 @@ "@gomomento/sdk-core": "^1.51.1", "@jest/globals": "^29.5.0", "@langchain/cohere": "^0.0.8", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@mendable/firecrawl-js": "^0.0.13", "@notionhq/client": "^2.2.10", "@pinecone-database/pinecone": "^1.1.0", diff --git a/libs/create-langchain-integration/template/package.json b/libs/create-langchain-integration/template/package.json index bdbf6649f41b..e5598ae4c7da 100644 --- a/libs/create-langchain-integration/template/package.json +++ b/libs/create-langchain-integration/template/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-INTEGRATION_NAME/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/INTEGRATION_NAME", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -45,7 +45,7 @@ "@jest/globals": "^29.5.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@tsconfig/recommended": "^1.0.3", "@typescript-eslint/eslint-plugin": "^6.12.0", "@typescript-eslint/parser": "^6.12.0", diff --git a/libs/langchain-anthropic/package.json b/libs/langchain-anthropic/package.json index 7feeab136a27..b84dc13040f7 100644 --- a/libs/langchain-anthropic/package.json +++ b/libs/langchain-anthropic/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/anthropic", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking --gen-maps", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -44,7 +44,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/community": "workspace:*", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-aws/package.json b/libs/langchain-aws/package.json index 14a206c3fa4b..13d0c4c22c7b 100644 --- a/libs/langchain-aws/package.json +++ b/libs/langchain-aws/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-aws/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/aws", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -49,7 +49,7 @@ "devDependencies": { "@aws-sdk/types": "^3.598.0", "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@smithy/types": "^3.2.0", "@swc/core": "^1.3.90", diff --git a/libs/langchain-azure-dynamic-sessions/package.json b/libs/langchain-azure-dynamic-sessions/package.json index f26be33388ee..70a793156660 100644 --- a/libs/langchain-azure-dynamic-sessions/package.json +++ b/libs/langchain-azure-dynamic-sessions/package.json @@ -44,7 +44,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-azure-openai/package.json b/libs/langchain-azure-openai/package.json index 99ec548694f3..4c2180c79530 100644 --- a/libs/langchain-azure-openai/package.json +++ b/libs/langchain-azure-openai/package.json @@ -14,7 +14,7 @@ }, "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/azure-openai", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -41,7 +41,7 @@ "devDependencies": { "@azure/identity": "^4.0.1", "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-baidu-qianfan/package.json b/libs/langchain-baidu-qianfan/package.json index 6b3bf46efc28..a78ca4b7674c 100644 --- a/libs/langchain-baidu-qianfan/package.json +++ b/libs/langchain-baidu-qianfan/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-baidu-qianfan/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/baidu-qianfan", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -40,7 +40,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/openai": "~0.1.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-cloudflare/package.json b/libs/langchain-cloudflare/package.json index 24669f14f9d1..31a6165706ca 100644 --- a/libs/langchain-cloudflare/package.json +++ b/libs/langchain-cloudflare/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-cloudflare/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/cloudflare", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -42,7 +42,7 @@ "devDependencies": { "@cloudflare/workers-types": "^4.20231218.0", "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-cohere/package.json b/libs/langchain-cohere/package.json index e2ea27eabf25..b2680f95f7d3 100644 --- a/libs/langchain-cohere/package.json +++ b/libs/langchain-cohere/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-cohere/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/cohere", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -43,7 +43,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-community/package.json b/libs/langchain-community/package.json index 0cf08f08c340..fb6c18f8c190 100644 --- a/libs/langchain-community/package.json +++ b/libs/langchain-community/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-community/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/community", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking --gen-maps", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -79,7 +79,7 @@ "@huggingface/inference": "^2.6.4", "@jest/globals": "^29.5.0", "@langchain/langgraph": "<0.1.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@layerup/layerup-security": "^1.5.12", "@mendable/firecrawl-js": "^0.0.13", diff --git a/libs/langchain-exa/package.json b/libs/langchain-exa/package.json index d4cc7a84c435..da2a42deb93a 100644 --- a/libs/langchain-exa/package.json +++ b/libs/langchain-exa/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-exa/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/exa", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/core", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -45,7 +45,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-google-common/package.json b/libs/langchain-google-common/package.json index fa371c0472ef..4f2cf4104989 100644 --- a/libs/langchain-google-common/package.json +++ b/libs/langchain-google-common/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-common/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/google-common", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/core", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -46,7 +46,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-google-gauth/package.json b/libs/langchain-google-gauth/package.json index 462f4b13744a..55ba699a2c12 100644 --- a/libs/langchain-google-gauth/package.json +++ b/libs/langchain-google-gauth/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-gauth/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/google-gauth", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -41,7 +41,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-google-genai/package.json b/libs/langchain-google-genai/package.json index 3cf012e763ac..525087d0420c 100644 --- a/libs/langchain-google-genai/package.json +++ b/libs/langchain-google-genai/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-genai/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/google-genai", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -41,7 +41,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-google-vertexai-web/package.json b/libs/langchain-google-vertexai-web/package.json index 7cbcdc643b14..aca3cfecef72 100644 --- a/libs/langchain-google-vertexai-web/package.json +++ b/libs/langchain-google-vertexai-web/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-vertexai-web/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/google-vertexai-web", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/google-gauth", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -45,7 +45,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-google-vertexai/package.json b/libs/langchain-google-vertexai/package.json index 8d37a978879c..34a52b83c702 100644 --- a/libs/langchain-google-vertexai/package.json +++ b/libs/langchain-google-vertexai/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-vertexai/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/google-vertexai", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/google-gauth", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -49,7 +49,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/google-common": "latest", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-google-webauth/package.json b/libs/langchain-google-webauth/package.json index c4319a7031be..2c8f96b0c785 100644 --- a/libs/langchain-google-webauth/package.json +++ b/libs/langchain-google-webauth/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-webauth/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/google-webauth", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/google-common", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -46,7 +46,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-groq/package.json b/libs/langchain-groq/package.json index f0515fa6f1e7..b09839b1771c 100644 --- a/libs/langchain-groq/package.json +++ b/libs/langchain-groq/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-groq/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/groq", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -44,7 +44,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/openai": "workspace:^", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-mistralai/package.json b/libs/langchain-mistralai/package.json index c48db01b7e19..702c96067e32 100644 --- a/libs/langchain-mistralai/package.json +++ b/libs/langchain-mistralai/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mistralai/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/mistralai", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -43,7 +43,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-mixedbread-ai/package.json b/libs/langchain-mixedbread-ai/package.json index 2109c5aae39a..a0b95cf43c78 100644 --- a/libs/langchain-mixedbread-ai/package.json +++ b/libs/langchain-mixedbread-ai/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mixedbread-ai/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/mixedbread-ai", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -40,7 +40,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-mongodb/package.json b/libs/langchain-mongodb/package.json index 01b385097794..4c0dc4d80895 100644 --- a/libs/langchain-mongodb/package.json +++ b/libs/langchain-mongodb/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mongodb/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/mongodb", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/openai", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -46,7 +46,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/openai": "workspace:*", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-nomic/package.json b/libs/langchain-nomic/package.json index 2de4973cbc01..bb0e44ce12da 100644 --- a/libs/langchain-nomic/package.json +++ b/libs/langchain-nomic/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-nomic/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/nomic", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/core", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -46,7 +46,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/openai": "workspace:^", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-ollama/package.json b/libs/langchain-ollama/package.json index d6e7a7924f7a..7c9c819d0e76 100644 --- a/libs/langchain-ollama/package.json +++ b/libs/langchain-ollama/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-ollama/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/ollama", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -41,7 +41,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-openai/package.json b/libs/langchain-openai/package.json index 7206318016bc..aa28eddbfb64 100644 --- a/libs/langchain-openai/package.json +++ b/libs/langchain-openai/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-openai/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/openai", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", @@ -44,7 +44,7 @@ "devDependencies": { "@azure/identity": "^4.2.0", "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@langchain/standard-tests": "0.0.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", diff --git a/libs/langchain-pinecone/package.json b/libs/langchain-pinecone/package.json index 7ab8346bf7d3..ce5f3b26e87b 100644 --- a/libs/langchain-pinecone/package.json +++ b/libs/langchain-pinecone/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-pinecone/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/pinecone", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -48,7 +48,7 @@ "@faker-js/faker": "^8.3.1", "@jest/globals": "^29.5.0", "@langchain/openai": "workspace:*", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-qdrant/package.json b/libs/langchain-qdrant/package.json index 4a6439c67a5c..199a2a98730c 100644 --- a/libs/langchain-qdrant/package.json +++ b/libs/langchain-qdrant/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-qdrant", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/qdrant", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -46,7 +46,7 @@ "devDependencies": { "@faker-js/faker": "^8.4.1", "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-redis/package.json b/libs/langchain-redis/package.json index d8ff3deb8cc0..5904aa23470a 100644 --- a/libs/langchain-redis/package.json +++ b/libs/langchain-redis/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-redis/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/redis", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -45,7 +45,7 @@ "devDependencies": { "@faker-js/faker": "^8.4.0", "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-scripts/bin/build_v2.js b/libs/langchain-scripts/bin/build_v2.js index 2424bde5af0f..0e57864f2fe0 100755 --- a/libs/langchain-scripts/bin/build_v2.js +++ b/libs/langchain-scripts/bin/build_v2.js @@ -1 +1 @@ -import "../dist_build/build_v2.js"; +import "../dist/build_v2.js"; diff --git a/libs/langchain-scripts/package.json b/libs/langchain-scripts/package.json index ffa7187fece6..4c183c1d436c 100644 --- a/libs/langchain-scripts/package.json +++ b/libs/langchain-scripts/package.json @@ -1,6 +1,6 @@ { "name": "@langchain/scripts", - "version": "0.0.18", + "version": "0.0.20", "description": "Shared scripts for LangChain.js", "type": "module", "engines": { @@ -15,11 +15,12 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-scripts/", "bin": { "lc-build": "bin/build.js", - "lc-build:v2": "bin/build_v2.js" + "lc_build_v2": "bin/build_v2.js" }, "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/scripts", - "build:internal": "rm -rf ./build_new && tsc --project ./tsconfig.build.json && yarn build:generated", + "build:internal": "tsc --project ./tsconfig.build.json && yarn move:artifacts && yarn build:generated", + "move:artifacts": "mkdir -p ./dist && mv ./dist_build/* ./dist/", "build:generated": "node bin/build_v2.js --create-entrypoints --pre --tree-shaking", "build:turbo": "yarn turbo:command build --filter=@langchain/scripts", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", @@ -38,6 +39,7 @@ "author": "LangChain", "license": "MIT", "dependencies": { + "@rollup/wasm-node": "^4.19.0", "axios": "^1.6.7", "commander": "^11.1.0", "glob": "^10.3.10", diff --git a/libs/langchain-scripts/src/build_v2.ts b/libs/langchain-scripts/src/build_v2.ts index a07ae6ec9074..006b2cf7f79f 100644 --- a/libs/langchain-scripts/src/build_v2.ts +++ b/libs/langchain-scripts/src/build_v2.ts @@ -1,10 +1,10 @@ import { spawn } from "node:child_process"; import ts from "typescript"; import fs from "node:fs"; -import { rimraf } from "rimraf"; import { Command } from "commander"; -import { rollup } from "rollup"; +import { rollup } from "@rollup/wasm-node"; import path from "node:path"; +import { glob } from "glob"; import { ExportsMapValue, ImportData, LangChainConfig } from "./types.js"; async function asyncSpawn(command: string, args: string[]) { @@ -16,6 +16,7 @@ async function asyncSpawn(command: string, args: string[]) { ...process.env, NODE_OPTIONS: "--max-old-space-size=4096", }, + shell: true, }); child.on("close", (code) => { if (code !== 0) { @@ -27,6 +28,50 @@ async function asyncSpawn(command: string, args: string[]) { }); } +const deleteFolderRecursive = async function (inputPath: string) { + try { + // Verify the path exists + if ( + await fs.promises + .access(inputPath) + .then(() => true) + .catch(() => false) + ) { + const pathStat = await fs.promises.lstat(inputPath); + // If it's a file, delete it and return + if (pathStat.isFile()) { + await fs.promises.unlink(inputPath); + } else if (pathStat.isDirectory()) { + // List contents of directory + const directoryContents = await fs.promises.readdir(inputPath); + if (directoryContents.length) { + for await (const item of directoryContents) { + const itemStat = await fs.promises.lstat( + path.join(inputPath, item) + ); + if (itemStat.isFile()) { + // Delete file + await fs.promises.unlink(path.join(inputPath, item)); + } else if (itemStat.isDirectory()) { + await deleteFolderRecursive(path.join(inputPath, item)); + } + } + } else if (directoryContents.length === 0) { + // If the directory is empty, delete it + await fs.promises.rmdir(inputPath); + } + } + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (error: any) { + if (error.code !== "ENOENT") { + // If the error is not "file or directory doesn't exist", rethrow it + throw error; + } + // Otherwise, ignore the error (file or directory already doesn't exist) + } +}; + const NEWLINE = ` `; @@ -560,6 +605,10 @@ export async function moveAndRename({ dest: string; abs: (p: string) => string; }) { + if (!fs.existsSync(abs(source))) { + return; + } + try { for (const file of await fs.promises.readdir(abs(source), { withFileTypes: true, @@ -612,14 +661,27 @@ export async function buildWithTSup() { pre, } = processOptions(); - const importPath = `${process.cwd()}/langchain.config.js`; - const { config }: { config: LangChainConfig } = await import(importPath); + let langchainConfigPath = path.resolve("langchain.config.js"); + if (process.platform === "win32") { + // windows, must resolve path with file:// + langchainConfigPath = `file:///${langchainConfigPath}`; + } + + const { config }: { config: LangChainConfig } = await import( + langchainConfigPath + ); // Clean & generate build files if (pre && shouldGenMaps) { await Promise.all([ - rimraf("dist"), - rimraf(".turbo"), + deleteFolderRecursive("dist").catch((e) => { + console.error("Error removing dist (pre && shouldGenMaps)"); + throw e; + }), + deleteFolderRecursive(".turbo").catch((e) => { + console.error("Error removing .turbo (pre && shouldGenMaps)"); + throw e; + }), cleanGeneratedFiles(config), createImportMapFile(config), generateImportConstants(config), @@ -627,8 +689,14 @@ export async function buildWithTSup() { ]); } else if (pre && !shouldGenMaps) { await Promise.all([ - rimraf("dist"), - rimraf(".turbo"), + deleteFolderRecursive("dist").catch((e) => { + console.error("Error removing dist (pre && !shouldGenMaps)"); + throw e; + }), + deleteFolderRecursive(".turbo").catch((e) => { + console.error("Error deleting with deleteFolderRecursive"); + throw e; + }), cleanGeneratedFiles(config), ]); } @@ -646,9 +714,25 @@ export async function buildWithTSup() { // move CJS to dist await Promise.all([ updatePackageJson(config), - rimraf("dist-cjs"), - rimraf("dist/tests"), - rimraf("dist/**/tests"), + deleteFolderRecursive("dist-cjs").catch((e) => { + console.error("Error removing dist-cjs"); + throw e; + }), + deleteFolderRecursive("dist/tests").catch((e) => { + console.error("Error removing dist/tests"); + throw e; + }), + (async () => { + // Required for cross-platform compatibility. + // Windows does not manage globs the same as Max/Linux when deleting directories. + const testFolders = await glob("dist/**/tests"); + await Promise.all( + testFolders.map((folder) => deleteFolderRecursive(folder)) + ); + })().catch((e) => { + console.error("Error removing dist/**/tests"); + throw e; + }), ]); } diff --git a/libs/langchain-standard-tests/package.json b/libs/langchain-standard-tests/package.json index b40701745743..699fff544525 100644 --- a/libs/langchain-standard-tests/package.json +++ b/libs/langchain-standard-tests/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-standard-tests/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/standard-tests", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/", "lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts", "lint": "yarn lint:eslint && yarn lint:dpdm", diff --git a/libs/langchain-textsplitters/package.json b/libs/langchain-textsplitters/package.json index 89eba2d93ebe..d0fb8c7733a4 100644 --- a/libs/langchain-textsplitters/package.json +++ b/libs/langchain-textsplitters/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-textsplitters/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/textsplitters", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -44,7 +44,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-weaviate/package.json b/libs/langchain-weaviate/package.json index 6ddb76e23060..b973da7df257 100644 --- a/libs/langchain-weaviate/package.json +++ b/libs/langchain-weaviate/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-weaviate/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/weaviate", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:deps": "yarn run turbo:command build --filter=@langchain/core", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", @@ -47,7 +47,7 @@ "devDependencies": { "@jest/globals": "^29.5.0", "@langchain/openai": "workspace:^", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/libs/langchain-yandex/package.json b/libs/langchain-yandex/package.json index 8fa657ae97e5..0e4d92802728 100644 --- a/libs/langchain-yandex/package.json +++ b/libs/langchain-yandex/package.json @@ -15,7 +15,7 @@ "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-yandex/", "scripts": { "build": "yarn turbo:command build:internal --filter=@langchain/yandex", - "build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking", + "build:internal": "yarn lc_build_v2 --create-entrypoints --pre --tree-shaking", "build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests", "build:cjs": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist-cjs/ -p tsconfig.cjs.json && yarn move-cjs-to-dist && rm -rf dist-cjs", "build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch", @@ -44,7 +44,7 @@ }, "devDependencies": { "@jest/globals": "^29.5.0", - "@langchain/scripts": "~0.0.14", + "@langchain/scripts": "~0.0.20", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", "@tsconfig/recommended": "^1.0.3", diff --git a/yarn.lock b/yarn.lock index 3c34ea815cab..b8488b1284cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10215,7 +10215,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/community": "workspace:*" "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -10251,7 +10251,7 @@ __metadata: "@aws-sdk/types": ^3.598.0 "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@smithy/types": ^3.2.0 "@swc/core": ^1.3.90 @@ -10287,7 +10287,7 @@ __metadata: "@azure/identity": ^4.2.0 "@jest/globals": ^29.5.0 "@langchain/core": ~0.2 - "@langchain/scripts": ~0.0 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -10322,7 +10322,7 @@ __metadata: "@azure/openai": 1.0.0-beta.11 "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -10354,7 +10354,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.56 <0.3.0" "@langchain/openai": ~0.1.0 - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -10390,7 +10390,7 @@ __metadata: "@cloudflare/workers-types": ^4.20231218.0 "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -10433,7 +10433,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -10500,7 +10500,7 @@ __metadata: "@langchain/core": ">=0.2.16 <0.3.0" "@langchain/langgraph": <0.1.0 "@langchain/openai": ">=0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@layerup/layerup-security": ^1.5.12 "@mendable/firecrawl-js": ^0.0.13 @@ -11015,7 +11015,7 @@ __metadata: resolution: "@langchain/core@workspace:langchain-core" dependencies: "@jest/globals": ^29.5.0 - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@types/mustache": ^4 @@ -11057,7 +11057,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11100,7 +11100,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11134,7 +11134,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.56 <0.3.0" "@langchain/google-common": ~0.0.21 - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11167,7 +11167,7 @@ __metadata: "@google/generative-ai": ^0.7.0 "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11202,7 +11202,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.56 <0.3.0" "@langchain/google-webauth": ~0.0.20 - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11235,7 +11235,7 @@ __metadata: "@langchain/core": ">0.1.56 <0.3.0" "@langchain/google-common": latest "@langchain/google-gauth": ~0.0.20 - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11267,7 +11267,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.56 <0.3.0" "@langchain/google-common": ~0.0.21 - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11299,7 +11299,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" "@langchain/openai": "workspace:^" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11367,7 +11367,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@mistralai/mistralai": ^0.4.0 "@swc/core": ^1.3.90 @@ -11403,7 +11403,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.5 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@mixedbread-ai/sdk": ^2.2.3 "@swc/core": ^1.3.90 @@ -11437,7 +11437,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" "@langchain/openai": "workspace:*" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11471,7 +11471,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" "@langchain/openai": "workspace:^" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@nomic-ai/atlas": ^0.8.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11503,7 +11503,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.17 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11539,7 +11539,7 @@ __metadata: "@azure/identity": ^4.2.0 "@jest/globals": ^29.5.0 "@langchain/core": ">=0.2.16 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/standard-tests": 0.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11586,7 +11586,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.2.0 <0.3.0" "@langchain/openai": "workspace:*" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@pinecone-database/pinecone": ^3.0.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11621,7 +11621,7 @@ __metadata: "@faker-js/faker": ^8.4.1 "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@qdrant/js-client-rest": ^1.9.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 @@ -11655,7 +11655,7 @@ __metadata: "@faker-js/faker": ^8.4.0 "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11682,11 +11682,12 @@ __metadata: languageName: unknown linkType: soft -"@langchain/scripts@workspace:*, @langchain/scripts@workspace:libs/langchain-scripts, @langchain/scripts@~0.0, @langchain/scripts@~0.0.14": +"@langchain/scripts@workspace:*, @langchain/scripts@workspace:libs/langchain-scripts, @langchain/scripts@~0.0.20": version: 0.0.0-use.local resolution: "@langchain/scripts@workspace:libs/langchain-scripts" dependencies: "@jest/globals": ^29.5.0 + "@rollup/wasm-node": ^4.19.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11714,7 +11715,7 @@ __metadata: typescript: ^5.4.5 bin: lc-build: bin/build.js - "lc-build:v2": bin/build_v2.js + lc_build_v2: bin/build_v2.js languageName: unknown linkType: soft @@ -11756,7 +11757,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">0.2.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11788,7 +11789,7 @@ __metadata: "@jest/globals": ^29.5.0 "@langchain/core": ">0.2.0 <0.3.0" "@langchain/openai": "workspace:^" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -11822,7 +11823,7 @@ __metadata: dependencies: "@jest/globals": ^29.5.0 "@langchain/core": ">0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 "@tsconfig/recommended": ^1.0.3 @@ -13184,6 +13185,21 @@ __metadata: languageName: node linkType: hard +"@rollup/wasm-node@npm:^4.19.0": + version: 4.19.0 + resolution: "@rollup/wasm-node@npm:4.19.0" + dependencies: + "@types/estree": 1.0.5 + fsevents: ~2.3.2 + dependenciesMeta: + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: c84a1e35296b95a80d9b587d8632ddb518083213548caf1292a782794a7439921d224deaa99a7f14cede99ce15a60d03ab6c7b2e4f41c5746002c521dbcba555 + languageName: node + linkType: hard + "@rushstack/eslint-patch@npm:^1.3.3": version: 1.5.1 resolution: "@rushstack/eslint-patch@npm:1.5.1" @@ -16979,6 +16995,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:1.0.5": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: dd8b5bed28e6213b7acd0fb665a84e693554d850b0df423ac8076cc3ad5823a6bc26b0251d080bdc545af83179ede51dd3f6fa78cad2c46ed1f29624ddf3e41a + languageName: node + linkType: hard + "@types/estree@npm:^1.0.0": version: 1.0.1 resolution: "@types/estree@npm:1.0.1" @@ -24980,7 +25003,7 @@ __metadata: "@langchain/pinecone": "workspace:*" "@langchain/qdrant": "workspace:*" "@langchain/redis": "workspace:*" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/textsplitters": "workspace:*" "@langchain/weaviate": "workspace:*" "@langchain/yandex": "workspace:*" @@ -30132,7 +30155,7 @@ __metadata: "@langchain/cohere": ^0.0.8 "@langchain/core": ">=0.2.11 <0.3.0" "@langchain/openai": ">=0.1.0 <0.3.0" - "@langchain/scripts": ~0.0.14 + "@langchain/scripts": ~0.0.20 "@langchain/textsplitters": ~0.0.0 "@mendable/firecrawl-js": ^0.0.13 "@notionhq/client": ^2.2.10