Skip to content

Commit

Permalink
fix(cookieJar): re-export ExtendedCJ from package root (fixes #761)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Apr 5, 2024
1 parent 394774e commit 5f99351
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/other/setGlobalConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 2 additions & 0 deletions src/index-node.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 5f99351

Please sign in to comment.