node-yahoo-finance2 icon indicating copy to clipboard operation
node-yahoo-finance2 copied to clipboard

Ability to turn off validation for query options too

Open gadicc opened this issue 10 months ago • 2 comments

e.g. https://github.com/gadicc/node-yahoo-finance2/issues/876

Just like the user can disable validation for results, we should let them disable validation for query options too.

This is quite fringe, but useful for e.g. the user discovers an option we haven't covered yet, without waiting for us to implement on our side.

gadicc avatar Feb 20 '25 11:02 gadicc

@gadicc let me know if I can help or pick this up?

Sireini avatar Feb 24 '25 20:02 Sireini

Hey @Sireini, thanks so much for this. I usually jump at these opportunities but you caught me now where I'm actively working on the next major version of the library, with some very big internal changes happening - including with how validation works.

Once things stabilize there a little, I'm sure I can add this feature quite quickly, assuming you'll be happy to run an early release before v3 becomes "official". Hope to post an update on developments next week sometime, let's see how far I get 😅

In any case, thanks again... PR offers are usually my absolute favourite as it's quite rare I get to dedicate a block of time to the library like now 🙏

gadicc avatar Feb 25 '25 09:02 gadicc

Oops, I added this functionality way back but forgot to post an update. My bad `:) Hopefully the notification about the linked commit above was a hint. In brief, for v3:

  • [x] Ability to specify { validateOptions: false } to disable options validation
  • [x] Documentation for the above
  • [x] Tests for the above

Although v3 is not yet "official", nor marked with the @latest tag, many are using it succesfully. For more info on upgrading, see UPGRADING.md. Unfortunately, I don't have the capacity to backport fixes or code back to v2.

gadicc avatar Aug 25 '25 10:08 gadicc