@fre4x/yahoo-finance 1.0.42 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -28
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -68293,7 +68293,6 @@ async function waitIfNeeded() {
68293
68293
  }
68294
68294
  lastCallTimestamp = Date.now();
68295
68295
  }
68296
- var _YahooFinance = src_default.YahooFinance || src_default;
68297
68296
  var config2 = {
68298
68297
  validation: { logErrors: false },
68299
68298
  // Use a realistic User-Agent to avoid being flagged as a bot
@@ -68308,8 +68307,8 @@ var config2 = {
68308
68307
  },
68309
68308
  // Internal queue management
68310
68309
  queue: {
68311
- concurrency: 1,
68312
- timeout: 6e4
68310
+ concurrency: 1
68311
+ // timeout: 60000, // v3 uses timeout in seconds or has different structure
68313
68312
  },
68314
68313
  logger: {
68315
68314
  info: (...args) => console.error(...args),
@@ -68319,30 +68318,7 @@ var config2 = {
68319
68318
  dir: (...args) => console.error(...args)
68320
68319
  }
68321
68320
  };
68322
- var internalYf = src_default;
68323
- if (internalYf._opts) {
68324
- if (!internalYf._opts.fetchOptions) {
68325
- internalYf._opts.fetchOptions = {};
68326
- }
68327
- if (!internalYf._opts.fetchOptions.headers) {
68328
- internalYf._opts.fetchOptions.headers = {};
68329
- }
68330
- if (!internalYf._opts.validation) {
68331
- internalYf._opts.validation = {};
68332
- }
68333
- }
68334
- if (typeof src_default.setGlobalConfig === "function") {
68335
- src_default.setGlobalConfig(config2);
68336
- } else if (
68337
- // biome-ignore lint/suspicious/noExplicitAny: module interop
68338
- typeof src_default.default?.setGlobalConfig === "function"
68339
- ) {
68340
- src_default.default.setGlobalConfig(config2);
68341
- }
68342
- var yahooFinanceClient = src_default;
68343
- if (typeof yahooFinanceClient.suppressNotices === "function") {
68344
- yahooFinanceClient.suppressNotices(["yahooSurvey"]);
68345
- }
68321
+ var yahooFinanceClient = new src_default(config2);
68346
68322
  var MAX_CACHE_SIZE = 1e3;
68347
68323
  var cache = /* @__PURE__ */ new Map();
68348
68324
  var CACHE_TTL_MS = 60 * 1e3;
@@ -68700,7 +68676,7 @@ server.registerTool(
68700
68676
  name: q.shortName ?? q.longName ?? "",
68701
68677
  price: q.regularMarketPrice ?? "",
68702
68678
  change: q.regularMarketChange?.toFixed(2) ?? "",
68703
- changePct: `${q.regularMarketChangePercent?.toFixed(2)}%` ?? "",
68679
+ changePct: q.regularMarketChangePercent !== void 0 ? `${q.regularMarketChangePercent.toFixed(2)}%` : "",
68704
68680
  currency: q.currency ?? "",
68705
68681
  market: q.market ?? ""
68706
68682
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fre4x/yahoo-finance",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "A Yahoo Finance MCP server for LLMs.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",