Type of Change
- Other (please clarify below)
Summary
As encountered in #21 , it was determined through mocha testing that having definitions outside of any function, would effectively act as a global variable between runs, or otherwise cause caching issues in NodeJS between renderToString calls.
Details
I had always wanted a better way to code this initially as definitions is updated / read globally by all those functions, so is effectively global state, which is not idea. And as revealed in that PR and verified in mochajs/mocha#1637, this causes odd behaviors.
So basically we need to get rid of let definitions as a shared variable, and still somehow make it all work. Also open to using better data structures if it fits, like a Map or Set.
Also seeing an issue in Greenwood when using metadata for hydration it was breaking GitHub Actions on Windows. 😬
Type of Change
Summary
As encountered in #21 , it was determined through mocha testing that having
definitionsoutside of any function, would effectively act as a global variable between runs, or otherwise cause caching issues in NodeJS betweenrenderToStringcalls.Details
I had always wanted a better way to code this initially as
definitionsis updated / read globally by all those functions, so is effectively global state, which is not idea. And as revealed in that PR and verified in mochajs/mocha#1637, this causes odd behaviors.So basically we need to get rid of
let definitionsas a shared variable, and still somehow make it all work. Also open to using better data structures if it fits, like aMaporSet.Also seeing an issue in Greenwood when using
metadatafor hydration it was breaking GitHub Actions on Windows. 😬