Skip to content

Commit

Permalink
Fix bundlers dropping AsyncLocalStorage initialization in entrypoint (#…
Browse files Browse the repository at this point in the history
…278)

* Fix bundlers dropping AsyncLocalStorage initialization in entrypoint

* Update lock
  • Loading branch information
jacoblee93 authored Jul 23, 2024
1 parent 8768872 commit f692b61
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 8 deletions.
2 changes: 1 addition & 1 deletion langgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@langchain/anthropic": "^0.2.6",
"@langchain/community": "^0.2.19",
"@langchain/openai": "^0.2.4",
"@langchain/scripts": "^0.0.13",
"@langchain/scripts": "^0.0.18",
"@swc/core": "^1.3.90",
"@swc/jest": "^0.2.29",
"@tsconfig/recommended": "^1.0.3",
Expand Down
4 changes: 3 additions & 1 deletion langgraph/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* __LC_ALLOW_ENTRYPOINT_SIDE_EFFECTS__ */

import { initializeAsyncLocalStorageSingleton } from "./setup/async_local_storage.js";

// Initialize global async local storage instance for tracing
/* #__PURE__ */ initializeAsyncLocalStorageSingleton();
initializeAsyncLocalStorageSingleton();

export * from "./web.js";
87 changes: 81 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ __metadata:
"@langchain/community": ^0.2.19
"@langchain/core": ">=0.2.18 <0.3.0"
"@langchain/openai": ^0.2.4
"@langchain/scripts": ^0.0.13
"@langchain/scripts": ^0.0.18
"@swc/core": ^1.3.90
"@swc/jest": ^0.2.29
"@tsconfig/recommended": ^1.0.3
Expand Down Expand Up @@ -1511,19 +1511,21 @@ __metadata:
languageName: node
linkType: hard

"@langchain/scripts@npm:^0.0.13":
version: 0.0.13
resolution: "@langchain/scripts@npm:0.0.13"
"@langchain/scripts@npm:^0.0.18":
version: 0.0.18
resolution: "@langchain/scripts@npm:0.0.18"
dependencies:
axios: ^1.6.7
commander: ^11.1.0
glob: ^10.3.10
rimraf: ^5.0.1
rollup: ^4.5.2
ts-morph: ^21.0.1
typescript: ^5.4.5
bin:
lc-build: bin/build
checksum: 7ebfbccc40df4d3fc503463dd6c4e6532ecf883bab4a0f8d5e4d50b5f779764d038ee0ec9c40916b4673048827f9d96cb85cd791bb879d42defe98ba1c2536d1
lc-build: bin/build.js
v2: bin/build_v2.js
checksum: 97d5de819093c951a6af564b917a79f6a13dc6bf21e8a05ab92e14ca0283580257d8db16e353b5b25412231abcd15a797c6f5f8a939b29152f916c115d894143
languageName: node
linkType: hard

Expand Down Expand Up @@ -6101,6 +6103,22 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^10.3.7":
version: 10.4.5
resolution: "glob@npm:10.4.5"
dependencies:
foreground-child: ^3.1.0
jackspeak: ^3.1.2
minimatch: ^9.0.4
minipass: ^7.1.2
package-json-from-dist: ^1.0.0
path-scurry: ^1.11.1
bin:
glob: dist/esm/bin.mjs
checksum: 0bc725de5e4862f9f387fd0f2b274baf16850dcd2714502ccf471ee401803997983e2c05590cb65f9675a3c6f2a58e7a53f9e365704108c6ad3cbf1d60934c4a
languageName: node
linkType: hard

"glob@npm:^7.0.0, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4":
version: 7.2.3
resolution: "glob@npm:7.2.3"
Expand Down Expand Up @@ -7071,6 +7089,19 @@ __metadata:
languageName: node
linkType: hard

"jackspeak@npm:^3.1.2":
version: 3.4.3
resolution: "jackspeak@npm:3.4.3"
dependencies:
"@isaacs/cliui": ^8.0.2
"@pkgjs/parseargs": ^0.11.0
dependenciesMeta:
"@pkgjs/parseargs":
optional: true
checksum: be31027fc72e7cc726206b9f560395604b82e0fddb46c4cbf9f97d049bcef607491a5afc0699612eaa4213ca5be8fd3e1e7cd187b3040988b65c9489838a7c00
languageName: node
linkType: hard

"jest-changed-files@npm:^29.7.0":
version: 29.7.0
resolution: "jest-changed-files@npm:29.7.0"
Expand Down Expand Up @@ -8435,6 +8466,15 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^9.0.4":
version: 9.0.5
resolution: "minimatch@npm:9.0.5"
dependencies:
brace-expansion: ^2.0.1
checksum: 2c035575eda1e50623c731ec6c14f65a85296268f749b9337005210bb2b34e2705f8ef1a358b188f69892286ab99dc42c8fb98a57bde55c8d81b3023c19cea28
languageName: node
linkType: hard

"minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.6":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
Expand Down Expand Up @@ -8516,6 +8556,13 @@ __metadata:
languageName: node
linkType: hard

"minipass@npm:^7.1.2":
version: 7.1.2
resolution: "minipass@npm:7.1.2"
checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3
languageName: node
linkType: hard

"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2":
version: 2.1.2
resolution: "minizlib@npm:2.1.2"
Expand Down Expand Up @@ -9208,6 +9255,13 @@ __metadata:
languageName: node
linkType: hard

"package-json-from-dist@npm:^1.0.0":
version: 1.0.0
resolution: "package-json-from-dist@npm:1.0.0"
checksum: ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea
languageName: node
linkType: hard

"package-json@npm:^8.1.0":
version: 8.1.1
resolution: "package-json@npm:8.1.1"
Expand Down Expand Up @@ -9330,6 +9384,16 @@ __metadata:
languageName: node
linkType: hard

"path-scurry@npm:^1.11.1":
version: 1.11.1
resolution: "path-scurry@npm:1.11.1"
dependencies:
lru-cache: ^10.2.0
minipass: ^5.0.0 || ^6.0.2 || ^7.0.0
checksum: 890d5abcd593a7912dcce7cf7c6bf7a0b5648e3dee6caf0712c126ca0a65c7f3d7b9d769072a4d1baf370f61ce493ab5b038d59988688e0c5f3f646ee3c69023
languageName: node
linkType: hard

"path-type@npm:^4.0.0":
version: 4.0.0
resolution: "path-type@npm:4.0.0"
Expand Down Expand Up @@ -9855,6 +9919,17 @@ __metadata:
languageName: node
linkType: hard

"rimraf@npm:^5.0.1":
version: 5.0.9
resolution: "rimraf@npm:5.0.9"
dependencies:
glob: ^10.3.7
bin:
rimraf: dist/esm/bin.mjs
checksum: e6dd5007e34181e1fa732437499d798035b2f3313887435cb855c5c9055bf9646795fc1c63ef843de830df8577cd9862df2dabf913fe08dcc1758c96de4a4fdb
languageName: node
linkType: hard

"robust-predicates@npm:^3.0.2":
version: 3.0.2
resolution: "robust-predicates@npm:3.0.2"
Expand Down

0 comments on commit f692b61

Please sign in to comment.