From 0e9f333346a02c2eeb265441f396aedc1f409d55 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Tue, 3 Sep 2024 09:51:17 -0700 Subject: [PATCH] chore(types): Export types for portability (#442) --- libs/langgraph/.gitignore | 4 ---- libs/langgraph/langchain.config.js | 1 - libs/langgraph/package.json | 13 ------------- libs/langgraph/src/_types.ts | 11 ----------- libs/langgraph/src/web.ts | 7 +++++++ 5 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 libs/langgraph/src/_types.ts diff --git a/libs/langgraph/.gitignore b/libs/langgraph/.gitignore index 8dc03e52..ac148885 100644 --- a/libs/langgraph/.gitignore +++ b/libs/langgraph/.gitignore @@ -1,7 +1,3 @@ -_types.cjs -_types.js -_types.d.ts -_types.d.cts index.cjs index.js index.d.ts diff --git a/libs/langgraph/langchain.config.js b/libs/langgraph/langchain.config.js index 1921b0af..bc910180 100644 --- a/libs/langgraph/langchain.config.js +++ b/libs/langgraph/langchain.config.js @@ -12,7 +12,6 @@ function abs(relativePath) { export const config = { internals: [/node\:/, /@langchain\/core\//, /async_hooks/], entrypoints: { - _types: "_types", index: "index", web: "web", pregel: "pregel/index", diff --git a/libs/langgraph/package.json b/libs/langgraph/package.json index d8cdad73..3391406b 100644 --- a/libs/langgraph/package.json +++ b/libs/langgraph/package.json @@ -81,15 +81,6 @@ "registry": "https://registry.npmjs.org/" }, "exports": { - "./_types": { - "types": { - "import": "./_types.d.ts", - "require": "./_types.d.cts", - "default": "./_types.d.ts" - }, - "import": "./_types.js", - "require": "./_types.cjs" - }, ".": { "types": { "import": "./index.d.ts", @@ -130,10 +121,6 @@ }, "files": [ "dist/", - "_types.cjs", - "_types.js", - "_types.d.ts", - "_types.d.cts", "index.cjs", "index.js", "index.d.ts", diff --git a/libs/langgraph/src/_types.ts b/libs/langgraph/src/_types.ts deleted file mode 100644 index 73c17cc3..00000000 --- a/libs/langgraph/src/_types.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Export types for portability, these shouldn't be needed/used directly -export { - type AnyValue, - type WaitForNames, - type DynamicBarrierValue, - type LastValue, - type NamedBarrierValue, - type Topic, -} from "./channels/index.js"; - -export { type AnnotationRoot } from "./graph/index.js"; diff --git a/libs/langgraph/src/web.ts b/libs/langgraph/src/web.ts index a22386da..4f41cb18 100644 --- a/libs/langgraph/src/web.ts +++ b/libs/langgraph/src/web.ts @@ -21,7 +21,14 @@ export { BaseChannel, type BinaryOperator, BinaryOperatorAggregate, + type AnyValue, + type WaitForNames, + type DynamicBarrierValue, + type LastValue, + type NamedBarrierValue, + type Topic, } from "./channels/index.js"; +export { type AnnotationRoot as _INTERNAL_ANNOTATION_ROOT } from "./graph/index.js"; export { type RetryPolicy } from "./pregel/utils.js"; export { Send } from "./constants.js";