Skip to content

Commit 238e093

Browse files
authored
scripts[major]: New build (langchain-ai#5538)
* scripts[major]: New build * perfect build script and add to core! * chore: lint files * very nice much better * yarn format && yarn lint:fix * all build script updates * standard clean scrop[t] * add turbo to every repo * add back test:ci * remove concurrency limits in tests & ignore non testable packages
1 parent e1178c2 commit 238e093

File tree

72 files changed

+1153
-213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1153
-213
lines changed

.github/workflows/unit-tests-langchain-community.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,4 @@ jobs:
5353
- name: Build
5454
run: yarn run build --filter=@langchain/community
5555
- name: Test
56-
run: yarn run test:unit:ci --filter=@langchain/community --concurrency=1
57-
# run: yarn run test:unit:ci -- --coverage
58-
# - name: Upload coverage reports to Codecov
59-
# uses: codecov/codecov-action@v3
60-
# env:
61-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
56+
run: yarn run test:unit:ci --filter=@langchain/community

.github/workflows/unit-tests-langchain-core.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,4 @@ jobs:
5252
- name: Build
5353
run: yarn run build --filter=@langchain/core
5454
- name: Test
55-
run: yarn run test:unit:ci --filter=@langchain/core --concurrency=1
56-
# run: yarn run test:unit:ci -- --coverage
57-
# - name: Upload coverage reports to Codecov
58-
# uses: codecov/codecov-action@v3
59-
# env:
60-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
55+
run: yarn run test:unit:ci --filter=@langchain/core

.github/workflows/unit-tests-langchain-integrations.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,4 @@ jobs:
5454
- name: Build
5555
run: yarn run build --filter=!@langchain/community --filter=!@langchain/core --filter=!langchain --filter=!api_refs --filter=!core_docs --filter=!create-langchain-integration --filter=!examples
5656
- name: Test
57-
run: yarn run test:unit:ci --filter=!@langchain/community --filter=!@langchain/core --filter=!langchain --concurrency=1
58-
# run: yarn run test:unit:ci -- --coverage
59-
# - name: Upload coverage reports to Codecov
60-
# uses: codecov/codecov-action@v3
61-
# env:
62-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
57+
run: yarn run test:unit:ci --filter=!@langchain/community --filter=!@langchain/core --filter=!langchain --filter=!api_refs --filter=!core_docs --filter=!create-langchain-integration --filter=!examples

.github/workflows/unit-tests-langchain.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ jobs:
5353
- name: Build
5454
run: yarn run build --filter=langchain
5555
- name: Test
56-
run: yarn run test:unit:ci --filter=langchain --concurrency=1
56+
run: yarn run test:unit:ci --filter=langchain
5757
env:
5858
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
59-
# run: yarn run test:unit:ci -- --coverage
60-
# - name: Upload coverage reports to Codecov
61-
# uses: codecov/codecov-action@v3
62-
# env:
63-
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

examples/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
],
1111
"scripts": {
1212
"build": "tsc --declaration --outDir dist/",
13+
"clean": "rm -rf .turbo dist/",
1314
"start": "tsx --experimental-wasm-modules -r dotenv/config src/index.ts",
1415
"postinstall": "prisma generate --schema ./src/indexes/vector_stores/prisma_vectorstore/prisma/schema.prisma",
1516
"start:dist": "yarn build && node -r dotenv/config dist/index.js",

langchain-core/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain-core/",
1616
"scripts": {
17-
"build": "yarn build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn run build:scripts",
18-
"build:deps": "yarn turbo:command build --filter=@langchain/scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/core",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
19+
"clean": "rm -rf .turbo dist/",
20+
"build:deps": "yarn turbo build",
1921
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rimraf dist/tests dist/**/tests",
2022
"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",
2123
"build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch",
@@ -24,7 +26,6 @@
2426
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2527
"lint": "yarn lint:eslint && yarn lint:dpdm",
2628
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
27-
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
2829
"prepack": "yarn build",
2930
"release": "release-it --only-version --config .release-it.json",
3031
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
@@ -73,7 +74,6 @@
7374
"prettier": "^2.8.3",
7475
"release-it": "^15.10.1",
7576
"rimraf": "^5.0.1",
76-
"turbo": "latest",
7777
"typescript": "~5.1.6",
7878
"web-streams-polyfill": "^3.3.3"
7979
},

langchain-core/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

langchain/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@
561561
},
562562
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain/",
563563
"scripts": {
564-
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
564+
"build": "yarn turbo:command build:internal --filter=langchain",
565+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps",
565566
"build:deps": "yarn run turbo:command build --filter=@langchain/openai --filter=@langchain/textsplitters --filter=@langchain/cohere --concurrency=1",
566567
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rimraf dist/tests dist/**/tests",
567568
"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",
@@ -572,7 +573,7 @@
572573
"lint": "yarn lint:eslint && yarn lint:dpdm",
573574
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
574575
"precommit": "lint-staged",
575-
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
576+
"clean": "rm -rf .turbo dist/",
576577
"prepack": "yarn build",
577578
"release": "release-it --only-version --config .release-it.json",
578579
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",

langchain/src/load/import_map.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
1+
// Auto-generated by build script. Do not edit manually.
22

33
export * as agents from "../agents/index.js";
44
export * as agents__toolkits from "../agents/toolkits/index.js";

langchain/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/create-langchain-integration/template/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-INTEGRATION_NAME/",
1616
"scripts": {
17-
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/INTEGRATION_NAME",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
1819
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
1920
"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",
2021
"build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch",
@@ -23,7 +24,7 @@
2324
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2425
"lint": "yarn lint:eslint && yarn lint:dpdm",
2526
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
26-
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
27+
"clean": "rm -rf .turbo dist/",
2728
"prepack": "yarn build",
2829
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
2930
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-anthropic/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic/",
1616
"scripts": {
17-
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/anthropic",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps",
1819
"build:deps": "yarn run turbo:command build --filter=@langchain/core",
1920
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/",
2021
"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",
@@ -24,7 +25,7 @@
2425
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2526
"lint": "yarn lint:eslint && yarn lint:dpdm",
2627
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
27-
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
28+
"clean": "rm -rf .turbo dist/",
2829
"prepack": "yarn build",
2930
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
3031
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
1+
// Auto-generated by build script. Do not edit manually.
22

33
export * as index from "../index.js";
44
export * as experimental from "../experimental/index.js";

libs/langchain-anthropic/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-azure-openai/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"url": "git@github.com:langchain-ai/langchainjs.git"
1414
},
1515
"scripts": {
16-
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
16+
"build": "yarn turbo:command build:internal --filter=@langchain/azure-openai",
17+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
1718
"build:deps": "yarn run turbo:command build --filter=@langchain/core",
1819
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/",
1920
"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",
@@ -23,7 +24,7 @@
2324
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2425
"lint": "yarn lint:eslint && yarn lint:dpdm",
2526
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
26-
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
27+
"clean": "rm -rf .turbo dist/",
2728
"prepack": "yarn build",
2829
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
2930
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-cloudflare/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-cloudflare/",
1616
"scripts": {
17-
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/cloudflare",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
1819
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
1920
"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",
2021
"build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch",
@@ -23,7 +24,7 @@
2324
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2425
"lint": "yarn lint:eslint && yarn lint:dpdm",
2526
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
26-
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
27+
"clean": "rm -rf .turbo dist/",
2728
"prepack": "yarn build",
2829
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
2930
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",

libs/langchain-cloudflare/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-cohere/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-cohere/",
1616
"scripts": {
17-
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/cohere",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
1819
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
1920
"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",
2021
"build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch",
@@ -23,7 +24,7 @@
2324
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2425
"lint": "yarn lint:eslint && yarn lint:dpdm",
2526
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
26-
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
27+
"clean": "rm -rf .turbo dist/",
2728
"prepack": "yarn build",
2829
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
2930
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",

libs/langchain-cohere/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-community/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-community/",
1616
"scripts": {
17-
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/community",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps",
1819
"build:deps": "yarn run turbo:command build --filter=@langchain/core --filter=@langchain/openai --filter=langchain --filter=@langchain/anthropic --concurrency=1",
1920
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
2021
"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",
@@ -24,7 +25,7 @@
2425
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2526
"lint": "yarn lint:eslint && yarn lint:dpdm",
2627
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
27-
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
28+
"clean": "rm -rf .turbo dist/",
2829
"prepack": "yarn build",
2930
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
3031
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",

libs/langchain-community/src/load/import_map.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
1+
// Auto-generated by build script. Do not edit manually.
22

33
export * as load__serializable from "../load/serializable.js";
44
export * as tools__aiplugin from "../tools/aiplugin.js";

libs/langchain-community/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-exa/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-exa/",
1616
"scripts": {
17-
"build": "yarn build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/exa",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
1819
"build:deps": "yarn run turbo:command build --filter=@langchain/core",
1920
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
2021
"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",
@@ -24,7 +25,7 @@
2425
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2526
"lint": "yarn lint:eslint && yarn lint:dpdm",
2627
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
27-
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
28+
"clean": "rm -rf .turbo dist/",
2829
"prepack": "yarn build",
2930
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
3031
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",

libs/langchain-exa/turbo.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

libs/langchain-google-common/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-common/",
1616
"scripts": {
17-
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
17+
"build": "yarn turbo:command build:internal --filter=@langchain/google-common",
18+
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking",
1819
"build:deps": "yarn run turbo:command build --filter=@langchain/core",
1920
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/ && rm -rf dist/tests dist/**/tests",
2021
"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",
@@ -24,7 +25,7 @@
2425
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2526
"lint": "yarn lint:eslint && yarn lint:dpdm",
2627
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
27-
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
28+
"clean": "rm -rf .turbo dist/",
2829
"prepack": "yarn build",
2930
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
3031
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["//"],
3+
"pipeline": {
4+
"build": {
5+
"outputs": ["**/dist/**"]
6+
},
7+
"build:internal": {
8+
"dependsOn": ["^build:internal"]
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)