Skip to content

Commit

Permalink
scripts[major]: New build (#5538)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bracesproul committed May 24, 2024
1 parent e1178c2 commit 238e093
Show file tree
Hide file tree
Showing 72 changed files with 1,153 additions and 213 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/unit-tests-langchain-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,4 @@ jobs:
- name: Build
run: yarn run build --filter=@langchain/community
- name: Test
run: yarn run test:unit:ci --filter=@langchain/community --concurrency=1
# run: yarn run test:unit:ci -- --coverage
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: yarn run test:unit:ci --filter=@langchain/community
7 changes: 1 addition & 6 deletions .github/workflows/unit-tests-langchain-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,4 @@ jobs:
- name: Build
run: yarn run build --filter=@langchain/core
- name: Test
run: yarn run test:unit:ci --filter=@langchain/core --concurrency=1
# run: yarn run test:unit:ci -- --coverage
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: yarn run test:unit:ci --filter=@langchain/core
7 changes: 1 addition & 6 deletions .github/workflows/unit-tests-langchain-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,4 @@ jobs:
- name: Build
run: yarn run build --filter=!@langchain/community --filter=!@langchain/core --filter=!langchain --filter=!api_refs --filter=!core_docs --filter=!create-langchain-integration --filter=!examples
- name: Test
run: yarn run test:unit:ci --filter=!@langchain/community --filter=!@langchain/core --filter=!langchain --concurrency=1
# run: yarn run test:unit:ci -- --coverage
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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
7 changes: 1 addition & 6 deletions .github/workflows/unit-tests-langchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ jobs:
- name: Build
run: yarn run build --filter=langchain
- name: Test
run: yarn run test:unit:ci --filter=langchain --concurrency=1
run: yarn run test:unit:ci --filter=langchain
env:
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
# run: yarn run test:unit:ci -- --coverage
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
"scripts": {
"build": "tsc --declaration --outDir dist/",
"clean": "rm -rf .turbo dist/",
"start": "tsx --experimental-wasm-modules -r dotenv/config src/index.ts",
"postinstall": "prisma generate --schema ./src/indexes/vector_stores/prisma_vectorstore/prisma/schema.prisma",
"start:dist": "yarn build && node -r dotenv/config dist/index.js",
Expand Down
8 changes: 4 additions & 4 deletions langchain-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain-core/",
"scripts": {
"build": "yarn build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn run build:scripts",
"build:deps": "yarn turbo:command build --filter=@langchain/scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/core",
"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",
"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",
"build:watch": "yarn create-entrypoints && tsc --outDir dist/ --watch",
Expand All @@ -24,7 +26,6 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"prepack": "yarn build",
"release": "release-it --only-version --config .release-it.json",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
Expand Down Expand Up @@ -73,7 +74,6 @@
"prettier": "^2.8.3",
"release-it": "^15.10.1",
"rimraf": "^5.0.1",
"turbo": "latest",
"typescript": "~5.1.6",
"web-streams-polyfill": "^3.3.3"
},
Expand Down
11 changes: 11 additions & 0 deletions langchain-core/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/langchain/",
"scripts": {
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=langchain",
"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",
Expand All @@ -572,7 +573,7 @@
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"precommit": "lint-staged",
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"release": "release-it --only-version --config .release-it.json",
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
Expand Down
2 changes: 1 addition & 1 deletion langchain/src/load/import_map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
// Auto-generated by build script. Do not edit manually.

export * as agents from "../agents/index.js";
export * as agents__toolkits from "../agents/toolkits/index.js";
Expand Down
11 changes: 11 additions & 0 deletions langchain/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/create-langchain-integration/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-INTEGRATION_NAME/",
"scripts": {
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/INTEGRATION_NAME",
"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",
Expand All @@ -23,7 +24,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
11 changes: 11 additions & 0 deletions libs/create-langchain-integration/template/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-anthropic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic/",
"scripts": {
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/anthropic",
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps",
"build:deps": "yarn run turbo:command build --filter=@langchain/core",
"build:esm": "NODE_OPTIONS=--max-old-space-size=4096 tsc --outDir dist/",
"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",
Expand All @@ -24,7 +25,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-anthropic/src/load/import_map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
// Auto-generated by build script. Do not edit manually.

export * as index from "../index.js";
export * as experimental from "../experimental/index.js";
11 changes: 11 additions & 0 deletions libs/langchain-anthropic/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-azure-openai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"url": "git@github.com:langchain-ai/langchainjs.git"
},
"scripts": {
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/azure-openai",
"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/",
"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",
Expand All @@ -23,7 +24,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
11 changes: 11 additions & 0 deletions libs/langchain-azure-openai/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-cloudflare/",
"scripts": {
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/cloudflare",
"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",
Expand All @@ -23,7 +24,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
11 changes: 11 additions & 0 deletions libs/langchain-cloudflare/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-cohere/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-cohere/",
"scripts": {
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/cohere",
"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",
Expand All @@ -23,7 +24,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
11 changes: 11 additions & 0 deletions libs/langchain-cohere/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-community/",
"scripts": {
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/community",
"build:internal": "yarn lc-build:v2 --create-entrypoints --pre --tree-shaking --gen-maps",
"build:deps": "yarn run turbo:command build --filter=@langchain/core --filter=@langchain/openai --filter=langchain --filter=@langchain/anthropic --concurrency=1",
"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",
Expand All @@ -24,7 +25,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre --gen-maps",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-community/src/load/import_map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Auto-generated by `scripts/create-entrypoints.js`. Do not edit manually.
// Auto-generated by build script. Do not edit manually.

export * as load__serializable from "../load/serializable.js";
export * as tools__aiplugin from "../tools/aiplugin.js";
Expand Down
11 changes: 11 additions & 0 deletions libs/langchain-community/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-exa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-exa/",
"scripts": {
"build": "yarn build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/exa",
"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",
Expand All @@ -24,7 +25,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
11 changes: 11 additions & 0 deletions libs/langchain-exa/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
5 changes: 3 additions & 2 deletions libs/langchain-google-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-common/",
"scripts": {
"build": "yarn run build:deps && yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"build": "yarn turbo:command build:internal --filter=@langchain/google-common",
"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",
Expand All @@ -24,7 +25,7 @@
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
"lint": "yarn lint:eslint && yarn lint:dpdm",
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
"clean": "rm -rf dist/ && NODE_OPTIONS=--max-old-space-size=4096 yarn lc-build --config ./langchain.config.js --create-entrypoints --pre",
"clean": "rm -rf .turbo dist/",
"prepack": "yarn build",
"test": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
"test:watch": "yarn run build:deps && NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
Expand Down
11 changes: 11 additions & 0 deletions libs/langchain-google-common/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["**/dist/**"]
},
"build:internal": {
"dependsOn": ["^build:internal"]
}
}
}
Loading

0 comments on commit 238e093

Please sign in to comment.