Skip to content

Commit

Permalink
fix build, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed May 30, 2024
1 parent 9dfff08 commit 1b3a79b
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 332 deletions.
4 changes: 4 additions & 0 deletions libs/langchain-standard-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
index.cjs
index.js
index.d.ts
index.d.cts
node_modules
dist
.yarn
1 change: 0 additions & 1 deletion libs/langchain-standard-tests/langchain.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const config = {
entrypoints: {
index: "index",
},
requiresOptionalDependency: [],
tsConfigPath: resolve("./tsconfig.json"),
cjsSource: "./dist-cjs",
cjsDestination: "./dist",
Expand Down
23 changes: 11 additions & 12 deletions libs/langchain-standard-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,20 @@
},
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-standard-tests/",
"scripts": {
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
"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",
"build:scripts": "yarn create-entrypoints && yarn check-tree-shaking",
"build": "yarn turbo:command build:internal --filter=@langchain/standard-tests",
"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",
"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",
"test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.cjs --testTimeout 100000",
"test:int": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.int\\.test.ts --testTimeout 100000 --maxWorkers=50%",
"format": "prettier --config .prettierrc --write \"src\"",
"format:check": "prettier --config .prettierrc --check \"src\"",
"move-cjs-to-dist": "yarn lc-build --config ./langchain.config.js --move-cjs-dist",
"create-entrypoints": "yarn lc-build --config ./langchain.config.js --create-entrypoints",
"check-tree-shaking": "yarn lc-build --config ./langchain.config.js --tree-shaking"
"format:check": "prettier --config .prettierrc --check \"src\""
},
"author": "LangChain",
"license": "MIT",
Expand Down Expand Up @@ -69,7 +63,11 @@
},
"exports": {
".": {
"types": "./index.d.ts",
"types": {
"import": "./index.d.ts",
"require": "./index.d.cts",
"default": "./index.d.ts"
},
"import": "./index.js",
"require": "./index.cjs"
},
Expand All @@ -79,6 +77,7 @@
"dist/",
"index.cjs",
"index.js",
"index.d.ts"
"index.d.ts",
"index.d.cts"
]
}
105 changes: 0 additions & 105 deletions libs/langchain-standard-tests/src/chat_models.ts

This file was deleted.

5 changes: 2 additions & 3 deletions libs/langchain-standard-tests/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./chat_models.js";
export * from "./llms.js";
export * from "./vectorstores.js";
export * from "./unit_tests/chat_models.js";
export * from "./integration_tests/chat_models.js";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
90 changes: 0 additions & 90 deletions libs/langchain-standard-tests/src/llms.ts

This file was deleted.

5 changes: 0 additions & 5 deletions libs/langchain-standard-tests/src/tests/chat_models.test.ts

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions libs/langchain-standard-tests/src/tests/llms.test.ts

This file was deleted.

5 changes: 0 additions & 5 deletions libs/langchain-standard-tests/src/tests/vectorstores.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
Loading

0 comments on commit 1b3a79b

Please sign in to comment.