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

Schema gen should handle dependencies in watch mode

Open gadicc opened this issue 7 months ago • 0 comments

Currently, the schema generator, when it watch mode (--watch), only recreates direct schemas and not dependencies.

i.e.

If you edit quote.ts (which contains the @yf-schema pragma), quote.schema.json will be re-created. However, the latter is imported also by options.ts, leading to incorrect types.

The easy workaround for now is to simply re-create all schemas with:

$ deno task schema -f

but it means you need to remember to do so on relevant files. It would be great if watch mode could track dependencies too. We could start with direct dependencies of depth 1. Not hard to do, just need to find time.

gadicc avatar May 28 '25 01:05 gadicc