From 5f993518882338b24d1d47f7a0f724869d7c7c06 Mon Sep 17 00:00:00 2001 From: Gadi Cohen Date: Fri, 5 Apr 2024 10:26:21 +0100 Subject: [PATCH] fix(cookieJar): re-export ExtendedCJ from package root (fixes #761) --- docs/other/setGlobalConfig.md | 4 ++-- src/index-node.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/other/setGlobalConfig.md b/docs/other/setGlobalConfig.md index 83754568..74ec1bf4 100644 --- a/docs/other/setGlobalConfig.md +++ b/docs/other/setGlobalConfig.md @@ -55,8 +55,8 @@ serverless / edge, a database store would be a better fit): import os from "os"; import path from "path"; import { FileCookieStore } from "tough-cookie-file-store"; -import yahooFinance from "../dist/esm/src/index-node.js"; -import { ExtendedCookieJar } from "../dist/esm/src/lib/cookieJar.js"; +import yahooFinance from "yahoo-finance2"; +import { ExtendedCookieJar } from "yahoo-finance2"; const cookiePath = path.join(os.homedir(), ".yf2-cookies.json"); const cookieJar = new ExtendedCookieJar(new FileCookieStore(cookiePath)); diff --git a/src/index-node.ts b/src/index-node.ts index 19bc9d1f..5938c78a 100644 --- a/src/index-node.ts +++ b/src/index-node.ts @@ -1,6 +1,8 @@ import yahooFinance from "./index-common.js"; import nodeEnvironment from "./env-node.js"; +import { ExtendedCookieJar } from "./lib/cookieJar.js"; yahooFinance._env = nodeEnvironment; +export { ExtendedCookieJar }; export default yahooFinance;